/* Scoped layout for the browse, studio, and Memory journeys. */
.studio-page .workspace { max-width: 1180px; }
.studio-page .preview-toolbar { display: flex; justify-content: space-between; align-items: center; width: min(100%, 440px); margin: 0 auto 12px; font-size: 14px; }
.studio-page .icon-button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: #e7ebea; background: none; border: 1px solid #55605c; border-radius: 6px; cursor: pointer; }
.studio-page .icon-button[aria-pressed=true] { color: #16191c; background: #b9edc8; }
.studio-page svg { width: 20px; height: 20px; }
.studio-page .template-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-top: 10px; }
.studio-page .template-choice { min-width: 0; display: grid; grid-template-rows: auto 40px; align-content: start; gap: 6px; padding: 3px; border: 2px solid transparent; border-radius: 6px; text-align: left; color: #dce4df; background: transparent; cursor: pointer; }
.studio-page .template-choice[aria-pressed=true] { border-color: #b9edc8; }
.studio-page .template-choice canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 3px; }
.studio-page .template-choice span { padding: 0 2px; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.studio-page :is(button, select, input, textarea, summary):focus-visible { outline: 2px solid #efd374; outline-offset: 3px; }
.studio-page .panel-block { margin-top: 18px; }
.studio-page .panel-block:first-child { margin-top: 0; }
.studio-page textarea { width: 100%; min-height: 72px; resize: vertical; line-height: 1.5; }
.studio-page select { width: 100%; min-height: 42px; padding: 8px; background: #22272b; color: #f3f5f4; border: 1px solid #515a61; border-radius: 6px; }
.studio-page .segmented-control { display: flex; border: 1px solid #515a61; border-radius: 6px; overflow: hidden; }
.studio-page .segmented-control button { flex: 1; min-height: 42px; min-width: 0; border: 0; background: #22272b; color: #e7ebea; cursor: pointer; }
.studio-page .segmented-control button[aria-pressed=true] { background: #b9edc8; color: #172a21; }
.studio-page .output-toggles { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 0; font-size: 13px; }
.studio-page input[type=checkbox] { accent-color: #b9edc8; width: 16px; height: 16px; vertical-align: middle; }
.studio-page .photo-composition { display: grid; gap: 6px; margin: 12px 0; font-size: 12px; color: #c2ccc7; }
.studio-page .photo-composition label { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 36px; }
.studio-page input[type=range] { width: 100%; accent-color: #b9edc8; }
.studio-page .draft-settings { border-top: 1px solid #3b4146; padding: 16px 0; margin-top: 14px; font-size: 13px; }
.studio-page .draft-settings summary { cursor: pointer; margin-bottom: 12px; }
.studio-page .draft-prompt { padding: 12px 0; border-bottom: 1px solid #64786a; font-size: 13px; }
.studio-page #statusMessage { min-height: 44px; margin: 10px 0 0; color: #efd374; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.studio-page #refreshButton { display: flex; align-items: center; justify-content: center; }
.studio-page :is(.primary-button, .secondary-button) { white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
.studio-checkin-header { grid-column: 1 / -1; min-width: 0; }
.studio-checkin-header .primary-button { width: auto; min-width: 140px; flex: 0 0 auto; }
.studio-checkin-header .checkin-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 0; padding: 10px 0; }
.studio-checkin-header #joinedCard { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.studio-checkin-header #checkInMessage { flex-basis: 100%; margin: 0; }
.counts-about { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; font-size: 13px; line-height: 1.6; }
.counts-about summary { cursor: pointer; }
.counts-about p { margin-top: 10px; color: var(--muted); }
.checkin-controls { margin: 16px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.checkin-controls p, #joinedText, #checkInMessage { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.checkin-controls button, #checkOutButton, #retryCounts { min-height: 44px; margin: 8px 0; }
.checkin-controls button:disabled, #retryCounts:disabled, #checkOutButton:disabled { opacity: .6; cursor: wait; }
.home-page .now-header { flex-wrap: wrap; gap: 8px; }
.home-page .now-header #boardTitle { font-size: 16px; }
.home-page .section-heading { flex-wrap: wrap; gap: 8px; }
.home-page #countsUpdated { font-size: 12px; }
.home-page #updatedAt[data-state="ready"] { color: #b9edc8; }
.home-page #updatedAt[data-state="loading"] { color: #b1b9bf; }
body.refreshed-page { background: #16191c; color: #f0f2f3; --ink: #f0f2f3; --muted: #b1b9bf; --line: #3b4146; }
.refreshed-page *, .refreshed-page h1, .refreshed-page h2 { letter-spacing: 0; }
.refreshed-page [hidden] { display: none !important; }
.refreshed-page .app-shell { max-width: 1400px; margin: auto; padding: 24px 32px; gap: 32px; }
.refreshed-page .topbar { min-height: 42px; flex-wrap: wrap; }
.refreshed-page .brand { font-size: 22px; }
.refreshed-page .nav-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.refreshed-page .support-link, .refreshed-page .secondary-link { border-color: var(--line); border-radius: 6px; background: transparent; color: #dce3e5; }
.refreshed-page .primary-link, .refreshed-page .primary-button { background: #b9edc8; color: #172a21; border-radius: 6px; }
.refreshed-page .secondary-button { background: #272c30; border: 1px solid var(--line); color: #f0f2f3; }
.refreshed-page .eyebrow, .refreshed-page .field-label { color: #b5c5be; }
.refreshed-page .hero { gap: 26px; }
.home-page .hero-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
.home-page .hero-copy { padding: 0; min-width: 0; }
.home-page h1 { font-size: 40px; max-width: 630px; line-height: 1.12; margin-top: 10px; }
.home-page .subtitle { font-size: 16px; margin-top: 12px; }
.home-page .hero-actions { margin-top: 16px; }
.home-page .home-state-panel { padding: 0; margin-top: 30px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.home-page .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.home-page .section-heading h2 { font-size: 23px; line-height: 1.2; }
#browseResultCount { color: var(--muted); font-size: 13px; white-space: nowrap; }
.browse-tools { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 8px 12px; margin-bottom: 16px; }
.browse-tools label { font-size: 12px; color: var(--muted); }
.browse-tools label[for="stateCategory"] { grid-column: 2; grid-row: 1; }
.browse-tools input, .browse-tools select { width: 100%; min-width: 0; height: 42px; border: 1px solid #515a61; border-radius: 6px; padding: 0 12px; background: #202529; color: #f4f6f7; font: inherit; }
.home-page .browse-state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-page .browse-state-button { min-width: 0; min-height: 152px; border-radius: 8px; padding: 16px; justify-content: flex-end; gap: 6px; }
.home-page .browse-state-label { font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.home-page .browse-state-button small { font-size: 12px; }
.home-page .browse-state-button small { color: rgba(255,255,255,.86); }
.home-page .now-panel { padding: 0 0 0 22px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.home-page .now-header { flex-wrap: wrap; color: #f0f2f3; }
.home-page #updatedAt { color: #f0bd8a; font-size: 12px; }
.home-page .total-count { font-size: 13px; margin: 18px 0; }
.home-page .total-count strong { font-size: 32px; }
.home-page .top-status-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.home-page .top-status { min-height: 52px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; border-radius: 6px; }
.home-page .top-status strong { font-size: 16px; }
.home-page .top-label { line-height: 1.2; overflow-wrap: anywhere; }
.home-page .privacy-note { font-size: 12px; }
#browseEmpty { padding: 24px 0; color: var(--muted); }
.studio-page .studio-heading h1 { font-size: 28px; margin-top: 8px; line-height: 1.2; }
.studio-page .workspace { grid-template-columns: minmax(0, 1fr) minmax(300px, 390px); align-items: start; gap: 40px; }
.studio-page .preview-pane { order: 0; position: sticky; top: 24px; }
.studio-page #cardCanvas { width: min(100%, 440px); height: auto; max-height: none; border-radius: 8px; }
.studio-page .card-meta { width: min(100%, 440px); flex-wrap: wrap; gap: 8px; }
.studio-page .control-pane { order: 1; padding: 0; border: 0; background: transparent; backdrop-filter: none; box-shadow: none; min-width: 0; }
.studio-selection { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.studio-selection h2 { font-size: 24px; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.studio-selection a { font-size: 13px; color: #b9edc8; white-space: nowrap; }
.studio-page .mode-grid { display: flex; gap: 6px; }
.studio-page .mode-button { flex: 1; min-height: 44px; border-radius: 6px; padding: 8px; background: #252a2e; color: #e4e7e9; }
.studio-page .mode-button[aria-checked=true] { background: #b9edc8; color: #172a21; box-shadow: none; }
.studio-page textarea, .studio-page .photo-tools select { background: #22272b; color: #f4f6f7; border: 1px solid #515a61; border-radius: 6px; }
.studio-page .photo-drop { background: #22272b; border-color: #66716e; border-radius: 6px; }
.studio-page .action-row { flex-direction: row; align-items: stretch; }
.studio-page #refreshButton { flex: 0 0 44px; width: 44px; padding: 0; font-size: 26px; }
.studio-page .action-row button { min-width: 0; flex: 1; }
.local-photo-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0; }
.studio-state-picker { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }
.studio-state-picker summary { cursor: pointer; font-size: 14px; padding: 6px 0; }
.studio-state-picker .status-filters { margin: 16px 0; }
.studio-page .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-page .state-button { min-width: 0; border-radius: 6px; }
.studio-page .state-button span { overflow-wrap: anywhere; }
.studio-page .memory-save-panel { border-radius: 6px; }
.refreshed-page .site-footer { font-size: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.refreshed-page .site-footer a { color: #c0ddcd; }
.memory-refresh .memory-copy h1 { font-size: 44px; line-height: 1.12; }
.memory-refresh .memory-section h2 { font-size: 28px; line-height: 1.2; }
.memory-refresh .memory-device, .memory-refresh .intent-card { background: #22272b; border-radius: 8px; }
.memory-refresh .memory-snapshot { min-width: 0; }
.memory-refresh .memory-section { padding: 28px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.memory-refresh .memory-entry { padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.memory-refresh .memory-device h2 { font-size: 30px; line-height: 1.2; }
.memory-refresh .intent-card strong { font-size: 32px; }
@media (max-width: 900px) {
  .home-page .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .home-page .now-panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .home-page .top-status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-page .workspace { gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); }
}
@media (max-width: 600px) {
  .refreshed-page .app-shell { padding: 16px; gap: 24px; }
  .refreshed-page .topbar { gap: 12px; }
  .refreshed-page .brand { font-size: 20px; }
  .refreshed-page .support-link { font-size: 12px; padding: 7px 9px; }
  .home-page h1 { font-size: 30px; }
  .home-page .home-state-panel { margin-top: 24px; }
  .home-page .section-heading h2 { font-size: 21px; }
  .home-page .browse-state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-page .browse-state-button { min-height: 124px; padding: 12px; }
  .home-page .browse-state-label { font-size: 16px; }
  .browse-tools { grid-template-columns: minmax(0, 1fr) 126px; }
  .studio-page .workspace { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .studio-page .preview-pane { position: static; }
  .studio-page #cardCanvas { width: min(100%, 264px); }
  .studio-page .studio-heading h1 { font-size: 24px; }
  .studio-page .card-meta { width: 100%; }
  .memory-refresh .memory-copy h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .refreshed-page *, .refreshed-page *::before, .refreshed-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
