/* The site's own pages: the front page, the editor, and signing in. Members' pages use page.css.
   The colors are Palscape's page look (indigo, with warm chips), light or dark. */

:root {
  color-scheme: light dark;
  --bg: #f3f2fa; --bg2: #e8e6f6; --card: #ffffff; --fg: #1c1b29; --muted: #625f78; --line: #dddbef;
  --accent: #534ab7; --accent2: #6d64d8; --accent-fg: #ffffff; --link: #4a41a8; --soft: #eeedfe;
  --gold: #ffd54a; --gold2: #f5b50f; --gold-fg: #3a2a00;
  --chip: #faeeda; --chip-fg: #633806;
  --ok: #2e8a47; --warn: #9a6a00; --bad: #b3261e;
  --shadow: 0 1px 2px rgba(28, 27, 41, .06), 0 6px 20px rgba(28, 27, 41, .07);
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416; --bg2: #1b1a22; --card: #1e1e24; --fg: #ececf0; --muted: #a2a0b0; --line: #2f2e38;
    --link: #b3adf5; --soft: #2a2840; --chip: #3b301d; --chip-fg: #f6d9a8;
    --ok: #6cc04a; --warn: #f0b030; --bad: #ff8a7d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); display: flex; flex-direction: column; }
a { color: var(--link); }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; }
.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1rem; }

/* The bar along the top. */
.topbar { background: linear-gradient(var(--accent2), var(--accent)); color: var(--accent-fg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 rgba(0, 0, 0, .15); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { color: inherit; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); white-space: nowrap; }
.account { display: flex; align-items: center; gap: .6rem; font-size: .95rem; min-width: 0; }
.account .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .number { opacity: .75; }

/* Buttons. */
button, .button {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .45rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg);
  cursor: pointer; text-decoration: none; line-height: 1.3;
}
button:hover, .button:hover { border-color: var(--accent2); }
button:disabled { opacity: .5; cursor: default; border-color: var(--line); }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.primary { background: linear-gradient(var(--accent2), var(--accent)); color: var(--accent-fg); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.gold { background: linear-gradient(var(--gold), var(--gold2)); color: var(--gold-fg); border-color: rgba(0, 0, 0, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 6px rgba(0, 0, 0, .15); }
.ghost { background: transparent; }
.on-bar { background: rgba(255, 255, 255, .14); color: var(--accent-fg); border-color: rgba(255, 255, 255, .35); }
.on-bar:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .6); }
.big { padding: .75rem 1.4rem; font-size: 1.05rem; border-radius: 12px; }
.small { padding: .25rem .6rem; font-size: .9rem; border-radius: 8px; }
.danger { color: var(--bad); }
.icon-button { padding: .2rem .5rem; min-width: 2rem; }

/* Fields. */
input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; }
textarea { width: 100%; resize: vertical; }
select { padding-right: 1.8rem; }
.code { font: .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); }
.hint { color: var(--muted); font-size: .92rem; margin: .3rem 0 .8rem; }
.note { color: var(--muted); font-size: .9rem; }

