:root {
  color-scheme: dark;
  --paper-black: #050505;
  --panel: #14110d;
  --panel-2: #211b13;
  --line: #6b5930;
  --text: #f3df9a;
  --muted: #bba76d;
  --gold: #d9bb56;
  --red: #a83225;
  --ink: #050504;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.34)),
    repeating-linear-gradient(90deg, rgba(255, 244, 190, 0.025) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, #070706, #15120d 48%, #070706);
  color: var(--text);
}

button,
input {
  font: inherit;
}

input[type="range"] {
  min-height: 16px;
  padding: 0;
  accent-color: var(--gold);
}

.size-grid {
  display: block;
  padding-top: 0;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(420px, 500px);
  gap: 18px;
  align-items: center;
  padding: 6px 18px 12px;
}

.stage {
  display: grid;
  justify-items: center;
  align-items: center;
  min-width: 0;
  min-height: calc(100vh - 18px);
}

.poster-wrap {
  position: relative;
  width: min(calc((100vh - 72px) * 11 / 17), calc(100vw - 570px), 500px);
  min-width: 280px;
  aspect-ratio: 11 / 17;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.36));
  overflow: visible;
  transform-origin: top center;
  transition:
    width 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
    aspect-ratio 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.poster {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  background: #d2d610;
  container-type: size;
  transform-origin: center;
  transition:
    border-radius 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
    clip-path 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--paper-tint, transparent);
  mix-blend-mode: color;
  opacity: var(--paper-tint-opacity, 0);
}

body.exporting-png .poster::before {
  opacity: 0 !important;
}

.poster[data-paper-color="yellow"] {
  --paper-tint: #d2d610;
  --paper-tint-opacity: 0.18;
}

.poster[data-paper-color="green"] {
  --paper-tint: #00b968;
  --paper-tint-opacity: 0.72;
}

.poster[data-paper-color="pink"] {
  --paper-tint: #f06aa1;
  --paper-tint-opacity: 0.72;
}

.poster[data-paper-color="red"] {
  --paper-tint: #e14835;
  --paper-tint-opacity: 0.72;
}

.poster[data-paper-color="orange"] {
  --paper-tint: #f47b4f;
  --paper-tint-opacity: 0.72;
}

.poster[data-paper-color="blue"] {
  --paper-tint: #75c4d7;
  --paper-tint-opacity: 0.72;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(90deg, transparent 49.25%, rgba(24, 22, 0, 0.36) 49.72%, rgba(7, 7, 0, 0.3) 49.92%, rgba(255, 255, 185, 0.28) 50.12%, rgba(44, 40, 0, 0.22) 50.36%, transparent 50.78%),
    linear-gradient(180deg, transparent 49.18%, rgba(24, 22, 0, 0.34) 49.68%, rgba(7, 7, 0, 0.28) 49.9%, rgba(255, 255, 185, 0.26) 50.12%, rgba(44, 40, 0, 0.2) 50.38%, transparent 50.82%);
  mix-blend-mode: normal;
  opacity: 0.78;
}

.poster.no-folds::after {
  display: none;
}

.poster-wrap.taped .poster::before {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,210,0.05),
    inset 0 0 34px rgba(0,0,0,0.08);
}

.poster-wrap.taped .tape {
  position: absolute;
  z-index: 4;
  width: 20%;
  height: 3.15%;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255,252,220,0.88), rgba(232,218,155,0.76));
  border: 1px solid rgba(88, 74, 28, 0.18);
  border-radius: 2px;
  mix-blend-mode: normal;
  opacity: 0.96;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.22),
    inset 0 0 12px rgba(255,255,255,0.18);
}

.poster-wrap.taped .tape-top-left {
  top: -1.7%;
  left: -6.2%;
  transform: rotate(-34deg);
}

.poster-wrap.taped .tape-top-right {
  top: -1.7%;
  right: -6.2%;
  transform: rotate(34deg);
}

.poster-wrap.taped .tape-bottom-left {
  bottom: -1.7%;
  left: -6.2%;
  transform: rotate(34deg);
}

.poster-wrap.taped .tape-bottom-right {
  right: -6.2%;
  bottom: -1.7%;
  transform: rotate(-34deg);
}

.poster-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  z-index: 0;
}

.ink {
  position: absolute;
  left: 12.25%;
  width: 75.5%;
  color: var(--paper-black);
  text-align: center;
  text-transform: uppercase;
  font-family: "Arial Black", Impact, sans-serif;
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: 0;
  transform: rotate(-0.25deg);
  mix-blend-mode: normal;
  opacity: 0.94;
  filter: contrast(1.2);
  text-shadow: 0.018em 0.018em 0 rgba(0, 0, 0, 0.24);
  overflow-wrap: anywhere;
  overflow: hidden;
  z-index: 2;
}

.topline {
  top: 3.9%;
  left: 23%;
  width: 54%;
  font-size: clamp(8px, 2.2cqw, 15px);
  line-height: 1;
}

