/* Beta design: near-black, thin 1px borders instead of filled boxes, Geist type,
   a white primary button and the logo's blue as the only accent.
   Inspired by Vercel's dashboard (colours and radius measured from vercel.com). */

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0a0a0a;
  --inset: #111;
  --hover: #1a1a1a;
  --hover-strong: #232323;
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.09);
  --text: #ededed;
  --text-2: #a1a1a1;
  --text-3: #707070;
  --accent: #2f9bf0;
  --green: #45a557;
  --red: #ff6166;
  --radius: 6px;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(47, 155, 240, 0.35); }

body.center { display: grid; place-items: center; padding: 24px; }

main { width: 100%; max-width: 320px; }

form { display: grid; gap: 10px; }

input, button {
  font: inherit;
  font-size: 14px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
}

input, select, textarea {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 155, 240, 0.22);
}

button {
  border: 0;
  background: var(--text);
  color: #0a0a0a;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
button:hover { background: #cfcfcf; }
button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

form button, .btn-primary { background: var(--text); color: #0a0a0a; }
form button:hover, .btn-primary:hover { background: #cfcfcf; }

.error { min-height: 18px; color: var(--red); font-size: 13px; }

/* ---------- Header: logo and user on top, tabs underneath ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  height: 56px; padding: 0 24px;
}

.brand { display: flex; align-items: center; padding: 4px; margin-left: -4px; border-radius: var(--radius); }
.brand img { width: 22px; height: 22px; display: block; }

.tabs { display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }

.nav-link {
  position: relative; display: flex; align-items: center;
  height: 40px; padding: 0 10px 2px;
  color: var(--text-2); font-size: 14px; text-decoration: none; white-space: nowrap;
}
.nav-link::before {
  content: ""; position: absolute; inset: 6px 2px 8px; z-index: -1;
  border-radius: var(--radius); transition: background 0.15s;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::before { background: var(--hover); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--text);
}
.tabs .nav-link { isolation: isolate; }

.user { position: relative; }

.user-button {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px; border-radius: var(--radius);
  background: none; color: var(--text-2); font-size: 14px; font-weight: 400;
}
.user-button:hover, .user-button[aria-expanded="true"] { background: var(--hover); color: var(--text); }

.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 180px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.5), 0 16px 24px -8px rgba(0, 0, 0, 0.6);
}
.menu button {
  width: 100%; height: 34px; padding: 0 10px; text-align: left;
  background: none; color: var(--text-2); font-size: 14px; font-weight: 400; border-radius: 4px;
}
.menu button:hover { background: var(--hover); color: var(--text); }

/* ---------- Page ---------- */
.page { max-width: 1040px; margin: 0 auto; padding: 48px 24px 64px; }
.page.narrow { max-width: 592px; }
.page.medium { max-width: 832px; }

h1 { margin-top: 6px; font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.2; color: var(--text); }

.subtitle { margin-top: 6px; font-size: 14px; color: var(--text-2); }

.welcome { font-size: 14px; color: var(--text-2); }

.section-title {
  margin-top: 40px; font-size: 13px; font-weight: 500; color: var(--text-2);
}

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.section-head .section-title + button { margin-bottom: -2px; }

/* Bordered surfaces */
.panel, .info, .versions, .link-card, .download, .builds {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}

/* ---------- Home ---------- */
/* The countdown is one large card: the film's backdrop when TMDB gives one,
   otherwise a faint grid with a glow in the logo's blue. */
.countdown {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 340px; margin-top: 40px; padding: 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.countdown::before, .countdown::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.countdown::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 85% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 85% 0%, #000 0%, transparent 75%);
}
.countdown::after { background: radial-gradient(ellipse 55% 70% at 90% 0%, rgba(47, 155, 240, 0.16), transparent 70%); }

.countdown.has-image {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.1) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, transparent 60%),
    var(--backdrop) center 25% / cover no-repeat;
}
.countdown.has-image::before, .countdown.has-image::after { display: none; }

.countdown-title { font-size: 28px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; color: var(--text); }
.countdown-date { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.countdown.has-image .countdown-date { color: #c8c8c8; }

.countdown-units { display: flex; margin-top: 32px; }
.countdown-units div { display: flex; flex-direction: column; padding: 0 32px; }
.countdown-units div:first-child { padding-left: 0; }
.countdown-units div + div { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.countdown-units span {
  font-family: var(--mono); font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.countdown-units small { margin-top: 10px; font-size: 12px; color: var(--text-2); }

.christmas {
  position: fixed; left: 0; right: 0; bottom: 20px;
  text-align: center; font-size: 12px; color: var(--text-3);
}

/* ---------- Lists ---------- */
.info { margin-top: 12px; }
.page > .info:first-of-type { margin-top: 28px; }
.info div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; font-size: 14px; }
.info div + div { border-top: 1px solid var(--border-soft); }
.info dt { color: var(--text-2); }
.info dd { margin: 0; color: var(--text); }
.info dd a { color: var(--text); text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.info dd a:hover { text-decoration-color: var(--text); }

.versions { margin-top: 12px; overflow: hidden; }
.versions div { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font-size: 14px; }
.versions div + div { border-top: 1px solid var(--border-soft); }
.versions .version, .builds .version { width: 72px; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.versions .date, .builds .date { flex: 1; color: var(--text-2); }

.link, .versions .link, .builds .link, .app-links .link {
  height: auto; padding: 5px 10px; border-radius: var(--radius);
  background: none; color: var(--text-2); font-size: 13px; font-weight: 400; text-decoration: none; cursor: pointer;
}
.versions .link:hover, .builds .link:hover, .app-links .link:hover { background: var(--hover); color: var(--text); }

.unavailable { opacity: 0.4; pointer-events: none; }

.show-all {
  height: 32px; margin-top: 12px; padding: 0 10px; border-radius: var(--radius);
  background: none; color: var(--text-2); font-size: 13px; font-weight: 400;
}
.show-all:hover { background: var(--hover); color: var(--text); }

.empty { margin-top: 12px; font-size: 14px; color: var(--text-2); }

/* ---------- Downloads ---------- */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 28px; }
.download { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; }
.os-icon { width: 24px; height: 24px; color: var(--text); }
.download h2 { margin-top: 20px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.requirements { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.download .btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 40px; margin-top: 24px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.file { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }

/* ---------- Buttons ---------- */
.btn-quiet {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500; text-decoration: none;
}
.btn-quiet:hover { background: var(--hover); border-color: rgba(255, 255, 255, 0.2); }
.btn-primary { color: #0a0a0a; }
button:disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.small { height: 32px; padding: 0 12px; border-radius: var(--radius); font-size: 13px; }

.btn-danger { background: #e5484d; color: #fff; }
.btn-danger:hover { background: #f05a5f; }
.btn-quiet.danger:hover { color: var(--red); border-color: rgba(255, 97, 102, 0.4); }

/* ---------- Link (desktop app sign-in) ---------- */
.link-card { margin-top: 28px; padding: 20px; }
.link-actions { display: flex; gap: 8px; }
.link-actions button { flex: 1; }
.link-cancel { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.link-cancel:hover { background: var(--hover); }

/* ---------- Panels, rows, forms ---------- */
.panel { margin-top: 12px; }
.hint { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.hint a, .app-setup a:not(.btn-quiet), .worker-note a { color: var(--accent); text-decoration: none; }
.hint a:hover, .app-setup a:not(.btn-quiet):hover { text-decoration: underline; }
.hint b, .app-setup b { font-weight: 500; color: var(--text); }

.connection + .connection, .devices .row + .row { border-top: 1px solid var(--border-soft); }
.row { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 10px 12px 10px 16px; font-size: 14px; }
.row-name { width: 160px; font-weight: 500; }
.devices .row-name { width: 200px; }
.row-status { flex: 1; color: var(--text-3); }
.connected .row-status { color: var(--text-2); }

.connect-form, .new-app { display: grid; gap: 10px; padding: 4px 16px 16px; }
.new-app { padding-top: 16px; }
.connect-form input, .new-app input, .new-app select, .build-form input,
.build-panel input, .build-panel select { background: var(--bg); }

select {
  height: 40px; padding: 0 10px; border-radius: var(--radius);
  font: inherit; font-size: 14px;
}
.file-input {
  display: flex; align-items: center; height: 40px; padding: 0 12px;
  border: 1px dashed var(--border); background: var(--bg); border-radius: var(--radius);
  font-size: 14px; color: var(--text-2); cursor: pointer;
}
.file-input:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.file-input input { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-actions.start { justify-content: flex-start; }

/* ---------- Apps and sites ---------- */
.app { margin-top: 12px; padding: 20px; }
.app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.app-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.app-meta { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.app-setup {
  margin-top: 20px; padding: 14px 16px;
  border: 1px solid rgba(47, 155, 240, 0.35); background: rgba(47, 155, 240, 0.06); border-radius: 8px;
  font-size: 13px; line-height: 1.6; color: var(--text-2);
}
.app-setup .form-actions { margin-top: 12px; }

.build-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.build-form input { flex: 1; min-width: 160px; }
.build-form select { flex-basis: 100%; }
.build-form .error { flex-basis: 100%; }

.builds { margin-top: 12px; overflow: hidden; }
.builds div { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font-size: 14px; }
.builds div + div { border-top: 1px solid var(--border-soft); }
.builds .status { width: 150px; }
.builds button.link { height: auto; }

/* Status dots */
.builds .status::before, .site-state::before {
  content: ""; display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; vertical-align: 0; background: var(--text-3);
}
.status.active::before, .site-state.active::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(47, 155, 240, 0.2); }
.status.done::before, .site-state.done::before { background: var(--green); }
.status.failed::before, .site-state.failed::before { background: var(--red); }

.app-links { display: flex; gap: 4px; margin: 12px 0 0 -10px; }
.app-links .remove { margin-left: auto; }
.app-links .remove:hover { color: var(--red); }

.confirm {
  width: min(420px, calc(100% - 32px)); margin: auto; padding: 24px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.confirm::backdrop { background: rgba(0, 0, 0, 0.7); }
.confirm h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.confirm p { margin: 8px 0 24px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.confirm .form-actions button { height: 36px; }

.name-field {
  display: flex; align-items: center;
  border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius);
}
.name-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 155, 240, 0.22); }
.name-field input, .name-field input:focus { flex: 1; min-width: 0; padding-right: 0; border: 0; box-shadow: none; background: none; }
.name-field span { padding-right: 12px; font-size: 14px; color: var(--text-3); }

.site-url { color: var(--text-2); text-decoration: none; }
.site-url:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.site-state { display: inline-flex; align-items: center; font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* Upload area on a site's page */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 12px; padding: 32px 16px;
  border: 1px dashed var(--border); border-radius: 8px;
  background: var(--surface); text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(47, 155, 240, 0.04); }
.drop > .drop-text { font-size: 14px; color: var(--text); }
.drop-hint { font-size: 13px; color: var(--text-3); }
.uploading .drop, .drop.uploading { pointer-events: none; border-style: solid; border-color: var(--accent); }
.uploading .drop-hint, .drop.uploading .drop-hint { visibility: hidden; }
.app .error:empty { display: none; }
.app .error { margin-top: 8px; }

.site-info { flex: 1; padding: 4px 10px; font-size: 13px; color: var(--text-2); }
.worker-note {
  margin-top: 16px; padding: 14px 16px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  font-size: 13px; line-height: 1.6; color: var(--text-2);
}
#cloudflare { margin-top: 28px; }

.site-card {
  display: block; margin-top: 12px; padding: 20px; color: inherit; text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.site-card:hover { border-color: rgba(255, 255, 255, 0.28); background: #0f0f0f; }
.site-card .site-address { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.site-card .site-info { margin-top: 16px; padding: 0; font-size: 13px; color: var(--text-3); }

.crumbs { display: flex; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span:last-child { color: var(--text); }
.site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.site-title { display: flex; align-items: center; gap: 14px; }
.site-title h1 { margin-top: 0; }
.site-head .site-url { display: inline-block; margin-top: 6px; font-family: var(--mono); font-size: 13px; }
.site-actions { display: flex; gap: 8px; }
#error:empty, #upload-error:empty { display: none; }
#error, #upload-error { margin-top: 10px; }
.files .file-path {
  flex: 1; min-width: 0; overflow-wrap: anywhere;
  font-family: var(--mono); font-size: 13px; color: var(--text); text-decoration: none;
}
.files .file-path:hover { text-decoration: underline; text-underline-offset: 3px; }
.files .date { flex: none; }

.build-panel { display: grid; gap: 10px; margin-top: 20px; padding: 16px; }
#setup { margin-top: 20px; }
#builds { margin-top: 12px; }

.login-mark { display: block; width: 48px; height: 48px; margin: 0 auto 32px; }

/* ---------- Drop ---------- */
.drop-body { height: 100vh; min-height: 0; display: flex; flex-direction: column; }
.drop-page { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 16px; }
.drop-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 24px max(16px, calc((100% - 728px) / 2)) 12px; }
.drop-composer, .drop-error { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 16px; }
.drop-empty { margin-top: 40px; text-align: center; font-size: 14px; color: var(--text-2); }
.drop-day {
  display: flex; align-items: center; gap: 12px; margin: 24px 0 8px;
  font-size: 12px; color: var(--text-3);
}
.drop-day::before, .drop-day::after { content: ""; flex: 1; height: 1px; background: var(--border-soft); }
.drop-item { margin-top: 14px; }
.drop-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; color: var(--text-3); }
.drop-item .drop-text {
  display: inline-block; max-width: 100%; padding: 9px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.drop-item .drop-text a { color: var(--accent); }
.drop-media {
  display: block; width: 420px; max-width: 100%; overflow: hidden;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.drop-media img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; }
video.drop-media { max-height: 360px; }
.drop-file {
  display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 8px 14px 8px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: inherit; text-decoration: none; transition: border-color 0.15s;
}
.drop-file:hover { border-color: rgba(255, 255, 255, 0.28); }
.drop-file-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--hover); color: var(--text-2);
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.02em;
}
.drop-file-text { display: flex; flex-direction: column; min-width: 0; }
.drop-file-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-file-size { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.drop-pending { font-size: 13px; color: var(--text-3); }

/* Message box: + , text and Send share one bordered field. */
.drop-composer {
  display: flex; align-items: flex-end; gap: 4px;
  max-width: 728px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.drop-composer:hover { border-color: rgba(255, 255, 255, 0.24); }
.drop-composer:focus-within { border-color: rgba(255, 255, 255, 0.32); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
.drop-composer textarea,
.drop-composer textarea:hover,
.drop-composer textarea:focus {
  flex: 1; min-height: 32px; max-height: 160px; padding: 6px 6px; resize: none;
  border: 0; background: none; box-shadow: none;
  font: inherit; font-size: 14px; line-height: 20px;
}
.drop-attach {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border-radius: var(--radius); background: none; color: var(--text-2);
}
.drop-attach:hover { background: var(--hover); color: var(--text); }
.drop-attach svg { width: 18px; height: 18px; }
.drop-send { flex: none; height: 32px; padding: 0 14px; border-radius: var(--radius); font-size: 13px; }
.drop-error { margin-top: 6px; }
.drop-overlay {
  position: fixed; inset: 12px; z-index: 50; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.85); border: 1px dashed var(--accent); border-radius: 12px;
  font-size: 16px; color: var(--text); pointer-events: none;
}
.drop-more { position: relative; opacity: 0; }
.drop-item:hover .drop-more, .drop-more.open, .drop-more:focus-within { opacity: 1; }
.drop-more-button { display: grid; place-items: center; width: 24px; height: 20px; padding: 0; border-radius: 4px; background: none; color: var(--text-3); }
.drop-more-button:hover, .drop-more.open .drop-more-button { background: var(--hover); color: var(--text); }
.drop-more-button svg { width: 16px; height: 16px; fill: currentColor; }
.drop-menu { left: 0; right: auto; min-width: 150px; z-index: 10; }
.drop-menu .danger, .drop-menu .danger:hover { color: var(--red); }
.drop-menu.up { top: auto; bottom: calc(100% + 6px); }

.drop-item.is-reply { margin-top: 4px; }
.drop-quote {
  display: flex; align-items: center; gap: 6px; max-width: 100%; height: auto; margin: 0 0 4px; padding: 0;
  background: none; color: var(--text-3); font-size: 12px; font-weight: 400; text-align: left;
}
.drop-quote:hover { background: none; }
.drop-quote:hover .drop-quote-text { color: var(--text-2); }
.drop-quote-hook {
  flex: none; width: 18px; height: 8px; margin: 6px 0 0 6px;
  border-top: 1px solid #3a3a3a; border-left: 1px solid #3a3a3a; border-top-left-radius: 6px;
}
.drop-quote-name { flex: none; color: var(--text-2); font-weight: 500; }
.drop-quote-name:empty { display: none; }
.drop-quote-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-quote.deleted { cursor: default; font-style: italic; }
.drop-item.flash { border-radius: 8px; animation: drop-flash 1600ms ease-out; }
@keyframes drop-flash {
  0%, 30% { background: var(--hover); box-shadow: 0 0 0 6px var(--hover); }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
.drop-reply {
  display: flex; align-items: center; gap: 8px; width: 100%; max-width: 760px; margin: 0 auto 6px; padding: 0 16px;
  font-size: 13px; color: var(--text-2);
}
.drop-reply[hidden] { display: none; }
.drop-reply span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-reply b { color: var(--text); font-weight: 500; }
.drop-reply button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; background: none; color: var(--text-3); }
.drop-reply button:hover { background: var(--hover); color: var(--text); }
.drop-reply svg { width: 14px; height: 14px; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #2e2e2e transparent; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .tabs { padding: 0 8px; }
  .page { padding: 32px 16px 48px; }
  h1 { font-size: 26px; }
  .countdown { min-height: 300px; padding: 20px; }
  .countdown-title { font-size: 22px; }
  .countdown-units { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 24px; }
  .countdown-units div { padding: 0 0 0 10px; }
  .countdown-units span { font-size: 24px; }
  .countdown-units small { font-size: 11px; }
  .row-name, .devices .row-name { width: auto; flex: none; }
  .builds .status { width: auto; }
}