/* Messages. */
#message { border-radius: 12px; padding: .7rem 1rem; margin: 1rem 0; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--warn); box-shadow: var(--shadow); }
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  background: var(--fg); color: var(--bg); padding: .5rem 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: opacity .2s, transform .2s; box-shadow: var(--shadow);
}
.toast.shown { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Footer. */
.foot { margin-top: auto; padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
.foot a { color: inherit; }

/* ───────────── The front page ─────────────
   Early-2000s on purpose: a starry tiled background, a ticker, a WordArt headline, windows, and
   88×31 buttons. Its own fixed colors (sites didn't have dark mode then), all readable. */

body.home {
  --win: #ece9d8; --win-text: #1c1b29; --title1: #2a5bd7; --title2: #0a2a8c; --title-text: #ffffff;
  --retro-font: Verdana, Tahoma, "Trebuchet MS", system-ui, sans-serif;
  --display-font: "Arial Black", "Arial Bold", Gadget, Impact, system-ui, sans-serif;
  color-scheme: dark;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3Ccircle cx='64' cy='9' r='.7'/%3E%3Ccircle cx='118' cy='40' r='1.1'/%3E%3Ccircle cx='30' cy='76' r='.6'/%3E%3Ccircle cx='96' cy='96' r='.8'/%3E%3Ccircle cx='52' cy='122' r='1'/%3E%3Ccircle cx='130' cy='128' r='.6'/%3E%3Ccircle cx='8' cy='110' r='.7'/%3E%3C/g%3E%3Cpath fill='%23ffe066' fill-opacity='.8' d='M168 150l1.6 5 5 1.6-5 1.6-1.6 5-1.6-5-5-1.6 5-1.6z'/%3E%3Cpath fill='%23ff9de2' fill-opacity='.7' d='M40 190l1 3.4 3.4 1-3.4 1-1 3.4-1-3.4-3.4-1 3.4-1z'/%3E%3C/svg%3E") 0 0 / 220px 220px, linear-gradient(#0f0a33, #2a1d7a 60%, #3b1f7a) fixed;
  color: #f2efff; font-family: var(--retro-font);
}
.home a { color: #9fd4ff; }
.home .topbar a.brand, .home .topbar a.button { color: #fff; }
.home main { overflow-x: clip; }  /* the stickers lean out; the page mustn't scroll sideways */
.home .topbar { background: linear-gradient(#7d74ff, #4b3fd0 48%, #3a2fb8 52%, #5a4fe0); border-bottom: 2px solid #1d1570; }
.home .brand { font-family: var(--display-font); letter-spacing: .01em; }

/* The ticker. */
.ticker { overflow: hidden; background: #000; color: #ffe066; border-bottom: 2px solid #ff4fb0; font: bold 13px/1 var(--retro-font); padding: .45rem 0; white-space: nowrap; }
.ticker-track { display: inline-block; animation: ticker 38s linear infinite; }
.ticker-track span { padding-right: 2rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding-top: 3rem; padding-bottom: 3rem; }
.sticker {
  display: inline-grid; place-items: center; width: 5.2rem; height: 5.2rem; margin: 0 0 .6rem -.3rem; transform: rotate(-12deg);
  background: #ffe066; color: #d4145a; font: 900 1.05rem/1 var(--display-font); text-align: center;
  clip-path: polygon(50% 0, 61% 18%, 82% 10%, 79% 32%, 100% 38%, 84% 54%, 96% 74%, 74% 76%, 70% 98%, 50% 86%, 30% 98%, 26% 76%, 4% 74%, 16% 54%, 0 38%, 21% 32%, 18% 10%, 39% 18%);
  animation: wiggle 2.4s ease-in-out infinite;
}
@keyframes wiggle { 0%, 100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(-6deg) scale(1.06); } }
.hero h1 {
  font-family: var(--display-font); font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 1.1rem;
  font-style: italic; transform: skew(-4deg);
  background: linear-gradient(180deg, #fff6a8 0%, #ffd54a 38%, #ff8a3d 62%, #ff4fb0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(3px 3px 0 #1a0f5c) drop-shadow(1px 1px 0 #1a0f5c);
}
.hero h1 em { font-style: inherit; background: linear-gradient(180deg, #e8fbff 0%, #8fe3ff 40%, #4a9dff 65%, #b27cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.05rem; line-height: 1.65; color: #ddd8ff; text-shadow: 0 1px 3px #0f0a33, 0 0 8px #0f0a33; margin: 0 0 1.6rem; max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .9rem; }
.home .button.big { font-family: var(--retro-font); font-weight: 700; border-radius: 8px; border: 2px outset #fff3b8; }
.home .button.gold { background: linear-gradient(#fff3a8, #ffd54a 50%, #f5b50f 51%, #ffce3a); color: #3a2a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.home .button.ghost { background: linear-gradient(#ffffff, #dcdcec 50%, #c8c8de 51%, #e4e4f2); color: #1c1b29; border-color: #f4f4ff; text-shadow: 0 1px 0 #fff; }
.home .note { color: #b9b2ea; font-size: .85rem; text-shadow: 0 1px 3px #0f0a33; }

/* A page in miniature (decoration only). */
.mock { position: relative; background: #fff; color: #1c1b29; border: 3px solid #fff; outline: 2px solid #1a0f5c; border-radius: 6px; box-shadow: 8px 8px 0 rgba(10, 5, 40, .55); transform: rotate(2deg); max-width: 23rem; justify-self: center; width: 100%; }
.mock::after { content: "NEW!"; position: absolute; top: -1.1rem; right: -1rem; width: 3.6rem; height: 3.6rem; display: grid; place-items: center; background: #ff4fb0; color: #fff; font: 900 .9rem var(--display-font); border-radius: 50%; transform: rotate(14deg); box-shadow: 2px 2px 0 #1a0f5c; }
.mock-bar { background: linear-gradient(#6aa0ff, #2a5bd7); color: #fff; padding: .45rem .9rem; font: bold .9rem var(--retro-font); }
.mock-body { padding: 1rem 1rem 1.1rem; display: grid; gap: .7rem; font-family: var(--retro-font); }
.mock-who { display: flex; align-items: center; gap: .8rem; }
.mock-avatar { width: 3.4rem; height: 3.4rem; border: 2px solid #c9c4f0; background: #eeedfe; display: grid; place-items: center; font-size: 1.9rem; flex-shrink: 0; }
.mock-name { display: block; font: 900 1.25rem var(--display-font); background: linear-gradient(90deg, #ff2d95, #8a5cf6, #1fa2ff, #18c27a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mock-online { color: #1f9d3a; font-size: .8rem; font-weight: bold; }
.mock-mood { font-size: .82rem; color: #4a4670; }
.mock-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.mock-chips span { background: #faeeda; color: #633806; border: 1px solid #e8c98f; padding: 0 .5rem; font-size: .75rem; }
.mock-label { font: bold .72rem var(--retro-font); color: #fff; background: #ff8a3d; padding: .15rem .5rem; }
.mock-top8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.mock-top8 span { aspect-ratio: 1; display: grid; place-items: center; font-size: 1.35rem; background: #f3f2fa; border: 1px solid #c9c4f0; }
.mock-song { display: flex; align-items: center; gap: .5rem; background: #111; color: #7dff8a; border: 2px inset #555; padding: .35rem .6rem; font: .78rem ui-monospace, monospace; }
.mock-song b { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; background: #2a5bd7; color: #fff; font-size: .65rem; border: 1px outset #8fb4ff; }
.mock-counter { display: flex; justify-content: center; gap: .15rem; }
.mock-counter span { background: #111; color: #fff; font: 700 1rem ui-monospace, monospace; padding: .2rem .35rem; border-radius: 3px; box-shadow: inset 0 -8px 0 rgba(255, 255, 255, .1); }

.section-title { text-align: center; font: 900 clamp(1.5rem, 3.6vw, 2.2rem)/1.15 var(--display-font); font-style: italic; color: #ffe066; margin: 1rem 0 .4rem; filter: drop-shadow(3px 3px 0 #1a0f5c); }
.section-lede { text-align: center; color: #ddd8ff; text-shadow: 0 1px 3px #0f0a33; margin: 0 auto 2rem; max-width: 36rem; }

/* Windows. */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; padding-bottom: 3rem; }
.window { background: var(--win); color: var(--win-text); border: 2px outset #ffffff; border-radius: 8px 8px 4px 4px; box-shadow: 5px 5px 0 rgba(10, 5, 40, .5); overflow: hidden; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem .4rem .3rem .6rem; background: linear-gradient(var(--title1), var(--title2)); color: var(--title-text); font: bold .82rem var(--retro-font); }
.titlebar .controls { display: flex; gap: .2rem; }
.titlebar .controls i { display: grid; place-items: center; width: 1.1rem; height: 1rem; background: #ece9d8; color: #000; border: 1px outset #fff; font: bold .62rem/1 var(--retro-font); font-style: normal; }
.titlebar .controls i:last-child { background: #e0533c; color: #fff; }
.window-body { padding: .9rem 1rem 1rem; }
.window-body h3 { margin: 0 0 .3rem; font: 900 1.05rem var(--retro-font); display: flex; align-items: center; gap: .45rem; }
.window-body p { margin: 0; font-size: .88rem; line-height: 1.55; color: #3b3854; }

/* The house rules, as a readme. */
.promise { padding-top: .5rem; padding-bottom: 2.5rem; }
.promise .window { max-width: 52rem; margin: 0 auto; }
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.promise li { display: flex; gap: .7rem; align-items: flex-start; }
.promise .icon { font-size: 1.4rem; line-height: 1.2; }
.promise strong { display: block; margin-bottom: .15rem; }
.promise li span:not(.icon) { color: #3b3854; font-size: .88rem; }
.closing { text-align: center; padding: 1.5rem 1rem 1rem; }
.closing h2 { font: 900 clamp(1.4rem, 3.4vw, 2rem) var(--display-font); font-style: italic; color: #fff; margin: 0 0 1rem; filter: drop-shadow(3px 3px 0 #1a0f5c); }

/* 88×31 buttons. */
.buttons88 { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: 1.5rem 1rem .5rem; list-style: none; margin: 0; }
.buttons88 li { width: 88px; height: 31px; display: grid; place-items: center; text-align: center; font: bold 9px/1.05 Verdana, Tahoma, sans-serif; letter-spacing: .02em; text-transform: uppercase; border: 1px solid #000; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .5), inset -1px -1px 0 rgba(0, 0, 0, .35); padding: 0 3px; }
.b-palscape { background: linear-gradient(#7d74ff, #3a2fb8); color: #ffe066; }
.b-worms { background: #000; color: #7dff8a; }
.b-browser { background: linear-gradient(#ffffff, #c9c9d6); color: #1a0f5c; }
.b-top8 { background: linear-gradient(#ff8ac9, #ff4fb0); color: #fff; }
.b-construction { background: repeating-linear-gradient(45deg, #ffd000 0 8px, #111 8px 16px); color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.b-guestbook { background: #2a5bd7; color: #ffe066; }
.home .foot { color: #b9b2ea; font-family: var(--retro-font); font-size: .82rem; padding-top: .5rem; }
.home .foot a { color: #ffe066; }

@media (prefers-reduced-motion: reduce) { .ticker-track, .sticker { animation: none; } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2.4rem; padding-top: 2rem; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .promise ul { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .cta .button { flex: 1; }
  .mock { transform: rotate(1deg); }
  .mock::after { right: -.3rem; }
}

/* ───────────── The editor ───────────── */

.editor-main { padding-top: 1.5rem; padding-bottom: 3rem; }
.editor-grid { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.sections { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .15rem; }
.sections a { color: var(--fg); text-decoration: none; padding: .45rem .75rem; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.sections a:hover { background: var(--soft); }
.sections .soon { color: var(--muted); font-size: .85rem; padding: .6rem .75rem 0; }
.panels { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem 1.3rem; box-shadow: var(--shadow); scroll-margin-top: 1rem; min-width: 0; }
.panel > h2 { font-size: 1.15rem; margin: 0 0 .3rem; display: flex; align-items: center; gap: .5rem; }
.panel > h2 .icon { font-size: 1.1rem; }
.panel h3 { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 1.2rem 0 .5rem; }
.loading { color: var(--muted); }

/* The page's on/off card. */
.status { display: flex; align-items: center; gap: 1rem 1.4rem; flex-wrap: wrap; }
.status .state { flex: 1; min-width: 14rem; }
.status h2 { margin: 0 0 .2rem; font-size: 1.3rem; }
.status .url { font-weight: 600; overflow-wrap: anywhere; }
.status .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.status.live { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); margin-right: .35rem; vertical-align: .05em; }
.live .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

/* Switches: checkboxes drawn as toggles. */
.switches { border: 0; margin: 0; padding: 0; min-width: 0; }
.switches:disabled { opacity: .55; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.group > .row:first-of-type { border-top: 0; }
.row.under { padding-left: 1.4rem; }
.row .label { flex: 1; }
.row .sub { display: block; color: var(--muted); font-size: .88rem; }
.row.extra { padding-left: 1.4rem; flex-wrap: wrap; justify-content: flex-start; gap: .4rem .8rem; color: var(--muted); font-size: .95rem; border-top: 0; padding-top: 0; }
.group { margin-bottom: .4rem; }
input.toggle {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 2.75rem; height: 1.6rem; border-radius: 999px; padding: 0; margin: 0;
  background: var(--line); border: 0; position: relative; cursor: pointer; transition: background .15s;
}
input.toggle::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
input.toggle:checked { background: var(--accent); }
input.toggle:checked::after { transform: translateX(1.15rem); }
input.toggle:disabled { cursor: default; opacity: .6; }
input.toggle.big-toggle { width: 3.4rem; height: 1.95rem; }
input.toggle.big-toggle::after { width: 1.55rem; height: 1.55rem; }
input.toggle.big-toggle:checked { background: var(--ok); }
input.toggle.big-toggle:checked::after { transform: translateX(1.45rem); }
@media (prefers-reduced-motion: reduce) { input.toggle, input.toggle::after { transition: none; } }

/* The theme. */
.presets { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 .6rem; }
.preset { flex-direction: column; align-items: stretch; gap: .35rem; padding: .4rem .4rem .45rem; width: 7.2rem; font-size: .9rem; }
.preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.swatch { display: grid; grid-template-rows: .55rem 1fr; height: 3rem; border-radius: 7px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .12); }
.swatch .s-bar { display: block; }
.swatch .s-page { display: flex; align-items: center; justify-content: center; }
.swatch .s-card { width: 62%; height: 1.3rem; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: .2rem; }
.swatch .s-dot { width: .5rem; height: .5rem; border-radius: 50%; }
.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .5rem; }
.colors label { display: flex; align-items: center; gap: .55rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; }
.colors input[type="color"] { width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; flex-shrink: 0; }
.colors input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.colors input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .15); border-radius: 8px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem .9rem; }
.choices label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; color: var(--muted); }
.choices select { color: var(--fg); }
.notes { color: var(--warn); font-size: .92rem; min-height: 1.2rem; margin: .6rem 0 0; }

/* Lists: the Top 8, entries, bulletins, pictures to review. */
.top8-list { list-style: none; padding: 0; margin: .4rem 0 .8rem; display: grid; gap: .4rem; counter-reset: top8; }
.top8-list li { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 12px; counter-increment: top8; }
.top8-list li::before { content: counter(top8); font-weight: 800; color: var(--muted); width: 1.2rem; text-align: center; }
.top8-list .avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.top8-list .name { flex: 1; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.top8-list .name .sub { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.top8-list .moves { display: flex; gap: .25rem; }
.empty { padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.entries-list { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .5rem; }
.entries-list li { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
.entries-list .meta { color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.entries-list .meta strong { color: var(--fg); }
.entry-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .35rem 0 .5rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.inline-form { display: flex; gap: .5rem; }
.inline-form input { flex: 1; min-width: 0; }
.compose { display: grid; gap: .5rem; }
.compose .buttons { justify-content: space-between; }
.counted { color: var(--muted); font-size: .85rem; }
.current { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .8rem; background: var(--bg); border-radius: 12px; margin-bottom: .7rem; }
.current .what { flex: 1; min-width: 10rem; }
.preview { display: block; max-width: 100%; max-height: 13rem; border: 1px solid var(--line); border-radius: 10px; }
.picture { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 1rem; align-items: start; margin-bottom: .8rem; }
.pill { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.wait { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.file { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.file input { max-width: 100%; border: 0; padding: 0; background: transparent; color: var(--muted); }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: .7rem; padding: .45rem .9rem; border-radius: 10px;
  border: 1px solid transparent; background: linear-gradient(var(--accent2), var(--accent)); color: var(--accent-fg); cursor: pointer;
}

/* The badge. */
.badge-preview { padding: 1rem; background: var(--bg); border-radius: 12px; display: flex; justify-content: center; margin: .6rem 0; }
.badge-preview img { max-width: 100%; }
.snippets { display: grid; gap: .6rem; }
.snippets label { display: grid; gap: .25rem; font-size: .88rem; color: var(--muted); }

/* Signing in. */
.welcome { max-width: 30rem; margin: 3rem auto; text-align: center; }
.welcome .icon { font-size: 2.6rem; }
.welcome h1 { margin: .4rem 0 .5rem; font-size: 1.7rem; letter-spacing: -.02em; }
.welcome p { color: var(--muted); }
.welcome .buttons { justify-content: center; margin-top: 1.2rem; }
.dev-form { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }

@media (max-width: 860px) {
  .editor-grid { grid-template-columns: 1fr; gap: .8rem; }
  .sections { position: sticky; top: 0; z-index: 2; flex-direction: row; overflow-x: auto; gap: .3rem; padding: .5rem 0; margin: 0 -1rem; padding-inline: 1rem; background: var(--bg); scrollbar-width: none; }
  .sections a { white-space: nowrap; background: var(--card); border: 1px solid var(--line); padding: .3rem .75rem; font-size: .9rem; }
  .sections .soon { display: none; }
  .panel { padding: 1rem 1.05rem 1.1rem; }
  .picture { grid-template-columns: 1fr; }
}
.topbar button, .topbar .button { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 480px) {
  .account .number { display: none; }
  .brand { font-size: 1rem; }
  .account { font-size: .88rem; gap: .4rem; }
}
