@font-face { font-family: "Archivo Black"; src: url("../fonts/ArchivoBlack-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-VariableFont_wght.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/InterTight-VariableFont_wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-VariableFont_wght.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --navy: #243E4B;
  --navy-2: #1A2E38;
  --red: #EB303F;
  --sky: #6EABC7;
  --butter: #F1E88F;
  --paper: #FBFAF4;
  --white: #FFFFFF;
  --line: rgba(36, 62, 75, .16);
  --muted: #5B6F79;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --head: "Space Grotesk", "Inter Tight", system-ui, sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ---------- header ---------- */
.top {
  max-width: 880px; margin: 0 auto; padding: 22px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--display); font-size: 15px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.brand-name small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); margin-top: 5px; text-transform: uppercase; }
.store-link {
  font-family: var(--head); font-weight: 600; font-size: 14px; text-decoration: none;
  padding: 8px 12px; border: 1.5px solid var(--navy); border-radius: 999px; white-space: nowrap;
}
.store-link:hover { background: var(--navy); color: var(--white); }

/* ---------- main ---------- */
main { max-width: 880px; margin: 0 auto; padding: 24px 24px 60px; }

.intro { text-align: center; margin: 18px auto 26px; max-width: 560px; }
.intro h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(30px, 6.4vw, 54px); line-height: .95; margin: 0; letter-spacing: -.01em;
}
.intro h1 em { font-style: normal; color: var(--red); }
.intro p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.sheet {
  background: var(--white);
  border: 1.5px solid var(--navy);
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--navy);
  position: relative;
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1.5px solid var(--navy);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.sheet-head .num { font-weight: 700; }
.sheet-head .num b { color: var(--red); }
.sheet-head .date { color: var(--muted); }
.strip { display: none; }
.strip i { flex: 1; }

.rows { list-style: none; margin: 0; padding: 8px 22px 14px; }
.row {
  display: grid; grid-template-columns: 128px 1fr 44px; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.tag {
  justify-self: start;
  display: inline-block; background: var(--navy); color: var(--white);
  font-family: var(--head); font-weight: 700; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px 5px 10px; transform: skewX(-14deg); white-space: nowrap; transition: background .15s;
}
.tag > span { display: inline-block; transform: skewX(14deg); }
.row.locked .tag { background: var(--red); }

.value {
  appearance: none; background: none; border: 0; padding: 2px 0; margin: 0; text-align: left;
  font-family: var(--head); font-weight: 700; font-size: clamp(21px, 3.6vw, 31px); line-height: 1.12;
  letter-spacing: -.012em; color: var(--navy); position: relative; min-width: 0; overflow-wrap: anywhere;
}
.value .j { color: var(--red); font-weight: 500; padding: 0 .18em; }
.value:hover { color: var(--navy-2); }
.value:hover::after {
  content: "↻"; font-size: .6em; color: var(--sky); margin-left: .35em; vertical-align: .15em;
}
.row.locked .value { cursor: default; }
.row.locked .value:hover::after { content: ""; }
.value.pop { animation: pop .32s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }

.lock {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white);
  display: grid; place-items: center; justify-self: end; transition: border-color .15s, background .15s;
}
.lock svg { width: 18px; height: 18px; }
.lock:hover { border-color: var(--navy); }
.lock[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--white); }

/* palette row */
.row.pal .value { font-size: clamp(19px, 3vw, 24px); }
.swatches { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sw {
  flex: 1 1 0; min-width: 62px; border: 1.5px solid var(--line); border-radius: 4px; padding: 0; background: var(--white);
  overflow: hidden; text-align: left;
}
.sw i { display: block; height: 42px; }
.sw span { display: block; font-family: var(--mono); font-size: 11px; padding: 4px 6px; letter-spacing: .02em; }
.sw:hover { border-color: var(--navy); }
.pal-wrap { min-width: 0; }

/* empty state */
.empty { padding: 28px 0; text-align: center; color: var(--muted); }

/* ---------- actions ---------- */
.gen-wrap { display: flex; justify-content: center; margin: 34px 0 0; }
.actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 14px 0 10px; }
.generate {
  font-family: var(--display); font-size: 22px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--navy); color: var(--white); border: 0; border-radius: 4px;
  padding: 18px 54px; box-shadow: 5px 5px 0 var(--red); transition: transform .08s, box-shadow .08s;
}
.generate:hover { background: var(--navy-2); }
.generate:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--red); }
.kbd-hint { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.kbd-hint kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 1px 5px; background: var(--white); font: inherit; }

