/* Phone layout of the extension's side panel. Colours and font come from /theme.css
   (MindBridge moss + sage). Tap targets are at least 44px; content stays in thumb reach. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 26px 2px 10px; }
a { color: var(--sage); }

.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; min-height: 44px; }
.brand img { display: block; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 17px; }

button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
input::placeholder { color: var(--muted); opacity: .8; }
.link-btn { min-height: 44px; padding: 0 4px; border: 0; background: none; font-weight: 700; font-size: 14px; text-decoration: underline; text-align: left; }

.search { position: relative; }
/* 16px+ text stops iOS from zooming into the field. */
.search input { width: 100%; height: 52px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none; }
.search-icon { position: absolute; left: 17px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.msg { min-height: 1.2em; margin: 6px 4px 0; font-size: 13px; color: var(--muted); }

.suggest { margin: 4px 0 8px; padding: 6px; background: var(--card); border-radius: 14px; }
.suggest ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.suggest .pick { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 6px 8px; border-color: transparent; background: transparent; }
.suggest li.pick { box-sizing: border-box; border-radius: 10px; cursor: pointer; }
.suggest .pick:active, .suggest .pick:focus-visible, .suggest .pick[aria-selected="true"], .suggest li.pick:hover { background: var(--chip); }
.suggest .thumb { flex: none; width: 38px; height: 56px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.suggest .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.suggest .what { display: grid; line-height: 1.3; }
.suggest .what span { color: var(--muted); font-size: 13px; }
.suggest-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; margin: 2px 6px 0; }

.empty { margin: 18px 4px 0; color: var(--muted); text-align: center; }
.duo-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.title-card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 16px; overflow: hidden; border-top: 4px solid var(--a); }
.title-card.b { border-top-color: var(--b); }
.poster { position: relative; aspect-ratio: 16 / 10; background: var(--chip); display: grid; place-items: center; }
.poster span { font-size: 34px; font-weight: 800; color: var(--muted); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.title-card .body { padding: 8px 10px 12px; }
.title-card h3 { margin: 0 0 2px; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title-card .sub { color: var(--muted); font-size: 13px; }
.title-card .x { position: absolute; z-index: 2; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; background: none; }
.title-card .x::before { content: "×"; display: grid; place-items: center; width: 30px; height: 30px; font-size: 20px; line-height: 1; border-radius: 999px; background: rgba(11, 15, 14, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.title-card .x { font-size: 0; }
.slot-empty { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 18px 12px; color: var(--muted); background: var(--card); border-radius: 16px; border: 1px dashed var(--line); font-size: 15px; }
.slot-letter { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--a); color: var(--on-accent); font-weight: 800; }
.slot-empty.b .slot-letter { background: var(--b); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--moss); border-color: var(--sage); color: var(--on-moss); font-weight: 600; }
.mood-input { width: 100%; height: 48px; margin-top: 10px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }

.verdict { background: var(--card); border-radius: 18px; padding: 16px; }
.verdict.fade .hero-call { animation: pick-in .35s ease-out; }
@keyframes pick-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.verdict .hero-call { font-size: 22px; font-weight: 800; line-height: 1.2; }
.verdict .vibe { margin: 10px 0; }
.verdict .why { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.45; }
.pick-lines p { margin: 4px 0; font-size: 14px; color: var(--muted); }
.more { margin-top: 12px; }
.more summary { min-height: 44px; padding: 11px 4px; cursor: pointer; font-weight: 600; color: var(--muted); border-radius: 8px; }
.more summary:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.more .pick-lines { margin: 0 4px 10px; }

.synopsis { background: var(--card); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; border-left: 4px solid var(--a); font-size: 15px; }
.synopsis.b { border-left-color: var(--b); }
.synopsis strong { display: block; margin-bottom: 2px; }

table.facts { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden; table-layout: fixed; }
.facts th, .facts td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-size: 14px; overflow-wrap: anywhere; }
.facts th { width: 28%; color: var(--muted); font-weight: 500; font-size: 13px; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts .win { font-weight: 700; }
.facts .na { color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.meter { display: grid; grid-template-columns: 100px 1fr; gap: 6px 10px; align-items: center; }
.meter .lbl { font-size: 14px; line-height: 1.25; color: var(--muted); }
.meter .lbl.hot { color: var(--text); font-weight: 600; }
.meter .lbl small { display: block; font-size: 12px; font-weight: 500; line-height: 1.1; color: var(--sage); }
.meter .dim { opacity: .6; }
.bars { display: grid; gap: 4px; }
.bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 4px; transform-origin: left; animation: grow .5s ease-out; }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .bar span, .verdict.fade .hero-call { animation: none; } }
.bar.a span { background: var(--a); }
.bar.b span { background: var(--b); }


.foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); }
.foot span { display: block; }
.foot-link { padding: 8px 2px; border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; padding: 0 16px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; font-size: 15px; font-weight: 600; }
.share-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.foot a { color: var(--muted); display: inline-block; padding: 8px 2px; }

/* Soft cards: shadow in light, hairline in dark (same as the extension). */
.verdict, table.facts, .synopsis, .title-card, .suggest { box-shadow: 0 1px 2px rgba(29, 43, 38, .06), 0 4px 14px rgba(29, 43, 38, .05); }
:root[data-theme="dark"] :is(.verdict, .suggest) { border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.verdict, .suggest) { border: 1px solid var(--line); } }

/* With two titles picked, keep what's above the answer small. Taps stay 44px tall. */
.duo.full .poster { aspect-ratio: 5 / 2; }
.duo.full .title-card .body { padding: 6px 10px 8px; }
.mood-title { margin-top: 14px; }
.chips { gap: 6px; }
.chip { padding: 0 12px; font-size: 14px; }
.mood-input { margin-top: 8px; }
.verdict { margin-top: 12px; scroll-margin: 10px 0; }
