/* V18 · A mysterious moonlit companion, with three aligned suggestion rows. */
body:is([data-view="home"], [data-view="draw"]) {
  background: #100b1b;
  background-image: radial-gradient(ellipse at 24% 5%, #6e4b843c, transparent 49%), radial-gradient(ellipse at 100% 82%, #5a3e6722, transparent 54%);
  color: #f4eefa;
}
body[data-view="home"]::before { opacity: .38; }
body:is([data-view="home"], [data-view="draw"]) #site-header { max-width: 640px; height: 56px; padding: 0 24px; background: transparent; border: 0; }
body:is([data-view="home"], [data-view="draw"]) #site-header .brand { font-size: 21px; color: #e7d4b5; }
body:is([data-view="home"], [data-view="draw"]) #site-header .icon-button,
body:is([data-view="home"], [data-view="draw"]) #site-header .lang-switch { border-color: transparent; background: #e0caef08; color: #d5c6de; }
body:is([data-view="home"], [data-view="draw"]) button:focus-visible { outline: 2px solid #e3c4f0; outline-offset: 4px; }

body[data-view="home"] .studio-shell {
  width: min(100%, 640px); min-height: calc(100svh - 56px); padding: 6px 28px max(20px, env(safe-area-inset-bottom));
  gap: 24px; justify-content: space-evenly;
}
body[data-view="home"] .studio-welcome { flex: 0 0 auto; }
body[data-view="home"] .studio-hero { min-height: 190px; padding: 0; gap: 25px; }
body[data-view="home"] .studio-portrait { flex: 0 0 180px; height: 190px; }
body[data-view="home"] .studio-portrait::before { inset: 15% -9% 3%; background: radial-gradient(ellipse, #8b66df4d, #61439018 60%, transparent 75%); filter: blur(22px); }
body[data-view="home"] .studio-portrait::after { content: none; }
body[data-view="home"] .studio-portrait img { object-fit: contain; object-position: center; border-radius: 0; filter: none; mask-image: none; -webkit-mask-image: none; }
body[data-view="home"] .studio-intro small { display: block; margin: 0 0 10px; color: #cdb7dc; font: 400 14px/1.5 var(--sans); letter-spacing: .04em; }
body[data-view="home"] .studio-intro h1,
html[lang="th"] body[data-view="home"] .studio-intro h1 { font: 400 27px/1.55 var(--sans); letter-spacing: 0; color: #f5eefb; }
body[data-view="home"] .studio-intro h1 em { display: block; font-style: normal; color: #dac4e9; }
body[data-view="home"] .studio-utility { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-top: 10px; }
body:is([data-view="home"], [data-view="draw"]) .queue-status { width: auto; min-height: 32px; padding: 3px 0; gap: 5px; border: 0; border-radius: 0; background: transparent; color: #bcacc8; font-size: 14px; line-height: 1.4; }
body:is([data-view="home"], [data-view="draw"]) .queue-status small { font-size: 14px; color: #aa9ab7; }
body:is([data-view="home"], [data-view="draw"]) .queue-status strong { font-size: 14px; color: #dfcba6; font-weight: 500; }
body:is([data-view="home"], [data-view="draw"]) .queue-dot { display: none; }
body[data-view="home"] .studio-utility .small-info { min-height: 32px; flex: 0 0 auto; padding: 3px 0 3px 7px; color: #bda9cc; font-size: 14px; }
body[data-view="home"] .studio-utility .small-info > span { display: none; }
body[data-view="home"] .studio-suggestions { margin: 0; }
body[data-view="home"] .studio-section-heading { min-height: 32px; margin: 0 2px 10px; }
body[data-view="home"] .studio-section-heading h2 { font-size: 14px; color: #b7a7c4; }
body[data-view="home"] .suggestion-swap { min-height: 32px; padding: 4px 0 4px 9px; color: #baa5cc; font-size: 14px; }
body[data-view="home"] .suggestion-swap .icon { width: 15px; height: 15px; }
body[data-view="home"] .suggestion-list { gap: 10px; }
body[data-view="home"] .suggestion-row { min-height: 52px; padding: 12px 18px; border: 0; border-radius: 18px 18px 5px 18px; background: linear-gradient(110deg, #aa82c51b, #ceb3e00c); color: #eee3f5; font-size: 16px; line-height: 1.5; box-shadow: none; }
body[data-view="home"] .suggestion-row { width: 100%; justify-self: stretch; }
body[data-view="home"] .suggestion-row > i { display: none; }
body[data-view="home"] .suggestion-row:hover { background: #b999d22c; border-color: transparent; transform: none; }
body[data-view="home"] .studio-entry { display: flex; flex-direction: column; gap: 12px; }
body[data-view="home"] .studio-quick-actions { min-height: 44px; margin: 0; padding: 0; gap: 15px; }
body[data-view="home"] .draw-first-entry { min-height: 44px; padding: 8px 15px; gap: 10px; border-color: #ccb5de2a; background: #c3a3dc09; border-radius: 16px; color: #e4d6ed; }
body[data-view="home"] .draw-first-entry strong { font-size: 16px; line-height: 1.4; font-weight: 400; }
body[data-view="home"] .draw-first-icon { width: 16px; height: 23px; color: #c4a7d4; }
body[data-view="home"] .studio-quick-actions > p { max-width: none; font-size: 14px; line-height: 1.45; color: #ab98b9; }
body[data-view="home"] .studio-compose.campaign-panel { margin: 0; padding: 0; }
body[data-view="home"] .composer-box { min-height: 66px; padding: 9px 9px 9px 16px; gap: 8px; border: 1px solid #bca5ce40; border-radius: 22px; background: #3c2c494f; box-shadow: 0 8px 28px #05020b1c; }
body[data-view="home"] .composer-box:focus-within { border-color: #d1b9e3; box-shadow: 0 0 0 3px #bea0d112; }
body[data-view="home"] #question-text { height: 44px; min-height: 44px; font-size: 16px; line-height: 1.4; color: #f3eaf8; }
body[data-view="home"] #question-text::placeholder { font-size: 16px; line-height: 1.4; color: #af9cbe; }
body[data-view="home"] .composer-submit { min-height: 44px; padding: 9px 13px; border: 0; border-radius: 15px; background: linear-gradient(115deg, #ecd2a5, #dcb881); color: #33243b; font-size: 16px; line-height: 1.4; box-shadow: none; }
body[data-view="home"] .composer-submit:hover { background: #efd9b5; }
body[data-view="home"] .studio-compose .payment-note { margin: 8px 0 0; color: #aa98b8; font-size: 14px; line-height: 1.4; }
body[data-view="home"] .studio-footnote { display: none; }

/* Keep the existing selection geometry and motion, soften the visual furniture. */
body[data-view="draw"] .compact-draw { justify-content: space-between; gap: 7px; }
body[data-view="draw"] .draw-topbar h1,
html[lang="th"] body[data-view="draw"] .draw-topbar h1 { font-family: var(--sans); font-weight: 400; color: #f1e7f7; }
body[data-view="draw"] .draw-details-button { border-color: transparent; background: #c2a2d50b; color: #cdb8dc; }
body[data-view="draw"] .compact-draw > .queue-status { align-self: center; }
body[data-view="draw"] .compact-draw .selected-slots { margin-top: 5px; }
body[data-view="draw"] .compact-draw .card-slot { border: 1px solid #c8b3d525; background: #c1a6d30a; border-radius: 10px; }
body[data-view="draw"] .compact-draw .card-slot.filled { border-color: #d8bfa75c; background: #bca0cb16; box-shadow: 0 4px 20px #c8acd510; }
body[data-view="draw"] .compact-draw .card-slot > .slot-label { color: #a990ba; }
body[data-view="draw"] .compact-draw .deck-toolbar > strong { color: #c5b0d3; font-weight: 400; }
body[data-view="draw"] .compact-draw .deck-toolbar > strong b { color: #e8d4b0; font-weight: 500; }
body[data-view="draw"] .compact-draw .deck-tools .text-button { color: #b39bc3; }
body[data-view="draw"] .compact-draw .draw-motion-status { color: #c1a9d2; }
body[data-view="draw"] .compact-draw .tarot-back,
body[data-view="draw"] .tarot-flight > .tarot-back { border: 1px solid #c1a0d340; border-radius: 7px; background: radial-gradient(ellipse at 50% 42%, #614678 0%, #34233f 70%, #2a1e35); box-shadow: 0 4px 10px #05010a25; }
body[data-view="draw"] .compact-draw .tarot-back::before,
body[data-view="draw"] .tarot-flight > .tarot-back::before { inset: 17% 18%; border: 1px solid #d2b2da40; border-radius: 50%; transform: none; }
body[data-view="draw"] .compact-draw .tarot-back::after,
body[data-view="draw"] .tarot-flight > .tarot-back::after { content: none; }
body[data-view="draw"] .compact-draw .tarot-back .back-moon,
body[data-view="draw"] .compact-draw .tarot-back > small,
body[data-view="draw"] .tarot-flight .back-moon,
body[data-view="draw"] .tarot-flight > .tarot-back > small { display: none; }
body[data-view="draw"] .compact-draw .tarot-back .back-star,
body[data-view="draw"] .tarot-flight .back-star { color: #e4cca7; text-shadow: 0 0 16px #ebc9ee35; }
body[data-view="draw"] .compact-draw .deck-card:hover:not(:disabled) > .tarot-back,
body[data-view="draw"] .compact-draw .deck-card:focus-visible > .tarot-back { border-color: #d8bddc9c; box-shadow: 0 0 18px #bea1d522; }
body[data-view="draw"] .compact-draw .slot-remove > .tarot-back { border-radius: 8px; border-color: #d3b99a80; }
body[data-view="draw"] .compact-draw .draw-footer { margin: 0; padding-top: 6px; }
body[data-view="draw"] .compact-draw .draw-footer .primary { border: 0; border-radius: 16px; background: linear-gradient(115deg, #ecd2a5, #dcb881); }
body[data-view="draw"] .compact-draw .draw-footer .payment-note { color: #aa98b8; }
body[data-view="report"] .report-mira-note img,
body[data-view="chat"] .chat-heading > img { object-fit: contain; object-position: center; border-radius: 0; }

@media (max-width: 760px) {
  body:is([data-view="home"], [data-view="draw"]) #site-header { height: 52px; padding: 0 20px; }
  body[data-view="home"] .studio-shell { min-height: calc(100svh - 52px); width: min(100%, 600px); padding: 4px 20px max(12px, env(safe-area-inset-bottom)); gap: clamp(12px, 2svh, 22px); }
  body[data-view="home"] .studio-hero { min-height: clamp(130px, calc(30svh - 60px), 184px); gap: 16px; }
  body[data-view="home"] .studio-portrait { flex-basis: clamp(118px, 34vw, 150px); height: clamp(130px, calc(30svh - 60px), 184px); }
  body[data-view="home"] .studio-intro small { margin-bottom: 8px; font-size: 14px; }
  body[data-view="home"] .studio-intro h1,
  html[lang="th"] body[data-view="home"] .studio-intro h1 { font-size: 22px; line-height: 1.48; }
  body[data-view="home"] .studio-utility { min-height: 32px; margin-top: 8px; }
  body[data-view="home"] .studio-section-heading { min-height: 30px; margin-bottom: 8px; }
  body[data-view="home"] .suggestion-swap { min-height: 30px; }
  body[data-view="home"] .suggestion-row { min-height: 50px; padding: 10px 16px; }
  body[data-view="home"] .studio-entry { gap: 10px; }
  body[data-view="home"] .composer-box { min-height: 64px; padding: 8px 8px 8px 14px; flex-wrap: nowrap; }
  body[data-view="home"] .studio-quick-actions { margin: 0; gap: 13px; }
  body[data-view="draw"] .compact-draw { min-height: calc(100svh - 52px); gap: 5px; }
  body[data-view="draw"] .compact-draw .draw-topbar h1 { font-size: 22px; }
  body[data-view="draw"] .compact-draw .queue-status { min-height: 28px; padding: 2px 0; }
}

@media (max-width: 760px) and (max-height: 700px) {
  body[data-view="home"] .studio-hero { min-height: 124px; gap: 14px; }
  body[data-view="home"] .studio-portrait { flex-basis: 116px; height: 124px; }
  body[data-view="home"] .studio-intro h1,
  html[lang="th"] body[data-view="home"] .studio-intro h1 { font-size: 21px; }
  body[data-view="home"] .studio-intro small { display: block; margin-bottom: 6px; }
  body[data-view="home"] .suggestion-list { gap: 8px; }
  body[data-view="home"] .suggestion-row { min-height: 46px; padding: 8px 15px; }
  body[data-view="home"] .studio-compose .payment-note { margin-top: 6px; }
  body[data-view="draw"] .compact-draw { gap: 4px; }
  body[data-view="draw"] .compact-draw .selected-slots { margin-top: 2px; }
}

/* 568px tall phones keep the content readable; only artwork and breathing space shrink. */
@media (max-width: 760px) and (max-height: 620px) {
  body:is([data-view="home"], [data-view="draw"]) #site-header { height: 44px; }
  body[data-view="home"] .studio-shell { min-height: calc(100svh - 44px); padding-top: 2px; padding-bottom: max(6px, env(safe-area-inset-bottom)); gap: 8px; }
  body[data-view="home"] .studio-hero { min-height: 94px; gap: 12px; }
  body[data-view="home"] .studio-portrait { flex-basis: 88px; height: 94px; }
  body[data-view="home"] .studio-intro small { margin-bottom: 4px; line-height: 1.35; }
  body[data-view="home"] .studio-intro h1,
  html[lang="th"] body[data-view="home"] .studio-intro h1 { font-size: 20px; line-height: 1.4; }
  body[data-view="home"] .studio-utility { min-height: 28px; margin-top: 4px; }
  body[data-view="home"] .studio-utility .queue-status,
  body[data-view="home"] .studio-utility .small-info { min-height: 28px; padding-top: 0; padding-bottom: 0; }
  body[data-view="home"] .studio-section-heading { min-height: 26px; margin-bottom: 5px; }
  body[data-view="home"] .suggestion-swap { min-height: 26px; padding-top: 1px; padding-bottom: 1px; }
  body[data-view="home"] .suggestion-list { gap: 6px; }
  body[data-view="home"] .suggestion-row { min-height: 44px; padding: 6px 14px; line-height: 1.4; }
  body[data-view="home"] .studio-entry { gap: 6px; }
  body[data-view="home"] .studio-quick-actions { min-height: 44px; }
  body[data-view="home"] .composer-box { min-height: 56px; padding: 5px 6px 5px 12px; }
  body[data-view="home"] #question-text { height: 42px; min-height: 42px; line-height: 1.3; }
  body[data-view="home"] .composer-submit { padding: 8px 10px; min-height: 44px; }
  body[data-view="home"] .studio-compose .payment-note { margin-top: 4px; line-height: 1.35; }
  body[data-view="draw"] .compact-draw { min-height: calc(100svh - 44px); gap: 3px; }
  body[data-view="draw"] .compact-draw .queue-status { min-height: 24px; }
  body[data-view="draw"] .compact-draw .draw-footer { padding-top: 2px; }
}

@media (max-width: 359px) {
  body:is([data-view="home"], [data-view="draw"]) #site-header { padding-left: 14px; padding-right: 14px; }
  body[data-view="home"] .studio-shell { padding-left: 14px; padding-right: 14px; }
  body[data-view="home"] .studio-utility { gap: 5px; }
  body[data-view="home"] .studio-utility .small-info { padding-left: 3px; }
  body[data-view="home"] .studio-quick-actions { gap: 10px; }
  body[data-view="home"] .draw-first-entry { padding-left: 12px; padding-right: 12px; }
  body[data-view="home"] .studio-intro h1,
  html[lang="th"] body[data-view="home"] .studio-intro h1 { font-size: 19px; }
  body[data-view="draw"] .compact-draw .draw-topbar h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-view="home"] .suggestion-row,
  body[data-view="home"] .composer-box { transition: none; }
}