.save-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--head); font-weight: 600; font-size: 15px;
  background: var(--white); border: 1.5px solid var(--navy); border-radius: 4px; padding: 10px 16px;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: var(--butter); }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--white); }
.btn.primary:hover { background: #d02634; }

/* ---------- panels ---------- */
.panel { margin-top: 42px; }
.panel h2 {
  font-family: var(--head); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
}
.panel h2::after { content: ""; flex: 1; height: 1.5px; background: var(--navy); }
.panel p.sub { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }

.toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tg {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 4px; padding: 10px 12px;
}
.tg.on { border-color: var(--navy); }
.tg label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 15px; flex: 1; }
.tg input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 34px; height: 20px; border-radius: 999px; background: #D5DADC; position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.tg input:checked + .switch { background: var(--navy); }
.tg input:checked + .switch::after { transform: translateX(14px); }
.tg input:focus-visible + .switch { outline: 3px solid var(--sky); outline-offset: 2px; }
.tg .cnt { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.seg { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 4px; overflow: hidden; flex: none; }
.seg button { border: 0; background: var(--white); padding: 3px 9px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.tg:not(.on) .seg { opacity: .35; }

.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.history li button {
  width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: 4px;
  padding: 10px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
}
.history li button:hover { border-color: var(--navy); }
.history .h-num { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--red); }
.history .h-txt { font-family: var(--head); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history .h-pal { display: flex; }
.history .h-pal i { width: 12px; height: 18px; }
.history-empty { color: var(--muted); font-size: 14px; }

footer.site {
  max-width: 880px; margin: 0 auto; padding: 26px 24px 40px; border-top: 1.5px solid var(--navy);
  display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--muted);
}
footer.site a { color: var(--navy); font-weight: 600; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--navy); color: var(--white); font-family: var(--head); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 4px; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: 3px 3px 0 var(--red);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal.open { display: flex; }
.modal-bg { position: absolute; inset: 0; background: rgba(26, 46, 56, .62); }
.modal-card {
  position: relative; background: var(--paper); border: 1.5px solid var(--navy); border-radius: 4px; box-shadow: 8px 8px 0 var(--red);
  width: min(860px, 100%); max-height: calc(100vh - 36px); overflow: auto;
  display: grid; grid-template-columns: 300px 1fr;
}
.modal-prev { background: var(--navy); padding: 26px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.modal-prev img { width: 100%; height: auto; display: block; border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: rotate(-2deg); }
.modal-prev .cap { font-family: var(--mono); font-size: 11px; color: var(--sky); letter-spacing: .08em; text-transform: uppercase; text-align: center; margin-top: 8px; }
.modal-body { padding: 28px 28px 24px; }
.modal-body h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 26px; line-height: 1; margin: 0 0 10px; }
.modal-body h3 em { font-style: normal; color: var(--red); }
.modal-body p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.modal-x {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--navy); background: var(--white); font-size: 18px; line-height: 1; z-index: 2;
}
.ss-frame { width: 100%; height: 320px; border: 1.5px solid var(--line); border-radius: 4px; background: var(--white); display: block; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-family: var(--head); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--navy); border-radius: 4px; background: var(--white); font-size: 16px;
}
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.45; color: var(--navy); margin: 4px 0 16px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); }
.fine { font-size: 12.5px !important; color: var(--muted); margin-top: 12px !important; }
.gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 16px; }
.gate-actions .btn.primary { padding: 12px 18px; }
.gate-actions .btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--muted); font-size: 14px; }
.err { color: var(--red); font-size: 13px; min-height: 1em; margin: 0 0 6px !important; }
.step { display: flex; gap: 10px; align-items: baseline; font-size: 14px; margin: 0 0 8px; color: var(--navy); }
.step b { font-family: var(--mono); font-size: 11px; background: var(--butter); padding: 2px 6px; border-radius: 3px; flex: none; }

.busy { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; background: rgba(251, 250, 244, .7); font-family: var(--head); font-weight: 700; }
.busy.on { display: grid; }

