/* The client side of Portal: the team's board, in the Mac app's colours (BoardTheme),
   which are the 2026 Joycast site's: near-black, cream, Geist. Lime is kept for the
   one thing to press on each screen (New episode, Create, Send, Save, Sign in);
   everything else that is on, chosen or done is cream, white or grey. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/geist-400-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/geist-400-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/geist-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/geist-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0B0B0A;
  --pit: #080807;
  --lift: #161614;
  --raised: #1F1E1B;
  --hover: #292824;
  --line: #2B2A26;
  --line-strong: #3E3C37;
  --ink: #EDE9E2;
  --soft: #BDB7AD;
  --faint: #9A948A;
  --lime: #E4FF52;
  --lime-ink: #0A0A08;
  --accent: #EDE9E2;
  --wash: rgba(255, 255, 255, 0.09);
  --sunrise: #FFB891;
  --berry: #FF7A93;
  --radius: 10px;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.covered { overflow: hidden; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
/* A link inside words (a message, a note) is underlined, since it isn't coloured. */
.msg-text a, p a { text-decoration: underline; text-decoration-color: rgba(237, 233, 226, 0.35); text-underline-offset: 2px; }
.msg-text a:hover, p a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 20px; font-weight: 620; letter-spacing: -0.03em; }
h3 { font-size: 12.5px; color: var(--soft); letter-spacing: 0.01em; margin-bottom: 8px; }
p { margin: 0 0 10px; }
[hidden] { display: none !important; }

.soft { color: var(--soft); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.row { display: flex; align-items: center; gap: 8px; }
.spread { justify-content: space-between; }
.end { justify-content: flex-end; }

.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: currentColor; stroke: none; }
.icon .knock { stroke: var(--bg); stroke-width: 2; }
.stage { color: var(--soft); }
.stage.awaiting_feedback { color: var(--sunrise); }
.stage.done { color: var(--ink); }

.mark { font: 600 16px/1 var(--mono); color: var(--ink); letter-spacing: -0.02em; }
.mark b { color: var(--lime); font-weight: 600; }
.logo { font: 620 21px/1 "Geist", sans-serif; letter-spacing: -0.045em; color: var(--ink); }

