/* The illustrated themes share the page geometry in site.css. */
html[data-theme="diner"] {
  color-scheme: dark;
  --bg: #251b1e;
  --surface: #35272a;
  --ink: #fff0da;
  --muted: #d4b8ab;
  --rule: #95776d;
  --amber: #ffa4a1;
  --secondary: #f0bd82;
  --warning: #ffb18a;
  --action: #a42542;
  --action-ink: #fff5e5;
  --action-hover: #bd304b;
  --action-edge: #ff999a;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --display-weight: 700;
  --title-size: clamp(3.1rem, 8.6vw, 5.4rem);
  --panorama: url("diner.svg");
  --shadow: #160f12;
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

html[data-theme="printshop"] {
  color-scheme: light;
  --bg: #f2ead9;
  --surface: #fff9e9;
  --ink: #252230;
  --muted: #5e574e;
  --rule: #837959;
  --amber: #253a93;
  --secondary: #a13a20;
  --warning: #9f3021;
  --action: var(--amber);
  --action-ink: #fff9e9;
  --action-hover: #192965;
  --action-edge: var(--action);
  --display: "Archivo Black", system-ui, sans-serif;
  --display-weight: 400;
  --title-size: clamp(2.3rem, 6.7vw, 4.25rem);
  --panorama: url("printshop.svg");
  --shadow: #d6b187;
  font-family: "Work Sans", system-ui, sans-serif;
}

html[data-theme="tidepool"] {
  color-scheme: dark;
  --bg: #102a2d;
  --surface: #19373a;
  --ink: #f2e9d3;
  --muted: #b8ccc0;
  --rule: #719590;
  --amber: #a9dfc9;
  --secondary: #e3bf91;
  --warning: #f4b7a2;
  --action: var(--amber);
  --action-ink: #133331;
  --action-hover: #c4ecd7;
  --action-edge: var(--action);
  --display: "Instrument Serif", Georgia, serif;
  --display-weight: 400;
  --title-size: clamp(3.1rem, 8.6vw, 5.55rem);
  --panorama: url("tidepool.svg");
  --shadow: #0b2023;
  font-family: "DM Sans", system-ui, sans-serif;
}

html[data-theme="pnwcafe"] {
  color-scheme: light;
  --bg: #eee9dc;
  --surface: #fcf7eb;
  --ink: #352b25;
  --muted: #63594c;
  --rule: #857966;
  --amber: #235847;
  --secondary: #954c2d;
  --warning: #983e2d;
  --action: var(--amber);
  --action-ink: #fff8ed;
  --action-hover: #194535;
  --action-edge: var(--action);
  --display: "Neuton", Georgia, serif;
  --display-weight: 700;
  --title-size: clamp(2.8rem, 8.1vw, 5.15rem);
  --panorama: url("pnwcafe.svg");
  --panorama-position: 52% center;
  --shadow: #d8c6ae;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

html:is([data-theme="diner"], [data-theme="printshop"], [data-theme="tidepool"], [data-theme="pnwcafe"], [data-theme="gainfresh"], [data-theme="sbb"]) {
  & .brand { --brand-twilight: var(--secondary); }
  & :is(h1, h2, h3) { font-family: var(--display); font-weight: var(--display-weight); }
  & h1 { font-size: var(--title-size); letter-spacing: -.025em; line-height: 1.05; }
  & .admin-section h2 { font-size: 1.55rem; line-height: 1.18; }
  & a { text-underline-offset: .18em; }
  & textarea::placeholder { color: var(--muted); }
  & :is(.notice, .bytes[data-over="true"]) { color: var(--warning); }
  & [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--warning); }
  & button, & .viewer-new { border-color: var(--rule); }
  & button:hover, & .viewer-new:hover { border-color: var(--amber); }
  & button.primary { background: var(--action); color: var(--action-ink); border-color: var(--action-edge); }
  & button.primary:hover { background: var(--action-hover); }
  & button:disabled { opacity: 1; color: var(--muted); border-color: var(--rule); background: var(--surface); }
  & button.primary:disabled { color: var(--action-ink); background: var(--action); border-style: dashed; }
  & ::selection { color: var(--action-ink); background: var(--action); }
}

@media (max-width: 22.5rem) {
  html:is([data-theme="printshop"], [data-theme="tidepool"]) { --wordmark-size: clamp(1.35rem, 8.65vw, 2.8rem); }
}

/* A double pinstripe echoes the piping on the booth. */
html[data-theme="diner"] {
  & .editor { border-top: 4px double var(--amber); box-shadow: 0 3px 0 var(--shadow); }
  & .editor-heading, & .paste-list th { background: #412c31; }
  & .editor-heading { border-radius: .5rem .5rem 0 0; }
  & .editor-actions { border-top-style: double; border-top-width: 3px; }
  & button, & .viewer-new { border-radius: .6rem; }
}

/* Hard paper edges, a perforation, and a small offset of persimmon ink. */
html[data-theme="printshop"] {
  & .editor { border: 2px solid var(--ink); border-radius: 0; box-shadow: 3px 3px var(--secondary); }
  & .editor-heading { border-bottom: 1px dashed var(--ink); }
  & .admin-section { border-top: 2px solid var(--amber); }
  & :is(button, .viewer-new, .theme-picker select, .share-input) { border-radius: 0; }
  & .paste-list th { border-bottom: 2px solid var(--ink); }
}

/* A soft edge and a narrow sea-glass rim keep the text surface quiet. */
html[data-theme="tidepool"] {
  & .editor { border-radius: 1rem; box-shadow: 0 3px 0 var(--shadow); }
  & .editor-heading { background: #234344; border-radius: .95rem .95rem 0 0; }
  & button, & .viewer-new { border-radius: 1.5rem; }
}

/* Copper accents frame the café's oat-milk paper and spruce controls. */
html[data-theme="pnwcafe"] {
  & .editor { border-top: 3px solid var(--secondary); border-radius: .45rem; box-shadow: 0 3px 0 var(--shadow); }
  & .editor-heading { background: #f2ebdb; border-radius: .25rem .25rem 0 0; }
  & .admin-section { border-top-color: var(--secondary); }
  & .paste-list th { border-bottom: 2px solid var(--secondary); }
}

html[data-theme="diner"] { --theme-mark: url("mark-diner.svg"); }
html[data-theme="printshop"] { --theme-mark: url("mark-printshop.svg"); }
html[data-theme="tidepool"] { --theme-mark: url("mark-tidepool.svg"); }
html[data-theme="pnwcafe"] { --theme-mark: url("mark-pnwcafe.svg"); }

html[data-theme="gainfresh"] {
  color-scheme: light;
  --bg: #edf4d9;
  --surface: #fcffe9;
  --ink: #1d452e;
  --muted: #4b6448;
  --rule: #7d9a56;
  --amber: #256c36;
  --secondary: #ab4928;
  --warning: #a43e2b;
  --action: #286d3b;
  --action-ink: #fff9d8;
  --action-hover: #174d2b;
  --action-edge: var(--action);
  --display: "Baloo 2", "Work Sans", system-ui, sans-serif;
  --display-weight: 800;
  --title-size: clamp(2.45rem, 7.4vw, 4.85rem);
  --wordmark-size: clamp(1.32rem, 7.8vw, 2.8rem);
  --panorama: url("gainfresh.jpg");
  --panorama-position: 57% center;
  --theme-mark: url("mark-gainfresh.svg");
  --shadow: #bdce89;
  --mono: var(--display);
  font-family: var(--display);

  & .brand-words {
    display: inline-block;
    padding-inline-end: .09em;
    font-family: var(--display);
    font-weight: var(--display-weight);
    color: #2f7525;
  }
  & .brand-words .accent { color: #f0bf17; -webkit-text-stroke: .9px #715100; paint-order: stroke fill; }
  & .brand-words .brand-dark { color: #b53720; -webkit-text-stroke: 0; }
  & .row-feedback { font-family: var(--display); }
  & .mast::after { aspect-ratio: 3 / 1; }
  & .editor { border-radius: .9rem; box-shadow: 0 3px 0 var(--shadow); }
  & .editor-heading { background: #e5edbc; }
  & :is(button, .viewer-new, .theme-picker select, .share-input) { border-radius: .65rem; }
}
html:is([data-theme="diner"], [data-theme="printshop"], [data-theme="tidepool"], [data-theme="pnwcafe"], [data-theme="gainfresh"], [data-theme="sbb"]) .mark {
  background-image: var(--theme-mark);
}

/* Keep the panorama legible without taking over a narrow screen. */
@media (max-width: 40rem) {
  html[data-theme="gainfresh"] .mast::after { min-height: 7.25rem; aspect-ratio: 3 / 1; }
}

@font-face {
  font-family: "Midnight Peel";
  src: url("fonts/midnight-peel.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

html[data-theme="sbb"] {
  color-scheme: dark;
  --bg: #301c32;
  --surface: #442e43;
  --ink: #fff0ce;
  --muted: #e0cdb9;
  --rule: #aa8f7f;
  --amber: #ffd075;
  --secondary: #ff9879;
  --warning: #ffb995;
  --action: #ffcf74;
  --action-ink: #331f32;
  --action-hover: #ffdfa0;
  --action-edge: var(--action);
  --display: "Midnight Peel", "Neuton", Georgia, serif;
  --display-weight: 700;
  --title-size: clamp(2.75rem, 8.2vw, 5.15rem);
  --wordmark-size: clamp(1.55rem, 8.6vw, 3rem);
  --panorama: url("sbb-panorama.webp");
  --theme-mark: url("sbb-critter.webp");
  --shadow: #211423;
  font-family: "Work Sans", system-ui, sans-serif;

  & .brand-words {
    font-family: var(--display);
    font-weight: var(--display-weight);
    letter-spacing: -.045em;
    text-shadow: 1px 2px #782f39;
  }
  & .mast::after {
    aspect-ratio: 2172 / 428;
    border-color: #c59352;
  }
  & h1 {
    color: var(--amber);
    letter-spacing: -.04em;
    text-shadow: 1px 2px #963e44;
  }
  & .editor {
    color-scheme: light;
    --surface: #fff1d4;
    --ink: #321f32;
    --muted: #66534c;
    --rule: #92765d;
    --amber: #713048;
    --warning: #922b39;
    --action: #425638;
    --action-ink: #fff4d8;
    --action-hover: #30452b;
    --action-edge: var(--action);
    color: var(--ink);
    border-radius: .3rem;
    box-shadow: 2px 3px #9c4d43;
  }
  & .editor-heading { border-bottom-style: dashed; }
  & .paste-body:focus-visible { outline-offset: -3px; }
}

@media (max-width: 40rem) {
  html[data-theme="sbb"] .mast::after {
    aspect-ratio: 3.3 / 1;
    background-position: 75% center;
  }
}