/* ---------- v2 additions ---------- */
.top-links { display: flex; gap: 8px; align-items: center; }
.store-link.ghost { background: none; border-color: var(--line); }
.store-link.ghost:hover { border-color: var(--navy); background: var(--butter); color: var(--navy); }
.sheet { background: linear-gradient(180deg, var(--wash-a, transparent) 0%, var(--white) 38%, var(--white) 70%, var(--wash-b, transparent) 100%), var(--white); }
.gen-wrap { gap: 12px; align-items: stretch; }
.lock-all {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--navy); border-radius: 4px; background: var(--white);
  font-family: var(--head); font-weight: 700; font-size: 15px; padding: 0 16px; white-space: nowrap;
}
.lock-all svg { width: 18px; height: 18px; }
.lock-all:hover { background: var(--butter); }
.lock-all[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
.btn.dark { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn.dark:hover { background: var(--navy-2); }
.linkish.strong { color: var(--navy); font-weight: 600; font-size: inherit; }
.ss-row { display: flex; gap: 8px; margin: 4px 0 6px; }
.ss-row input { flex: 1; min-width: 0; padding: 12px 14px; border: 1.5px solid var(--navy); border-radius: 4px; background: var(--white); font-size: 16px; }
.ss-alt { margin: 8px 0 0 !important; }
.ss-alt a { color: var(--navy); font-weight: 600; }

.ed-card { display: block; width: min(820px, 100%); padding: 26px 28px 22px; }
.ed-head h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 26px; line-height: 1; margin: 0 0 8px; }
.ed-head h3 em { font-style: normal; color: var(--red); }
.ed-head p { margin: 0 0 16px; color: var(--muted); font-size: 14px; max-width: 620px; }
.ed-head code { font-family: var(--mono); font-size: 12.5px; background: var(--white); border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; }
.ed-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ed-tab {
  display: inline-flex; align-items: center; gap: 7px; position: relative;
  border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 12px;
  font-family: var(--head); font-weight: 600; font-size: 14px;
}
.ed-tab:hover { border-color: var(--navy); }
.ed-tab[aria-selected="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ed-n { font-family: var(--mono); font-size: 11px; opacity: .7; }
.ed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; }
.ed-label { display: block; font-family: var(--head); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
#edText {
  width: 100%; height: 320px; resize: vertical; padding: 12px 14px; border: 1.5px solid var(--navy); border-radius: 4px;
  background: var(--white); font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: var(--navy); white-space: pre; overflow: auto;
}
.ed-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; font-size: 13px; color: var(--muted); }
.ed-small { display: flex; gap: 14px; }
.ed-small .linkish { font-size: 13px; }
.ed-foot { display: flex; flex-wrap: wrap; gap: 10px; }
.ed-foot .btn.dark { margin-left: auto; }
.file-btn { cursor: pointer; position: relative; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ---------- privacy page ---------- */
footer.site a.foot-legal { color: var(--muted); font-weight: 500; }
.legal { max-width: 720px; }
.legal h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 6vw, 46px); line-height: 1; margin: 18px 0 8px; }
.legal h1 em { font-style: normal; color: var(--red); }
.legal .updated { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 0 0 22px; }
.legal .tldr { background: var(--white); border: 1.5px solid var(--navy); border-radius: 4px; box-shadow: 5px 5px 0 var(--navy); padding: 16px 20px; margin: 0 0 30px; }
.legal .tldr ul { margin: 6px 0 0; padding-left: 20px; }
.legal h2 { font-family: var(--head); font-size: 20px; font-weight: 700; margin: 30px 0 8px; }
.legal p, .legal li { font-size: 16px; }
.legal li { margin-bottom: 4px; }
.legal a { color: var(--navy); font-weight: 600; }
.legal .ph { font-family: var(--mono); font-size: .9em; background: var(--butter); padding: 1px 5px; border-radius: 3px; }
.legal code { font-family: var(--mono); font-size: .88em; background: var(--white); border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; }
.legal .back { display: inline-block; margin-top: 34px; }