/* Controls */
button, .button {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--raised); cursor: pointer;
  white-space: nowrap;
}
button:hover, .button:hover { background: var(--hover); text-decoration: none; }
button.primary { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 600; }
button.primary:hover { background: #ECFF7F; border-color: #ECFF7F; }
button.primary:disabled { background: var(--wash); border-color: transparent; color: var(--soft); opacity: 1; }
button.ghost, .button.ghost { background: transparent; border-color: transparent; color: var(--soft); }
button.ghost:hover, .button.ghost:hover { background: var(--raised); color: var(--ink); }
button.wide { width: 100%; padding: 9px 12px; margin-top: 14px; }
button.small { font-size: 12px; padding: 3px 8px; }
button.link { border: none; background: none; padding: 0; color: var(--ink); font-size: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: rgba(237, 233, 226, 0.35); text-underline-offset: 2px; }
button.link:hover { text-decoration-color: currentColor; }
button.link.quiet { color: var(--faint); font-size: 12px; font-weight: 400; margin-left: 4px; }
button.link.quiet:hover { color: var(--berry); }
.msg .quiet { opacity: 0; transition: opacity 0.12s; }
.msg:hover .quiet, .msg .quiet:focus-visible { opacity: 1; }
@media (hover: none) { .msg .quiet { opacity: 1; } }
button.x { padding: 4px; border-radius: 6px; min-width: 28px; min-height: 28px; }
button:disabled { opacity: 0.5; cursor: default; }
input, textarea, select {
  font: inherit; color: var(--ink); background: var(--pit); width: 100%;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(237, 233, 226, 0.45); box-shadow: 0 0 0 3px rgba(237, 233, 226, 0.08); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
input[type="date"] { width: auto; padding: 4px 8px; color-scheme: dark; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
label { display: block; font-size: 12.5px; color: var(--soft); margin: 14px 0 6px; }
.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; min-width: 0; }
.error { color: #F08A6C; font-size: 13px; margin-top: 8px; }
.error:empty { display: none; }
.saved { color: var(--faint); font-size: 12px; }

/* Signed out: one panel in the middle */
.lone { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.lone .panel { width: 100%; max-width: 380px; background: var(--lift); border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px 22px; }
.lone-mark { margin-bottom: 22px; }
.lone h2 { margin-bottom: 6px; }

/* The shell: a floating sidebar and the page */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100vh; }
.side {
  margin: 8px 0 8px 8px; background: var(--lift); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; padding: 14px 8px 8px; overflow-y: auto; min-height: 0;
}
.side-top { padding: 4px 10px 22px; }
.side-head { font-size: 11.5px; color: var(--faint); padding: 14px 10px 6px; }
.side-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px;
  color: var(--ink); font-size: 13.5px;
}
.side-row:hover { background: var(--raised); text-decoration: none; }
.side-row.on { background: var(--wash); }
.side-row .icon { color: var(--soft); }
.side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-gap { height: 10px; }
.side-fill { flex: 1; }
.you { display: flex; align-items: center; gap: 10px; padding: 10px 6px 4px 10px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 13.5px; }

.badge {
  --c: #7E8581;
  position: relative; overflow: hidden;
  flex: none; width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--c);
  background: color-mix(in srgb, var(--c) 20%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dot { --c: #7E8581; width: 6px; height: 6px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }

.avatar {
  --c: #5E6461;
  position: relative; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--c); color: var(--bg); font-weight: 700; overflow: hidden; line-height: 1;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.nobody { background: none; border: 1px dashed var(--line-strong); }
.avatars { display: inline-flex; align-items: center; flex: none; }
.avatars .avatar { box-shadow: 0 0 0 1.5px var(--lift); }
.avatars .avatar + .avatar { margin-left: -6px; }
.avatars .more { font-size: 11px; color: var(--soft); margin-left: 4px; }

/* The page */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px 0 22px; flex: none; }
.top h1 { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 8px; }
.menu { display: none; }

/* The board */
.board {
  flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 14px; padding: 4px 20px 20px; overflow: auto; align-items: start;
}
.col { min-width: 0; }
.col-head { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 6px; margin-bottom: 6px; }
.col-name { font-weight: 600; font-size: 13.5px; }
.count { font-size: 11.5px; color: var(--soft); background: var(--raised); border-radius: 5px; padding: 0 6px; line-height: 18px; }
.col-head .add { margin-left: auto; padding: 3px; }
.col-list { display: flex; flex-direction: column; gap: 8px; }
.tile {
  display: block; background: var(--lift); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px 10px; color: var(--ink); transition: border-color 0.12s, transform 0.12s;
}
.tile:hover { border-color: var(--line-strong); text-decoration: none; }
.tile:active { transform: scale(0.99); }
.tile-top { display: flex; align-items: flex-start; gap: 10px; }
.tile-words { flex: 1; min-width: 0; }
.tile-show { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--soft); margin-bottom: 3px; }
.tile-title { font-weight: 600; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.tile-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; color: var(--faint); font-size: 12px; }
.meta { display: inline-flex; align-items: center; gap: 4px; }
.meta:first-child { margin-right: auto; }
.meta.late { color: #F08A6C; }
.meta.soon { color: var(--sunrise); }
.meta.all { color: var(--ink); }
.first-tile {
  width: 100%; flex-direction: column; gap: 8px; padding: 22px 12px; border: 1.5px dashed var(--line-strong);
  background: transparent; color: var(--soft); border-radius: var(--radius); font-size: 13.5px;
}
.first-tile:hover { border-color: var(--faint); color: var(--ink); background: rgba(255, 255, 255, 0.03); }

/* Sheets */
.backdrop {
  position: fixed; inset: 0; z-index: 10; background: rgba(12, 11, 10, 0.62); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto;
  animation: fade 0.16s ease-out;
}
.sheet {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); padding: 20px 24px 22px; animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.small { max-width: 440px; }
.sheet.small h2 { margin-bottom: 2px; }
.sheet.small .row.end { margin-top: 18px; }
.sheet.card { max-width: 1060px; padding: 16px 24px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
@media (prefers-reduced-motion: reduce) {
  .backdrop, .sheet { animation: none; }
  /* Nothing slides, pops or pulses for someone who's asked for less motion. */
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.show-older { width: 100%; margin-top: 4px; }
.sheet:focus { outline: none; }

/* The welcome */
.sheet.welcome { max-width: 420px; margin-top: 8vh; padding: 30px 30px 24px; }
.welcome-mark { margin-bottom: 20px; }
.welcome h2 { font-size: 24px; margin-bottom: 20px; }
.welcome-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.welcome-icon { color: var(--soft); padding-top: 2px; }
.welcome-title { font-weight: 600; margin-bottom: 1px; }
.welcome .wide { margin-top: 10px; }

/* A card: its facts and the drop on top, notes and deliverables, then the chat */
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-show { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.card-show:hover { color: var(--ink); text-decoration: none; }
.card-title { font-size: 26px; font-weight: 620; letter-spacing: -0.035em; margin: 8px 0 14px; overflow-wrap: anywhere; }
.card-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.card-mid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 16px 0 4px; border-bottom: 1px solid var(--line); }
.card-chat { padding-top: 16px; display: flex; flex-direction: column; border-radius: 10px; }
.card-chat.over { outline: 2px dashed rgba(237, 233, 226, 0.5); outline-offset: 4px; }
.props { display: grid; grid-template-columns: 96px 1fr; row-gap: 8px; align-content: start; }
.prop { display: contents; }
.prop-label { color: var(--soft); font-size: 13px; line-height: 28px; }
.prop-value { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 13.5px; flex-wrap: wrap; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; background: var(--raised); color: var(--ink); font-size: 12.5px; border: none; font-weight: 500; cursor: pointer; }
.chip-link:hover { background: var(--hover); text-decoration: none; }
.chip-link.fixed { cursor: default; }
.chip-link.fixed:hover { background: var(--raised); }
.date-chip { display: inline-flex; align-items: center; gap: 4px; }
.due-chip { position: relative; cursor: pointer; }
.due-chip.unset { color: var(--soft); background: transparent; border: 1px dashed var(--line-strong); }
.due-input { position: absolute; inset: 0; opacity: 0; width: 100%; padding: 0; cursor: pointer; }
.due-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.guest-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.guest-edit input { flex: 1 1 140px; padding: 5px 8px; }
.block { margin-bottom: 16px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13.5px; }
.tick { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ticks li.on .tick { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ticks li.on .tick .icon { stroke-width: 2.6; }

/* The drop: a dashed box for files, a field for a link */
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 18px 14px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px; transition: border-color 0.12s, background 0.12s;
}
.drop:hover, .drop:focus-visible { border-color: var(--faint); outline: none; }
.drop.over { border-color: rgba(237, 233, 226, 0.6); background: rgba(255, 255, 255, 0.04); }
.drop-words { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--soft); }
.drop-title { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.drop.wide { padding: 12px 14px; flex-direction: row; align-items: center; }
.drop.wide .drop-words { flex-direction: row; text-align: left; flex: 1; gap: 10px; }
.drop.wide .drop-title { font-weight: 500; }
.drop.wide .drop-form { flex: 0 1 45%; }
.drop-link { padding: 6px 10px; font-size: 13px; cursor: text; }
.items { list-style: none; margin: 8px 0 0; padding: 0; }
.items:empty { display: none; }
.item { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-top: 1px solid var(--line); }
.item:first-child { border-top: none; }
.item-state { width: 18px; display: inline-flex; justify-content: center; flex: none; }
.item.landed .item-state { color: var(--ink); }
.item.landed .item-state .icon { stroke-width: 2.4; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.item.downloading .pulse, .item.uploading .pulse { background: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
.item.by_hand .pulse { background: var(--sunrise); }
.item.failed .pulse { background: #F08A6C; }
.item.failed .item-words .small { color: #F08A6C; }
@keyframes pulse { 50% { opacity: 0.25; } }
.item-words { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.item-words > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 4px; border-radius: 2px; background: var(--raised); margin-top: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.2s; }

/* A menu under a button */
.pop {
  position: fixed; z-index: 40; min-width: 200px; background: var(--raised); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 4px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); animation: fade 0.1s ease-out;
}
.pop-item { width: 100%; justify-content: flex-start; background: none; border: none; padding: 7px 10px; font-weight: 400; font-size: 13.5px; }
.pop-item:hover { background: var(--hover); }
.pop-item span { flex: 1; text-align: left; }
.pop-check { color: var(--ink); }

/* A new episode, as Portal's New card */
.sheet.new-episode { max-width: 700px; padding: 20px 24px 20px; }
.show-chip { background: none; border: none; padding: 2px 4px 2px 0; gap: 8px; font-size: 13px; color: var(--soft); font-weight: 500; }
.show-chip:hover { background: none; color: var(--ink); }
.title-row { display: flex; gap: 10px; margin: 14px 0 8px; }
.big-field { background: none; border: none; border-radius: 0; padding: 0; font-size: 26px; font-weight: 620; letter-spacing: -0.035em; box-shadow: none !important; }
.big-field:focus { border: none; }
.big-field.number { flex: 0 0 5.2em; color: var(--ink); }
.big-field::placeholder { color: var(--faint); }
.guest-row { display: flex; gap: 8px; }
.guest-row input { padding: 6px 10px; font-size: 13px; }
.guest-row + .faint { margin: 6px 0 14px; }
.prop-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet.new-episode .drop { margin-bottom: 4px; }
.sheet.new-episode textarea { min-height: 70px; }
.sheet.new-episode .row.end { margin-top: 16px; }

/* You */
.sheet.profile { max-width: 400px; }
.sheet.profile h2 { margin-bottom: 4px; }
.photo-row { display: flex; align-items: center; gap: 16px; margin: 16px 0 4px; }
.photo-pick { position: relative; padding: 0; border: none; background: none; border-radius: 50%; }
.photo-pick:hover { background: none; }
.avatar.big { width: 72px; height: 72px; font-size: 26px; }
.photo-cam { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--raised); border: 2px solid var(--bg); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { --c: #EDE9E2; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; }
.swatch:hover { background: var(--c); transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.you-button { flex: 1; min-width: 0; justify-content: flex-start; gap: 10px; background: none; border: none; padding: 4px 6px 4px 0; font-size: 13.5px; font-weight: 500; }
.you-button:hover { background: none; color: var(--soft); }
.you { padding-left: 8px; }

/* The chat */
.chat { min-height: 120px; max-height: 44vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 2px 12px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-body { min-width: 0; flex: 1; }
.meta-line { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.meta-line b { font-weight: 600; font-size: 13px; }
.from-us { font-size: 10.5px; font-weight: 600; color: var(--soft); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; line-height: 15px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.msg-img { display: block; max-width: min(320px, 100%); max-height: 280px; border-radius: 8px; margin-top: 6px; border: 1px solid var(--line); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 10px; border-radius: 8px; background: var(--raised); color: var(--ink); font-size: 13px; }
.file-chip:hover { background: var(--hover); text-decoration: none; }
.compose { display: flex; align-items: flex-end; gap: 6px; background: var(--pit); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.compose:focus-within { border-color: rgba(237, 233, 226, 0.35); }
.compose textarea { border: none; background: none; min-height: 0; resize: none; padding: 6px 4px; box-shadow: none; max-height: 160px; }
.compose .attach { padding: 6px; }
.send { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: var(--lime); border-color: var(--lime); color: var(--lime-ink); flex: none; }
.send:hover { background: #ECFF7F; }
.send:disabled { background: var(--raised); border-color: var(--line-strong); color: var(--faint); opacity: 1; }
/* Lime only once there's something to send, as in the app. */
.compose:has(textarea:placeholder-shown) .send { background: var(--raised); border-color: var(--line-strong); color: var(--faint); }
.send .icon { stroke-width: 2.2; }
.empty { color: var(--faint); font-size: 13px; }

/* Pages: Useful links, Team */
.page { padding: 4px 22px 40px; max-width: 760px; overflow-y: auto; }
.page-block { margin-bottom: 26px; }
.page-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.useful { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--lift); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.useful:hover { border-color: var(--line-strong); text-decoration: none; }
.useful-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; color: var(--soft); flex: none; }
.useful-words { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.useful-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: none; }
.person-words { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.pill.on { background: var(--wash); border-color: var(--line-strong); }
.pill:hover { text-decoration: none; background: var(--raised); }
.invite-made { margin-top: 14px; padding: 12px; background: var(--lift); border: 1px solid var(--line); border-radius: var(--radius); }
.invite-made input { font: 12px ui-monospace, "SF Mono", Menlo, monospace; }

/* A show's page */
.top-pills { padding: 0 20px 10px 22px; margin: 0; }
.pill { font: inherit; font-size: 13px; }
button.pill { background: none; font-weight: 400; }
button.pill.on { background: var(--wash); }
.show-page { max-width: 720px; }
.show-head { display: flex; gap: 20px; align-items: center; margin: 8px 0 26px; }
.cover {
  --c: #7E8581;
  position: relative; width: 132px; height: 132px; padding: 0; border-radius: 14px; overflow: hidden; flex: none;
  background: color-mix(in srgb, var(--c) 18%, var(--lift)); border: 1px solid var(--line);
}
.cover:hover { background: color-mix(in srgb, var(--c) 24%, var(--lift)); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--soft); font-size: 12.5px; }
.cover-edit { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 0; background: rgba(12, 11, 10, 0.6); font-size: 12px; opacity: 0; transition: opacity 0.12s; }
.cover:hover .cover-edit, .cover:focus-visible .cover-edit { opacity: 1; }
.cover.busy { opacity: 0.6; }
.show-head-words { display: flex; flex-direction: column; gap: 10px; }
.show-head-words h2 { font-size: 26px; letter-spacing: -0.035em; }
.about { min-height: 140px; }
.useful-list { list-style: none; margin: 0; padding: 0; }
.useful-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.useful-row:first-child, .useful-edit:first-child { border-top: none; }
.useful-row.open .useful-title { color: var(--soft); }
.useful-edit { padding: 8px 0; border-top: 1px solid var(--line); }
.useful-edit form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.useful-edit input { flex: 1 1 160px; padding: 6px 10px; }
.add-link { margin-top: 6px; margin-left: -8px; }
button.danger { color: #F08A6C; }
.useful-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; color: var(--soft); flex: none; }

/* Narrow screens: the sidebar slides in, columns scroll sideways */
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 5; top: 0; bottom: 0; left: 0; width: 260px; transform: translateX(-110%); transition: transform 0.2s ease-out; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
  body.side-open .side { transform: none; }
  .menu { display: inline-flex; margin-left: -10px; padding: 6px; }
  .top { padding: 0 12px 0 16px; }
  .top-right .button.ghost { display: none; }
  .board { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 4px 16px 20px; }
  .col { scroll-snap-align: start; }
  .backdrop { padding: 0; }
  .sheet { border-radius: 0; min-height: 100vh; border: none; }
  .sheet.small, .sheet.welcome { border-radius: 16px; min-height: 0; margin: 10vh 12px 0; }
  .card-top, .card-mid { grid-template-columns: minmax(0, 1fr); }
  .chat { max-height: none; }
  .title-row { flex-direction: column; gap: 4px; }
  .big-field.number { flex: none; }
  .guest-row { flex-direction: column; }
  .drop.wide { flex-direction: column; align-items: stretch; }
  .show-head { flex-direction: column; align-items: flex-start; }
  .top-pills { padding: 0 16px 10px; overflow-x: auto; flex-wrap: nowrap; }
  .page { padding: 4px 16px 40px; }
}

/* The portal: the sign-in and every screen before the board, as Portal's (sky.js draws it) */
.portal-screen {
  position: fixed; inset: 0; z-index: 30; overflow: auto; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.portal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portal-stack {
  position: relative; width: 280px; max-width: calc(100vw - 32px); margin: auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px 0;
}
.portal-mark { font: 600 28px/1 var(--mono); letter-spacing: -0.6px; color: var(--ink); }
.portal-mark b { color: var(--lime); font-weight: 600; }
.portal-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.portal-form .error:empty { display: none; }
.portal-form .error { text-align: center; }
.portal-button {
  width: 100%; height: 38px; border-radius: 10px; font-size: 14px; font-weight: 600; gap: 10px;
  color: var(--lime-ink); background: var(--lime);
  border: 1px solid transparent; box-shadow: 0 0 14px rgba(228, 255, 82, 0.3);
  transition: opacity 0.2s;
}
.portal-button:hover { background: #ECFF7F; }
.portal-button:active { opacity: 0.85; }
.portal-button.quiet { color: rgba(255, 255, 255, 0.85); background: rgba(0, 0, 0, 0.45); border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
.portal-button.quiet:hover { background: rgba(0, 0, 0, 0.6); }
.portal-button .g { font: 700 15px/1 ui-rounded, -apple-system, "SF Pro Rounded", sans-serif; }
.portal-form .portal-button[type="submit"] { margin-top: 12px; }
.portal-or { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--faint); margin: 12px 0; }
.portal-or span { flex: 1; height: 1px; background: var(--line); }
.portal-form input {
  height: 38px; border-radius: 9px; font-size: 14px; padding: 0 12px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.1);
}
.portal-form input:focus { border-color: rgba(237, 233, 226, 0.5); box-shadow: 0 0 8px rgba(237, 233, 226, 0.12); }
.portal-note { font-size: 11.5px; color: var(--soft); text-align: center; margin: 12px 0 0; }
.portal-words { width: 100%; }
.portal-words h2 { text-align: center; margin-bottom: 8px; }
.portal-words > p { text-align: center; }
.portal-wait {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: rgba(255, 255, 255, 0.7);
  animation: portal-spin 0.8s linear infinite;
}
@keyframes portal-spin { to { transform: rotate(360deg); } }
/* Through the portal: it zooms past and fades as the board comes up behind it. */
.portal-screen.flying { pointer-events: none; background: transparent; }
.portal-screen.zoom .portal-canvas { transform: scale(2.6); opacity: 0; transition: transform 0.75s cubic-bezier(0.55, 0, 0.8, 0.3), opacity 0.75s ease-in; }
.portal-screen.zoom .portal-stack { opacity: 0; transition: opacity 0.3s; }

/* The jump, over the board while it boots */
.warp-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 25; pointer-events: none; }

/* The board's sky, behind the page */
.main { position: relative; }
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.main > :not(.sky-canvas) { position: relative; z-index: 1; }

/* The boot: the sidebar slides in, then the columns and episodes light up one by one */
@media (min-width: 821px) {
  body.boot .side { transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s; }
  body.boot-sky .side { transform: translateX(calc(-100% - 12px)); opacity: 0; }
}
body.boot .col-head, body.boot .tile, body.boot .first-tile { opacity: 0; }
body.boot-pieces .col-head, body.boot-pieces .tile, body.boot-pieces .first-tile {
  animation: boot-pop 0.3s cubic-bezier(0.3, 1.35, 0.5, 1) both;
  animation-delay: calc(var(--slot, 0) * 26ms);
}
@keyframes boot-pop {
  from { opacity: 0; transform: scale(0.9); filter: brightness(1.35); }
  to { opacity: 1; transform: none; filter: none; }
}
/* The wordmark, last: a caret that blinks, tips over into the slash, and types "portal". */
body.boot .side-top .mark:not(.lit) { visibility: hidden; }
.mark .caret { display: inline-block; transform-origin: 50% 58%; transform: skewX(24deg) scaleX(0.55); }
.mark .caret.off { visibility: hidden; }
.mark .caret.tipped { transform: none; transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); }
.mark .untyped { color: transparent; }