.headline {
  left: 4%;
  width: 92%;
  font-family: "Arial Black", Impact, sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 17.8cqw, 118px);
  white-space: nowrap;
  transform-origin: center;
}

.single-title .headline {
  font-family: "Anton", Impact, "Arial Black", sans-serif;
  font-weight: 400;
}

.headline-one {
  top: 6.4%;
}

.headline-two {
  top: 18.2%;
}

.headline-three {
  top: 29%;
}

.single-title .headline-one {
  top: 9.4%;
}

.single-title .headline-two,
.single-title .headline-three,
.two-title .headline-three {
  display: none;
}

.accent {
  top: 42.2%;
  font-size: clamp(12px, 3.25cqw, 22px);
  font-style: italic;
  line-height: 1;
}

.support {
  top: 46.5%;
  left: 4%;
  width: 92%;
  font-size: clamp(17px, 4.8cqw, 32px);
  line-height: 0.92;
  white-space: nowrap;
  overflow: visible;
}

.date {
  left: 5%;
  width: 90%;
  top: 52.8%;
  font-size: clamp(13px, 3.45cqw, 23px);
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
}

.ages {
  top: 57.8%;
  font-size: clamp(9px, 2.35cqw, 16px);
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
}

.split {
  top: 61.8%;
  width: 41%;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-size: clamp(8px, 1.95cqw, 13px);
  line-height: 1.05;
  white-space: nowrap;
  overflow: visible;
}

.split.left {
  left: 4.5%;
}

.split.right {
  left: 54.5%;
}

.venue {
  left: 5%;
  width: 90%;
  top: 67%;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-size: clamp(8px, 2.1cqw, 14px);
  line-height: 1;
  overflow: visible;
  white-space: nowrap;
}

.address {
  left: 6%;
  width: 88%;
  top: 70.7%;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-size: clamp(7px, 1.75cqw, 12px);
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
}

.note {
  top: 74.6%;
  left: 2%;
  width: 96%;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-size: clamp(12px, 2.9cqw, 19px);
  line-height: 0.95;
  white-space: nowrap;
  overflow: visible;
  transform-origin: center;
}

.tiny {
  left: 2%;
  width: 96%;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(11px, 2.65cqw, 18px);
  line-height: 0.95;
  white-space: nowrap;
  overflow: visible;
  transform-origin: center;
}

.fine-text {
  display: inline-block;
  max-width: none;
  white-space: nowrap;
  transform-origin: center;
}

.tiny-one {
  top: 78%;
}

.tiny-two {
  top: 79.2%;
}

.tiny-three {
  top: 80.4%;
  font-size: clamp(11px, 2.55cqw, 17px);
  line-height: 0.95;
}

.panel {
  align-self: start;
  max-height: calc(100vh - 12px);
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(30, 25, 17, 0.98), rgba(13, 12, 9, 0.98)),
    repeating-linear-gradient(0deg, rgba(244, 218, 128, 0.035) 0 1px, transparent 1px 6px);
  border: 1px solid rgba(178, 146, 70, 0.58);
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 185, 0.05),
    0 18px 45px rgba(0, 0, 0, 0.34);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  position: sticky;
  top: -12px;
  z-index: 4;
  padding: 2px 0 10px;
  background: linear-gradient(180deg, rgba(30, 25, 17, 0.98), rgba(23, 19, 13, 0.92));
  border-bottom: 1px solid rgba(217, 187, 86, 0.28);
}

.save-status {
  min-height: 14px;
  margin: -5px 0 8px;
  color: #d6c56f;
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #eadb9c;
  text-shadow: 1px 1px 0 #000;
}

h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 4px;
  background: #9f2b22;
  box-shadow: 14px 0 0 var(--gold);
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
}

.controls > label:not(.two label),
.controls > .two,
.paper-colors,
.line-tools,
.details-panel {
  grid-column: span 2;
}

.controls > label:nth-of-type(1),
.controls > label:nth-of-type(2),
.controls > label:nth-of-type(3),
.controls > label:nth-of-type(4),
.controls > label:nth-of-type(5),
.controls > label:nth-of-type(6),
.controls > label:nth-of-type(7) {
  grid-column: span 1;
}

.controls > .line-tools {
  grid-column: span 1;
}

label {
  display: grid;
  gap: 3px;
  color: #c4b071;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.paper-colors {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 0 0 3px;
  padding: 0;
  border: 0;
}

.paper-colors legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
  color: #c4b071;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.swatch {
  position: relative;
  display: block;
  min-height: 28px;
  border: 1px solid #574a2c;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  background: var(--swatch-color);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 -8px 12px rgba(0, 0, 0, 0.12);
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch span {
  position: absolute;
  inset: auto 4px 3px;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.82);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.swatch:has(input:checked) {
  border-color: #f3e7b8;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(243, 231, 184, 0.36);
}

