/* Appreciation Labels SWC styles with extended controls */
:root {
  --bg-1: #0c1022;
  --bg-2: #1b1f3a;
  --accent-1: #7a5cff;
  --accent-2: #00d1ff;
  --glow: 0 0 30px rgba(122, 92, 255, 0.6), 0 0 60px rgba(0, 209, 255, 0.4);
  --label-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --mm: 3.7795275591px;

  --edge-start: #7a5cff;
  --edge-end: #00d1ff;

  --line-width: 60%; /* rule width and text measure */
  --gap-mm: 8; /* space between elements in mm */
  --family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;

  --size-1: 18px;
  --size-2: 22px;
  --size-3: 16px;
  --size-4: 14px;
  --lh: 1.2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: var(--family);
  color: #e7e7f1;
  background: radial-gradient(1200px at 10% 10%, var(--bg-2), var(--bg-1) 60%)
    fixed;
}

.app-header {
  text-align: center;
  padding: 24px 16px;
}
.app-header h1 {
  margin: 0 0 8px 0;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--glow);
}
.app-header p {
  margin: 0;
  opacity: 0.9;
}

.app-shell {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  padding: 16px 24px 40px;
}

.controls {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--label-shadow);
  backdrop-filter: blur(6px);
}

.controls label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.controls textarea,
.controls input[type="text"],
.controls input[type="date"],
.controls select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  outline: none;
}
.controls textarea {
  min-height: 96px;
}
.controls .btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(
    135deg,
    rgba(122, 92, 255, 0.25),
    rgba(0, 209, 255, 0.25)
  );
  color: #fff;
  cursor: pointer;
}
.controls .btn.glow {
  box-shadow: var(--glow);
}
.advanced summary {
  cursor: pointer;
  font-weight: 700;
  margin: 12px 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-2.compact {
  gap: 8px;
  align-items: center;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

.canvas {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.a4 {
  width: calc(210 * var(--mm));
  height: calc(297 * var(--mm));
  background: white;
  color: black;
  position: relative;
  border-radius: 12px;
  box-shadow: var(--label-shadow);
  overflow: hidden;
}

.crop {
  position: absolute;
  width: 0;
  height: 0;
}
.crop::before,
.crop::after {
  content: "";
  position: absolute;
  background: #000;
  opacity: 0.55;
}
.top-left::before {
  width: 24px;
  height: 1px;
  left: 10px;
  top: 10px;
}
.top-left::after {
  width: 1px;
  height: 24px;
  left: 10px;
  top: 10px;
}
.top-right::before {
  width: 24px;
  height: 1px;
  right: 10px;
  top: 10px;
}
.top-right::after {
  width: 1px;
  height: 24px;
  right: 10px;
  top: 10px;
}
.bottom-left::before {
  width: 24px;
  height: 1px;
  left: 10px;
  bottom: 10px;
}
.bottom-left::after {
  width: 1px;
  height: 24px;
  left: 10px;
  bottom: 10px;
}
.bottom-right::before {
  width: 24px;
  height: 1px;
  right: 10px;
  bottom: 10px;
}
.bottom-right::after {
  width: 1px;
  height: 24px;
  right: 10px;
  bottom: 10px;
}

.labels {
  position: absolute;
  inset: 0;
  padding: calc(10 * var(--mm)) calc(10 * var(--mm));
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap-mm) * var(--mm));
}

.label {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  --side-mm: 10;
  padding-left: calc(var(--side-mm) * var(--mm));
  padding-right: calc(var(--side-mm) * var(--mm));
}

.card {
  width: calc(100% - (var(--side-mm) * 2 * var(--mm)));
  max-width: none;
  margin-top: calc(8 * var(--mm));
  text-align: center;
  position: relative;
  padding: 0 calc(8 * var(--mm));
}
.card::before {
  content: "";
  position: absolute;
  inset: -8px;
  background: linear-gradient(135deg, var(--edge-start), var(--edge-end));
  filter: blur(16px);
  z-index: 0;
  border-radius: 18px;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: linear-gradient(180deg, #fff, #fafafa);
  z-index: 0;
}

.card-inner {
  position: relative;
  z-index: 2;
  padding: calc(8 * var(--mm)) 0;
}

.line-1 {
  font-family: var(--family);
  font-size: var(--size-1);
  font-weight: 600;
  color: #111;
  opacity: 0.9;
  line-height: var(--lh);
  margin: 0 auto;
  max-width: var(--line-width);
}
.line-2 {
  font-family: var(--family);
  font-weight: 800;
  font-size: var(--size-2);
  color: #000;
  line-height: var(--lh);
  margin: 0 auto;
  max-width: var(--line-width);
}
.sep {
  width: var(--line-width);
  height: 1px;
  background: #222;
  margin: 6px auto 8px auto;
  opacity: 0.7;
}
.line-3 {
  font-family: var(--family);
  font-weight: 700;
  font-size: var(--size-3);
  color: #111;
  opacity: 0.9;
  font-style: italic;
  line-height: var(--lh);
  margin: 0 auto;
  max-width: var(--line-width);
}
.line-4 {
  font-family: var(--family);
  font-size: var(--size-4);
  color: #222;
  opacity: 0.9;
  font-style: italic;
  line-height: var(--lh);
  margin: 0 auto;
  max-width: var(--line-width);
}

@media print {
  body {
    background: white;
  }
  .app-header,
  .controls,
  .app-footer {
    display: none;
  }
  .a4 {
    border-radius: 0;
    box-shadow: none;
  }
}
