/* Is AO3 down? Same look as Fic Shelf: AO3 red on paper, a LifeSim charcoal bar, LifeSim blue. */
@font-face { font-family: "Nichrome"; font-weight: 900; font-display: swap; src: url("/ao3/fonts/nichrome.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("/ao3/fonts/inter.woff2") format("woff2"); }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
:root {
  --red: #990000; --ink: #1c1c1e; --paper: #f7f6f3; --card: #fff; --line: #1c1c1e1f; --text: #1c1c1e; --mute: #1c1c1e99; --blue: #007aff;
  --ringc: #ffbb03, #ff8812 8%, #ff3b30 22%, #c10168 40%, #6e1bb0 60%, #003fff 78%, #3d8bff 90%, #ffbb03;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Nichrome", "Inter", Impact, sans-serif;
  --bar: calc(52px + env(safe-area-inset-top));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--text); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; padding-top: var(--bar); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

/* ---------- top bar: fixed, two things ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 25; height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: env(safe-area-inset-top) 18px 0; background: var(--ink); color: #fff; }
.logo { font: 900 22px/1 var(--display); letter-spacing: .03em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }

main { max-width: 1000px; margin: 0 auto; padding: 0 18px; }

/* ---------- first screen: the button sits in the exact middle ---------- */
.hero { min-height: calc(100vh - var(--bar)); min-height: calc(100svh - var(--bar)); display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; text-align: center; user-select: none; -webkit-user-select: none; position: relative; }
.hero-top { align-self: end; padding: 14px 0 22px; }
.hero-bot { align-self: start; padding-top: 26px; }
.checked { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--mute); }
.checked i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; }
.checked.up i { background: #34c759; }
.mute { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; margin-left: 2px; }
.mute svg { width: 14px; height: 14px; }
.q { font: 900 clamp(28px, 5.2svh, 54px)/1 var(--display); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .02em; }
#yes { font: 900 clamp(70px, 13svh, 140px)/.86 var(--display); margin: 0; color: var(--red); }
#yes.back { color: #1e8f3c; }
#sub { margin: 8px 0 0; color: var(--mute); font-size: 14px; }
#sub b { color: var(--text); }

.btn-wrap { --s: min(70vw, 36svh, 320px); position: relative; width: var(--s); height: var(--s); }
.ring { position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(#0000 calc(var(--p) * 1turn), #e7e5e0 0), conic-gradient(var(--ringc));
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, #0000 calc(100% - 10px), #000 calc(100% - 9px));
  transition: --p .3s; }
.big { position: relative; width: 100%; height: 100%; border-radius: 50%; touch-action: manipulation;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(180deg, #ffffff40 0%, #fff0 42%), radial-gradient(circle at 32% 26%, #ff6a5c 0%, #d42a2a 32%, #990000 68%, #5e0000 100%);
  box-shadow: 0 12px 0 #5e0000, 0 22px 34px #99000052, inset 0 -10px 24px #0005, inset 0 2px 0 #fff5;
  transition: transform .08s, box-shadow .08s; }
.big:focus-visible { outline: 3px solid var(--blue); outline-offset: 20px; }
.big.down { transform: translateY(9px) scale(.985); box-shadow: 0 3px 0 #5e0000, 0 8px 16px #99000052, inset 0 -6px 18px #0006, inset 0 2px 0 #fff4; }
.big.back { background: linear-gradient(180deg, #ffffff40 0%, #fff0 42%), radial-gradient(circle at 32% 26%, #7ee08f, #34c759 35%, #1e8f3c 70%, #0d5a22); box-shadow: 0 12px 0 #0b4a1b, 0 22px 34px #1e8f3c52; }
.b-label { font: 900 calc(var(--s) * .15)/1 var(--display); text-transform: uppercase; letter-spacing: .04em; text-shadow: 0 3px 0 #0004; }
.b-count { font: 800 calc(var(--s) * .11)/1.1 var(--sans); font-variant-numeric: tabular-nums; margin-top: 6px; }
.combo { position: absolute; right: -8px; top: 0; font: 900 34px/1 var(--display); color: var(--blue); transform: rotate(10deg); text-shadow: 0 3px 0 #fff; opacity: 0; pointer-events: none; }
.combo.on { opacity: 1; } .combo.hot { color: #c10168; } .combo.fire { color: #ff3b30; }
.combo.pop { animation: pop .18s ease-out; }
@keyframes pop { 0% { transform: rotate(10deg) scale(1.35); } 100% { transform: rotate(10deg) scale(1); } }
.line { margin: 0; font-size: 17px; font-weight: 600; max-width: 26em; min-height: 2.9em; text-wrap: balance; }
.plus { position: absolute; pointer-events: none; font: 900 26px/1 var(--display); color: #fff; text-shadow: 0 2px 0 #5e0000; z-index: 3; }
.confetti { position: fixed; width: 12px; height: 12px; border-radius: 2px; pointer-events: none; z-index: 20; font: 700 8px/12px var(--sans); color: #fff; text-align: center; }

/* ---------- two columns ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; align-items: start; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; min-width: 0; }
.card h2 { margin: 0 0 12px; font: 900 20px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; align-items: baseline; }
.card h2 span { font: 600 13px var(--sans); color: var(--mute); letter-spacing: 0; }
.hint { color: var(--mute); font-size: 13px; }
.achs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.achs li { font-size: 13px; padding: 5px 10px; border-radius: 7px; background: #1c1c1e08; color: #1c1c1e66; border: 1px dashed #1c1c1e2e; cursor: default; }
.achs li.got { background: #9900000f; border: 1px solid #99000066; color: var(--red); font-weight: 600; }
.achs li.got::before { content: "✓ "; color: var(--blue); font-weight: 700; }

.ach-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.more { padding: 7px 14px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.board { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.board li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.board li:first-child { border-top: 0; }
.board li .r { color: var(--mute); font-variant-numeric: tabular-nums; }
.board li .p { font-family: ui-monospace, Menlo, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .p small { display: block; font: 12px var(--sans); color: var(--mute); }
.board li .n { font-variant-numeric: tabular-nums; font-weight: 700; }
.board li.me .p { color: var(--red); font-weight: 700; }

.share { padding: 13px 26px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; }
.share:active { transform: scale(.97); }

.you { margin: 12px 0 0; font-size: 13px; color: var(--mute); }
.you b { color: var(--text); font-family: ui-monospace, Menlo, monospace; }
.link { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; margin-left: 4px; }

/* ---------- share card ---------- */
.brag { margin: 40px auto 0; max-width: 520px; text-align: center; }
.brag-card { text-align: left; border-radius: 26px; padding: 26px 26px 20px; color: #fff; background: #990000; }
.brag-q { margin: 0 0 16px; font: 700 clamp(21px, 5vw, 26px)/1.25 var(--sans); letter-spacing: -.01em; text-wrap: balance; }
.brag-q b { font: 900 1.4em/1 var(--display); color: #ffd34d; }
.brag-url { font: 600 12px ui-monospace, Menlo, monospace; color: #ffffffa6; }
.brag-acts { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.share { padding: 12px 24px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.share.alt { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* ---------- the LifeSim card ---------- */
.city { margin: 40px 0 0; background: #fff; border-radius: 34px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 1px 2px #1c1c1e0f, 0 18px 44px #1c1c1e12; }
@media (min-width: 760px) { .city { grid-template-columns: 1.2fr 1fr; align-items: center; gap: 12px; } }
.city-map { display: block; border-radius: 24px; overflow: hidden; aspect-ratio: 1312 / 942; background: #1b1f3a; }
.city-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.city-copy { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.city-copy h2 { margin: 0 0 4px; font: 900 clamp(32px, 5vw, 44px)/1 var(--display); text-transform: uppercase; letter-spacing: .02em; text-wrap: balance; }
.city-copy select { width: 100%; background: #f2f2f4; color: var(--text); border: 0; border-radius: 14px; padding: 12px 14px; font: 600 15px var(--sans); }
.city-cta { display: block; text-align: center; padding: 14px 20px; border-radius: 16px; text-decoration: none; color: #fff; font-weight: 700; font-size: 16px;
  background: linear-gradient(180deg, #ffffff40, #fff0 50%), radial-gradient(circle at 25% 20%, #5fb0ff, #1f8bff 40%, #007aff 75%, #0064d6); }

/* "Built with love by LifeSim.com": LifeSim blue, the ring logo. One line on wide screens, two on phones. */
.built { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 99px; text-decoration: none; color: #fff; font-size: 13px; line-height: 1.15; white-space: nowrap; flex: none;
  background: linear-gradient(180deg, #ffffff40, #fff0 50%), radial-gradient(circle at 25% 20%, #5fb0ff, #1f8bff 40%, #007aff 75%, #0064d6);
  box-shadow: 0 2px 10px #007aff59, inset 0 1px 0 #fff6; }
.built img { width: 26px; height: 26px; border-radius: 50%; background: #0b1530; padding: 2px; flex: none; }
.built small { font-size: inherit; opacity: .9; }
.built b { font-weight: 800; }
.built:hover { filter: brightness(1.08); }
@media (max-width: 480px) {
  .top { padding-left: 14px; padding-right: 10px; }
  .logo { font-size: 19px; }
  .built span { display: flex; flex-direction: column; }
  .built small { font-size: 10.5px; }
  .built b { font-size: 13.5px; }
  .built { padding-right: 12px; }
}

/* ---------- footer ---------- */
.foot { position: relative; margin-top: 60px; background: #141416; color: #ffffffb3; overflow: hidden; }
.foot-art { height: 150px; background: url("/ao3/img/coast.webp") center 60% / cover; -webkit-mask: linear-gradient(#000 20%, #0000); mask: linear-gradient(#000 20%, #0000); opacity: .55; }
.foot-in { position: relative; max-width: 1060px; margin: -70px auto 0; padding: 0 22px 30px; display: grid; gap: 30px 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .foot-brand { grid-column: auto; } }
.foot-logo { font: 900 28px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: #fff; text-decoration: none; }
.foot-brand p { margin: 10px 0 16px; font-size: 14px; max-width: 26em; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col h3 { margin: 0 0 4px; font: 700 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #ffffff66; }
.foot-col a { color: #ffffffcc; text-decoration: none; font-size: 14.5px; }
.foot-col a:hover { color: #fff; }
.foot-bottom { max-width: 1060px; margin: 0 auto; padding: 18px 22px calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid #ffffff1a; font-size: 12.5px; color: #ffffff73; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
.foot-bottom p { margin: 0; max-width: 46em; }
main { padding-bottom: 0; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); flex-direction: column-reverse !important; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #fff; color: var(--ink); border-radius: 14px; padding: 12px 16px 12px 14px; box-shadow: 0 10px 30px #1c1c1e40; border-left: 5px solid var(--red); font-size: 14px; animation: tin .3s ease-out; }
.toast b { display: block; font: 900 17px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--red); margin-bottom: 2px; }
.toast.lvl { border-left: 0; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--ringc)) border-box; border: 3px solid transparent; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) { .combo.pop { animation: none; } }

/* ---------- the first screen is all you see, until the first press ---------- */
main { position: relative; }
body:not(.played) .later, body:not(.played) .share-open { display: none !important; }
.later { animation: rise .5s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.share-open { margin-top: 14px; padding: 11px 26px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; animation: rise .4s ease-out both; }
.share-open::before { content: "↗ "; }

/* wide screens: achievements and the board sit left and right of the button, a T with the heading on top */
@media (min-width: 1180px) {
  main { max-width: 1240px; }
  .cols.later { position: absolute; left: 18px; right: 18px; top: 0; height: calc(100svh - var(--bar)); margin: 0; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
  .cols.later .card { width: 290px; pointer-events: auto; max-height: 70svh; overflow: auto; }
}

/* the share card, in a pop-up */
.modal { position: fixed; inset: 0; z-index: 40; background: #1c1c1e8c; display: grid; place-items: center; padding: 18px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal .brag { position: relative; margin: 0; width: min(100%, 520px); animation: rise .3s ease-out; }
.modal-x { position: absolute; right: -6px; top: -14px; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 4px 14px #0003; z-index: 1; }
.modal .brag-acts { margin-top: 14px; }
.modal .share.alt { border-color: transparent; }

/* the LifeSim logo on the city card */
.city-brand { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 900 18px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--blue); }
.city-brand img, .map-logo img { width: 30px; height: 30px; border-radius: 50%; background: #0b1530; padding: 2px; }
.city-map { position: relative; }
.map-logo { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 99px; background: #fffffff0; font: 900 15px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.map-logo img { width: 26px; height: 26px; }
.toasts { top: calc(var(--bar) + 10px); bottom: auto; flex-direction: column !important; }
.toast { animation-name: tin2; }
@keyframes tin2 { from { opacity: 0; transform: translateY(-10px); } }
@media (min-width: 1180px) { .toasts { left: auto; right: 18px; transform: none; width: 340px; } }
.more { white-space: nowrap; }
body:not(.played) .foot-art, body:not(.played) .foot-in { display: none; }
body:not(.played) .foot { margin-top: 0; background: none; color: var(--mute); }
body:not(.played) .foot-bottom { border-top: 0; color: var(--mute); }

/* ---------- v: board + badges left, LifeSim right; red Share; no line under the button ---------- */
.line { display: none; }
.hero-bot { padding-top: 30px; }
.share-open { background: var(--red); box-shadow: 0 6px 16px #99000040; margin-top: 0; }
.share-open:hover { background: #7d0000; }
.modal .share:not(.alt) { background: var(--red); }
.cols.later { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
.side-l { display: grid; gap: 14px; align-content: start; }
.cols .city { margin: 0; }
@media (min-width: 640px) and (max-width: 1179px) { .side-l { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (min-width: 1180px) {
  .cols.later { display: flex; justify-content: space-between; align-items: center; }
  .side-l { width: 300px; max-height: calc(100svh - var(--bar) - 40px); overflow: auto; pointer-events: auto; scrollbar-width: none; }
  .side-l .card { width: auto; max-height: none; }
  .cols .city { width: 300px; grid-template-columns: 1fr; padding: 10px; border-radius: 28px; pointer-events: auto; }
  .cols .city .city-map { border-radius: 20px; aspect-ratio: 4 / 3; }
  .cols .city .city-copy { padding: 10px 6px 6px; gap: 10px; }
  .cols .city .city-copy h2 { font-size: 30px; }
  .cols .city .city-brand { font-size: 15px; }
  .cols .city .city-brand img { width: 24px; height: 24px; }
}
.board li .p small { display: block; font: 12px var(--sans); color: var(--mute); }

/* The button's 3D rim adds 12px under the face. Lift it by half so face + rim sit in the middle of the ring. */
.big { top: -6px; }
.share-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
body:not(.played) .share-row { display: none; }
.share-tag { display: none; animation: rise .4s ease-out both; }
@media (max-width: 760px) { .share-tag { display: inline-flex; } .share-open { padding: 12px 22px; } }

/* One "Built with love" design everywhere: the two-line phone version */
.built { padding: 5px 14px 5px 5px; gap: 8px; }
.built span { display: flex; flex-direction: column; line-height: 1.12; }
.built small { font-size: 10.5px; opacity: .9; }
.built b { font-size: 14px; }
.built img { width: 30px; height: 30px; }
/* Share and the tag beside it: same size, on every screen */
.share-tag { display: inline-flex !important; }
.share-row .share-open, .share-row .share-tag { width: 176px; height: 50px; margin: 0; border-radius: 99px; justify-content: center; box-sizing: border-box; }
.share-row .share-open { display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 16px; }
.share-row .share-tag { padding: 0 14px 0 6px; justify-content: flex-start; }
.share-row .share-tag img { width: 38px; height: 38px; }
.share-row .share-tag small { font-size: 11px; }
.share-row .share-tag b { font-size: 15px; }
@media (max-width: 380px) { .share-row .share-open, .share-row .share-tag { width: 152px; } .share-row .share-tag b { font-size: 13.5px; } .share-row .share-tag img { width: 32px; height: 32px; } }
.share-row .share-open, .share-row .share-tag { width: min(176px, calc((100vw - 46px) / 2)); }
.share-row .share-open::before { content: "↗"; margin-right: 6px; }
@media (max-width: 380px) { .share-row .share-tag { padding-right: 8px; gap: 6px; } .share-row .share-tag small { font-size: 9.5px; } .share-row .share-tag b { font-size: 12.5px; } .share-row .share-tag img { width: 30px; height: 30px; } }

/* the LifeSim wordmark, top left of the city card */
.map-mark { position: absolute; left: 12px; top: 10px; width: 118px; height: auto; filter: drop-shadow(0 3px 8px #0006); }
.city-map img.map-mark { position: absolute; inset: 12px auto auto 12px; width: 120px; height: auto; object-fit: contain; transform: none; }

/* visitors: every page view counts, above the status line */
.visits { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--mute); }
.visits b { font: 900 17px/1 var(--display); color: var(--red); letter-spacing: .02em; margin-right: 2px; }
.visits b { display: inline-block; }
.visits b.bump { animation: bump .45s ease-out; }
@keyframes bump { 40% { transform: scale(1.3); color: #d42a2a; } }

/* the time since AO3 went down, under YES. */
.since { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.since span { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 7px 8px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.since b { font: 900 26px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.since i { font-style: normal; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin-top: 3px; }
#sub { margin-top: 6px; font-size: 13px; }
/* the LifeSim wordmark inside the city card button, at its own ratio */
.city-cta { display: flex; align-items: center; justify-content: center; gap: 7px; }
.cta-mark { height: 24px; width: auto; flex: none; display: block; }