.swatch.yellow {
  --swatch-color: #d2d610;
}

.swatch.green {
  --swatch-color: #00b968;
}

.swatch.pink {
  --swatch-color: #f06aa1;
}

.swatch.red {
  --swatch-color: #e14835;
}

.swatch.orange {
  --swatch-color: #f47b4f;
}

.swatch.blue {
  --swatch-color: #75c4d7;
}

.line-tools {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) 30px 50px 30px;
  align-items: end;
  gap: 5px;
}

.line-tools span {
  align-self: center;
  color: #a99458;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.line-tools button {
  min-height: 24px;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1;
}

.line-tools .reset-size {
  font-size: 8px;
  letter-spacing: 0.025em;
}

input {
  width: 100%;
  min-height: 26px;
  border: 1px solid rgba(137, 113, 58, 0.68);
  border-radius: 4px;
  background: #070604;
  color: #f3e7b8;
  padding: 5px 8px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

input::selection {
  background: var(--gold);
  color: #050505;
}

input:focus {
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(200, 173, 89, 0.16);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.details-panel {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(137, 113, 58, 0.62);
  border-radius: 4px;
  background: rgba(8, 7, 4, 0.3);
}

.details-panel summary {
  cursor: pointer;
  color: #d8c46d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.details-panel[open] summary {
  margin-bottom: 8px;
}

.details-panel label + label,
.details-panel .two + label,
.details-panel label + .two {
  margin-top: 7px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(199, 170, 86, 0.22);
}

button {
  min-height: 30px;
  border: 1px solid rgba(128, 104, 53, 0.78);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 239, 185, 0.04), transparent),
    #15110c;
  color: #eadb9c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  box-shadow: inset 0 1px 0 rgba(255, 239, 185, 0.07);
}

button:active {
  transform: translateY(1px);
}

button:hover {
  border-color: var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 239, 185, 0.07), transparent),
    #241d12;
  color: #fff1bf;
}

.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #100e09;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 248, 200, 0.28);
}

.primary:hover {
  background: #e0c46b;
  color: #080704;
}

@media (max-width: 840px) {
  body {
    background:
      radial-gradient(circle at 50% -8rem, rgba(227, 207, 63, 0.16), transparent 18rem),
      linear-gradient(180deg, #090806, #17140d 45%, #080806);
  }

  .app {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
    padding: 8px 8px 14px;
  }

  .stage {
    min-height: 0;
    align-items: center;
    padding: 0;
  }

  .poster-wrap {
    width: min(94vw, calc((100svh - 96px) * 11 / 17), 430px);
    min-width: 0;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.34));
  }

  .panel {
    width: min(100%, 640px);
    justify-self: center;
    align-self: stretch;
    max-height: none;
    overflow: visible;
    padding: 9px;
    border-radius: 5px;
  }

  .panel-head {
    top: 0;
    margin: -9px -9px 7px;
    padding: 8px 9px;
    backdrop-filter: blur(8px);
  }

  h1 {
    max-width: 18ch;
    font-size: 11px;
    line-height: 1.08;
  }

  .primary {
    min-width: 104px;
    min-height: 36px;
  }

  .actions {
    position: sticky;
    top: 45px;
    z-index: 3;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 0 -1px 9px;
    padding: 6px 1px 8px;
    background: linear-gradient(180deg, rgba(20, 18, 12, 0.98), rgba(20, 18, 12, 0.88));
    backdrop-filter: blur(8px);
  }

  .actions button {
    min-height: 31px;
    padding: 0 2px;
    font-size: 9px;
  }

  .controls {
    gap: 8px;
  }

  .paper-colors {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .swatch {
    min-height: 34px;
  }

  input {
    min-height: 34px;
    font-size: 16px;
    padding: 7px 9px;
  }

  label,
  .paper-colors legend,
  .line-tools span {
    font-size: 10px;
  }

  .line-tools {
    grid-template-columns: minmax(92px, 1fr) 36px 62px 36px;
  }

  .line-tools button {
    min-height: 34px;
    font-size: 15px;
  }
}

@media (max-width: 460px) {
  .two {
    grid-template-columns: 1fr;
  }

  .poster-wrap {
    width: min(94vw, calc((100svh - 88px) * 11 / 17), 390px);
  }

  .panel-head {
    gap: 8px;
  }

  .controls,
  .controls > label:nth-of-type(1),
  .controls > label:nth-of-type(2),
  .controls > label:nth-of-type(3),
  .controls > label:nth-of-type(4),
  .controls > label:nth-of-type(5),
  .controls > label:nth-of-type(6),
  .controls > label:nth-of-type(7),
  .controls > .line-tools,
  .details-panel {
    grid-column: 1 / -1;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .actions {
    top: 50px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .line-tools {
    grid-template-columns: minmax(96px, 1fr) 42px 66px 42px;
  }
}