/* ---------- desktop: everything on one screen ---------- */
@media (min-width: 1000px) {
  .top, main, footer.site { max-width: 1140px; }
  .top { padding-top: 14px; }
  main { padding-top: 6px; }
  .intro { margin: 4px auto 14px; max-width: none; }
  .intro h1 { font-size: 34px; }
  .intro p { margin-top: 6px; font-size: 14.5px; }
  .sheet-head { padding: 9px 22px; }
  .rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; padding: 2px 22px 6px; }
  .row { grid-template-columns: 112px 1fr 34px; gap: 12px; padding: 8px 0; min-height: 58px; }
  .row:nth-last-child(2):not(.pal) { border-bottom: 1px solid var(--line); }
  .value { font-size: clamp(18px, 1.55vw, 23px); }
  .lock { width: 34px; height: 34px; }
  .lock svg { width: 16px; height: 16px; }
  .row.pal { grid-column: 1 / -1; border-bottom: 0; }
  .row.pal .pal-wrap { display: flex; align-items: center; gap: 18px; }
  .row.pal .value { font-size: 20px; flex: none; min-width: 150px; }
  .row.pal .swatches { margin-top: 0; flex: 1; flex-wrap: nowrap; }
  .row.pal .sw { display: flex; align-items: stretch; }
  .row.pal .sw i { height: auto; width: 34px; flex: none; }
  .row.pal .sw span { padding: 7px 8px; font-size: 11.5px; }
  .gen-wrap { margin-top: 18px; }
  .generate { font-size: 20px; padding: 14px 48px; }
  .actions { margin-top: 10px; }
  .save-bar { margin-top: 2px; }
}
@media (min-width: 1000px) and (max-height: 800px) {
  .intro p { display: none; }
  .intro { margin-bottom: 10px; }
  .intro h1 { font-size: 30px; }
  .row { min-height: 52px; padding: 6px 0; }
  .gen-wrap { margin-top: 14px; }
  .generate { padding: 12px 44px; }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .top { padding: 16px 16px 0; }
  .store-link { font-size: 13px; padding: 7px 10px; }
  main { padding: 14px 14px 40px; }
  .intro { margin: 10px auto 20px; }
  .intro p { font-size: 15px; }
  .sheet { box-shadow: 5px 5px 0 var(--navy); }
  .sheet-head { padding: 12px 14px; font-size: 11px; }
  .rows { padding: 4px 14px 10px; }
  .row { grid-template-columns: 1fr 34px; grid-template-areas: "tag lock" "val val"; gap: 4px 10px; padding: 10px 0; }
  .row .tag { grid-area: tag; }
  .row .lock { grid-area: lock; width: 34px; height: 34px; }
  .row .lock svg { width: 16px; height: 16px; }
  .tag { font-size: 10.5px; padding: 4px 10px 4px 9px; }
  .row .value, .row .pal-wrap { grid-area: val; }
  .value { font-size: 21px; }
  .gen-wrap { position: sticky; bottom: 12px; z-index: 5; margin-top: 22px; gap: 8px; }
  .gen-wrap .generate { flex: 1; width: auto; }
  .lock-all { padding: 0 12px; font-size: 13px; box-shadow: 3px 3px 0 var(--navy); }
  .lock-all span { max-width: 52px; white-space: normal; line-height: 1.1; text-align: left; }
  .top-links .ghost { display: none; }
  .ss-row { flex-direction: column; }
  .ed-card { padding: 18px 16px 16px; }
  .ed-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; }
  .ed-tab { flex: none; }
  #edText { height: 46vh; font-size: 13px; }
  .ed-foot .btn { flex: 1 1 45%; justify-content: center; }
  .ed-foot .btn.dark { margin-left: 0; }
  .sw { min-width: 0; }
  .sw i { height: 34px; }
  .sw span { font-size: 9.5px; padding: 4px 4px; }
  .generate { width: 100%; padding: 17px 20px; }
  .save-bar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .save-bar .btn { justify-content: center; }
  .save-bar .btn.wide { grid-column: 1 / -1; }
  .toggles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tg .cnt { display: none; }
  .tg { padding: 9px 10px; flex-wrap: wrap; }
  .tg label { font-size: 14px; gap: 8px; }
  .modal { padding: 10px; align-items: flex-start; }
  .modal-card { grid-template-columns: 1fr; max-height: calc(100vh - 20px); box-shadow: 4px 4px 0 var(--red); width: calc(100% - 4px); }
  .ss-frame { height: 300px; }
  .gate-actions .btn { width: 100%; justify-content: center; }
  .modal-prev { padding: 18px 18px 8px; flex-direction: row; align-items: center; }
  .modal-prev img { width: 110px; flex: none; }
  .modal-prev .cap { text-align: left; }
  .modal-body { padding: 18px 18px 20px; }
  .modal-body h3 { font-size: 22px; padding-right: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
