:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #30362f;
  background: #f5f3ed;
}

* { box-sizing: border-box; }
body { margin: 0; padding: 36px clamp(16px, 4vw, 64px) 20px; }
button, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, select, textarea { font: inherit; color: inherit; }
button, a, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid #a34832; outline-offset: 4px; }
[hidden] { display: none !important; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font: normal clamp(28px, 3vw, 42px)/1.15 Georgia, serif; letter-spacing: -.035em; }
.intro { color: #656b61; font-size: 13px; margin: 12px 0 0; }
.asset-link { font-size: 12px; white-space: nowrap; }
.ideas { display: flex; gap: 12px; margin-bottom: 20px; overflow-x: auto; padding: 6px 4px 12px; }
.idea { display: flex; flex: 0 0 230px; align-items: center; text-align: left; gap: 16px; padding: 12px; border: 1px solid #d6d8cf; border-radius: 12px; background: transparent; }
.idea[aria-selected="true"] { background: #e6ebdf; border-color: #52654b; box-shadow: inset 0 0 0 1px #52654b; }
.idea:hover { background: #edf0e7; }
.idea img { width: 48px; height: 64px; object-fit: cover; border-radius: 5px; }
.idea span span, .idea strong { display: block; }
.idea-number { color: #5f6859; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.idea strong { margin: 5px 0; font: normal 21px Georgia, serif; }
.idea-note { color: #636b5d; font-size: 11px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; }
.size-control, .actions { display: flex; align-items: center; gap: 16px; }
select, .actions button, #exit-fullscreen { border: 1px solid #ccd0c5; border-radius: 6px; background: #fffef9; padding: 9px 12px; min-height: 40px; }
.actions a { padding: 10px 0; }
.stage { display: grid; place-items: start center; padding: 20px; background: #e4e5de; border: 1px solid #d3d5ca; border-radius: 12px; overflow: hidden; }
.preview-space { position: relative; width: 100%; height: 680px; background: #e8dcc0; box-shadow: 0 5px 24px #30362f18; }
iframe { display: block; border: 0; width: 100%; height: 100%; transform-origin: top left; background: #e8dcc0; }
.caption { display: flex; justify-content: space-between; gap: 12px; color: #656b61; font-size: 11px; }
#notice { font-size: 12px; }
#notice:empty { display: none; }
#exit-fullscreen { display: none; }
.stage:fullscreen { padding: 0; border: 0; border-radius: 0; width: 100%; height: 100%; }
.stage:fullscreen #exit-fullscreen { display: block; position: absolute; top: 16px; right: 16px; z-index: 1; box-shadow: 0 2px 12px #0002; }
.skip-link { position: absolute; top: 0; left: 20px; transform: translateY(-140%); padding: 12px; background: white; z-index: 10; }
.skip-link:focus { transform: none; }
.collection-controls { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 14px; }
.view-control { display: inline-flex; align-self: end; padding: 3px; border: 1px solid #ccd0c5; border-radius: 8px; background: #ebe9e2; }
.view-option { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; }
.view-control .view-option[aria-pressed="true"] { background: #fffef9; box-shadow: 0 1px 4px #30362f18; }
.view-option span { margin-left: 5px; color: #687064; font-variant-numeric: tabular-nums; }
.jump-control { display: grid; gap: 8px; font-size: 13px; }
.jump-control select { width: min(340px, 100%); }
.idea-navigation { display: flex; gap: 14px; align-items: center; font-size: 12px; }
.idea-navigation button { padding: 10px 12px; min-height: 44px; border: 1px solid #ccd0c5; border-radius: 6px; background: #fffef9; }
.idea-navigation button:hover, .actions button:hover { background: #e6ebdf; }
#idea-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.design-details { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(420px, 1.4fr); gap: clamp(28px, 5vw, 72px); margin: 4px 0 22px; padding: 20px 0; border-block: 1px solid #d6d8cf; }
.design-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.design-details h2 { margin: 0 0 10px; font: normal 28px Georgia, serif; text-wrap: balance; }
.design-story p { margin: 8px 0; max-width: 65ch; font-size: 13px; line-height: 1.6; }
#design-tradeoff { color: #606756; font-size: 12px; }
.design-feedback { display: grid; gap: 15px; font-size: 12px; }
.feedback-intro { margin: 0; color: #4f594b; font-size: 12px; }
.preference-group { display: grid; grid-template-columns: 86px 1fr; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.preference-group legend { float: left; width: 86px; padding: 5px 0 0; color: #606756; }
.preference-group > div { display: flex; flex-wrap: wrap; gap: 7px 12px; min-width: 0; }
.preference-option { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; }
.preference-option input { width: 18px; height: 18px; margin: 0; accent-color: #52654b; }
.preference-option label { cursor: pointer; }
.preference-option a { font-size: 11px; color: #5f6859; }
.palette-label { display: inline-flex; align-items: center; gap: 6px; }
.palette-color { display: inline-block; width: 16px; height: 16px; border: 1px solid #7e8478; border-radius: 50%; }
.notes-field { display: grid; gap: 7px; margin-top: 2px; }
.notes-field label { color: #606756; }
textarea { width: 100%; resize: vertical; min-height: 88px; padding: 10px 12px; border: 1px solid #bcc2b6; border-radius: 6px; background: #fffef9; line-height: 1.5; }
.feedback-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
#feedback-status { min-height: 1.4em; margin: 0; color: #606756; font-size: 11px; }
#export-feedback, #archive-idea { flex: 0 0 auto; min-height: 40px; padding: 8px 11px; border: 1px solid #ccd0c5; border-radius: 6px; background: #fffef9; font-size: 11px; }
#archive-idea:hover, #export-feedback:hover, .view-option:hover { background: #e6ebdf; }
.empty-view { margin: 12px 0 22px; padding: 28px; border: 1px dashed #b7bcae; border-radius: 10px; text-align: center; }
.empty-view p { margin: 4px auto 10px; max-width: 50ch; color: #606756; font-size: 13px; }
#preview-panel { scroll-margin-top: 16px; }

@media (max-width: 600px) {
  body { padding-top: 24px; }
  .masthead { align-items: start; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .ideas { gap: 8px; }
  .idea { min-width: 0; flex: 0 0 180px; padding: 12px; gap: 10px; }
  .idea img { display: none; }
  .idea strong { font-size: 19px; }
  .idea-note { font-size: 10px; }
  .idea-number { font-size: 8px; }
  .toolbar { gap: 8px; }
  .actions { width: 100%; justify-content: space-between; }
  .stage { padding: 8px; }
  .caption { flex-direction: column; gap: 0; }
  .caption p { margin-bottom: 0; }
  .design-details { grid-template-columns: 1fr; gap: 18px; }
  .collection-controls { grid-template-columns: 1fr; align-items: stretch; }
  .view-control { width: 100%; }
  .view-control .view-option { flex: 1; }
  .jump-control, .jump-control select { width: 100%; }
  .idea-navigation { width: 100%; justify-content: space-between; }
  .preference-group { grid-template-columns: 1fr; gap: 4px; }
  .preference-group legend { float: none; width: auto; }
  .feedback-footer { align-items: start; flex-direction: column; }
  #export-feedback { width: 100%; }
}
