/* taste-card page. No external fonts, images or requests. Two card styles
   (editorial poster, field notes) share the markup and differ in structure. */
:root {
  --bg: #faf8f3;
  --ink: #1f1b16;
  --muted: #4d453b;
  --line: #6b6256;
  --panel: #ffffff;
  --accent: #1d4f4a;
  --accent-ink: #ffffff;
  --danger: #a01515;
  --focus: #0b57d0;
  --disabled-bg: #e4dfd3;
  --disabled-ink: #5a5246;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3, p, ul, ol { margin: 0; }
h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 1.35rem; line-height: 1.25; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; line-height: 1.3; margin-bottom: 0.5rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; background: var(--accent); color: var(--accent-ink); }
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 5; }

.masthead, main, .foot { width: min(100%, 76rem); margin: 0 auto; padding: 1rem; }
.masthead { padding-top: 1.5rem; display: grid; gap: 0.6rem; }
.kicker { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.badge { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 0.7rem; border-radius: 0.9rem; background: var(--accent); color: var(--accent-ink); font-size: 0.9rem; font-weight: 600; }
.badge.demo { background: #7a4e00; }
.demo-note, .needs-js { padding: 0.75rem 1rem; border: 2px solid var(--line); border-radius: 0.5rem; background: #fff; overflow-wrap: anywhere; }
.needs-js { margin-bottom: 1rem; }
.small { font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.hint { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0.75rem; overflow-wrap: anywhere; }
.foot { color: var(--muted); font-size: 0.9rem; }

/* ---- layout */
.layout { display: grid; gap: 1.5rem; }
.col { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
@media (min-width: 62rem) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; }
}
@media (min-width: 62rem) and (min-height: 52rem) {
  .col-preview { position: sticky; top: 1rem; align-self: start; }
}
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 0.6rem; padding: 1rem; min-width: 0; }

/* ---- controls */
button, input, textarea { font: inherit; color: inherit; }
button {
  min-height: 44px; min-width: 44px; padding: 0.5rem 1rem; border: 2px solid var(--ink); border-radius: 0.4rem;
  background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; transition: background-color 0.15s;
}
button:hover:not(:disabled) { background: #e6e0d2; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover:not(:disabled) { background: #123733; }
button:disabled { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-ink); cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.field { display: grid; gap: 0.25rem; margin-bottom: 0.75rem; min-width: 0; }
.field label, legend, .file span { font-weight: 600; overflow-wrap: anywhere; }
input[type=text], textarea { width: 100%; min-width: 0; min-height: 44px; padding: 0.5rem 0.65rem; border: 2px solid var(--line); border-radius: 0.4rem; background: #fff; }
textarea { resize: vertical; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); }
.count { justify-self: end; font-size: 0.85rem; color: var(--muted); }
.field-error { color: var(--danger); font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.field-error:empty, .small:empty { display: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.styles, .add { display: grid; gap: 0.25rem; }
.add { margin-top: 1rem; padding-top: 1rem; border-top: 2px dashed var(--line); }
legend { padding: 0; margin-bottom: 0.25rem; }
.choice { display: flex; align-items: center; gap: 0.75rem; min-height: 48px; padding: 0.25rem 0.25rem; cursor: pointer; overflow-wrap: anywhere; }
.choice input { flex: none; width: 1.5rem; height: 1.5rem; accent-color: var(--accent); }
.file { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; min-height: 44px; padding: 0.25rem 0; }
.file input { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; }
summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.text-version textarea { font: 0.9rem/1.4 ui-monospace, Menlo, Consolas, monospace; }
.pool, .picks-list { list-style: none; padding: 0; display: grid; gap: 0.25rem; }
.picks-list { gap: 0.75rem; }
.pick-edit { border: 2px solid var(--line); border-radius: 0.5rem; padding: 0.75rem; background: #fdfcf9; min-width: 0; }
.pick-place { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 0.5rem; }
.pick-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- the card: shared */
#card-preview, .fallback { min-width: 0; }
.card { position: relative; min-width: 0; overflow-wrap: anywhere; }
.card-picks { list-style: none; margin: 0; padding: 0; }
.card-title { margin: 0; overflow-wrap: anywhere; }
.card-empty, .card-blocked { padding: 1.5rem 1rem; border: 2px dashed var(--line); border-radius: 0.5rem; background: #fff; color: var(--ink); font-weight: 600; }
.card-blocked { border-color: var(--danger); color: var(--danger); }
.pick { min-width: 0; }
.pick-image { display: block; max-width: 100%; height: auto; }
.pick-label, .pick-reason { display: block; overflow-wrap: anywhere; }
.pick-text { display: block; min-width: 0; }

/* ---- the card: editorial poster */
.style-editorial { background: #f5efe3; color: #1c1814; border: 3px solid #1c1814; padding: 1.5rem; font-family: Georgia, "Times New Roman", serif; }
.style-editorial .card-head { border-bottom: 6px solid #a63d1e; padding-bottom: 0.9rem; margin-bottom: 1.25rem; }
.style-editorial .card-title { font-size: clamp(1.7rem, 7vw, 2.6rem); line-height: 1.08; letter-spacing: -0.01em; }
.style-editorial .card-name { margin-top: 0.5rem; font-style: italic; color: #4a4238; }
.style-editorial .card-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 1.5rem 1.5rem; }
.style-editorial .pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 0.6rem; border-top: 2px solid #1c1814; padding-top: 0.75rem; }
.style-editorial .pick-text { grid-column: 1; grid-row: 1; }
.style-editorial .pick-image { grid-column: 2; grid-row: 1; width: 3.5rem; height: 3.5rem; object-fit: contain; background: #e8dfcc; }
.style-editorial .pick-label { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.style-editorial .pick-reason { margin-top: 0.25rem; font: 0.95rem/1.35 system-ui, "Helvetica Neue", Arial, sans-serif; color: #4a4238; }

/* ---- the card: field notes */
.style-field-notes { background: #fbf6e6; color: #1f2a24; border: 2px solid #2f6b4f; border-top-width: 14px; border-radius: 0.25rem; padding: 1.25rem 1rem 1rem 1.25rem; font-family: system-ui, "Helvetica Neue", Arial, sans-serif; }
.style-field-notes .card-title { font: 700 clamp(1.3rem, 5.5vw, 1.9rem)/1.2 ui-monospace, Menlo, Consolas, monospace; padding-bottom: 0.5rem; border-bottom: 3px solid #2f6b4f; }
.style-field-notes .card-name { margin-top: 0.5rem; font: 0.95rem ui-monospace, Menlo, Consolas, monospace; color: #41503f; }
.style-field-notes .card-picks { display: flex; flex-direction: column; margin-top: 0.75rem; }
.style-field-notes .pick { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.8rem 0; border-bottom: 2px solid #c9c3a8; }
.style-field-notes .pick::before { content: ""; flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.3rem; background: #2f6b4f; }
.style-field-notes .pick-image { flex: none; width: 5rem; height: 5rem; object-fit: contain; background: #e3eed9; border: 2px solid #2f6b4f; }
.style-field-notes .pick-label { font-size: 1.05rem; font-weight: 700; }
.style-field-notes .pick-reason { margin-top: 0.15rem; font: italic 0.95rem/1.4 Georgia, "Times New Roman", serif; color: #41503f; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
