:root {
  --bg: #14102B;
  --bg-2: #1E1840;
  --card: #261F52;
  --line: #3A3170;
  --text: #FFF6E5;
  --muted: #B9B2D6;
  --accent: #C6FF4D;
  --accent-ink: #1B1730;
  --danger: #FF5C6C;
  --coral: #FF8A5B;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
}
h1, h2, h3, p, figure, fieldset { margin: 0; }
h1, h2, h3 { letter-spacing: -.05em; line-height: 1.03; font-weight: 900; }
h2 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
h3 { font-size: 1.5rem; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; height: auto; }
.dex-pair-name { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.dex-pair-logo { width: 20px; height: 20px; flex: none; object-fit: cover; border-radius: 50%; }
.dex-pair-current { padding: .05rem .45rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--accent); background: var(--card); font-size: .75rem; }
button, input, select, textarea { font: inherit; }
button, select, label:has(input[type=radio]), summary { cursor: pointer; }
button, input, select, textarea { accent-color: var(--accent); }
input, select, textarea { max-width: 100%; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: .65rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}
.button.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button.secondary { background: var(--bg-2); }
button:hover, .button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; top: 0; left: 1rem; transform: translateY(-150%); z-index: 20; }
.skip:focus { transform: none; }
.wrap { width: min(1200px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); position: relative; z-index: 4; }
.nav-row { display: flex; gap: .65rem; align-items: center; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .42rem; font-size: 1.65rem; font-weight: 900; letter-spacing: -.07em; text-decoration: none; min-height: 44px; }
.brand img { width: 43px; height: 43px; border-radius: 50%; }
.main-nav, .nav-tools, #tool-links, .footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.main-nav { flex: 1; }
.main-nav a:not(.button), .footer-nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; color: var(--muted); font-weight: 650; }
.main-nav a.dex-link { color: white; font-weight: 850; }
.main-nav a:hover, .footer-nav a:hover { color: var(--text); text-decoration: underline; }
.main-nav [aria-current="page"]:not(.sr-only) { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: .4em; }
.nav-tools { position: relative; }
.tools-toggle { gap: .5em; padding-inline: .75rem; background: transparent; border-color: transparent; color: var(--muted); }
.tools-toggle::after { content: ""; width: .48em; height: .48em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.1em) rotate(45deg); }
.tools-toggle[aria-expanded="true"]::after { transform: translateY(.12em) rotate(225deg); }
.menu-toggle { width: 44px; padding: 0; margin-left: auto; }
.menu-toggle::before { content: ""; width: 20px; height: 14px; border-block: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
@media (max-width: 759px) {
  .site-header:not(.enhanced) .nav-row { flex-wrap: wrap; padding-block: .5rem; }
  .site-header:not(.enhanced) .main-nav { flex-basis: 100%; }
  .enhanced .main-nav, .tools-toggle { display: none; }
  .main-nav.is-open { position: absolute; display: grid; top: 100%; left: 0; width: 100%; gap: 0; padding: .75rem 1rem; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .main-nav.is-open .nav-tools, .main-nav.is-open #tool-links { display: grid; gap: 0; }
  .main-nav.is-open .tools-label { font-size: .9rem; font-weight: 750; color: var(--muted); }
  .main-nav.is-open #tool-links { padding-left: 1rem; border-left: 2px solid var(--line); }
  html:has(.maker, .score-result) { scroll-padding-bottom: 5rem; }
}
.site-footer { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 1.5rem; font-size: .875rem; }
.footer-row .brand { color: var(--text); }
.footer-note { max-width: 26ch; font-size: .8rem; }
.footer-nav { --footer-pad: .46875rem; gap: 0; }
.footer-nav:has(> .footer-group) { display: grid; }
.footer-group { display: flex; flex-wrap: wrap; }
.footer-nav a { justify-content: center; padding-inline: var(--footer-pad); white-space: nowrap; }
/* Centre the 0.64em X glyph while keeping its 44px link box. */
.footer-nav :is(.footer-x, .footer-social[href^="https://x.com/"]) { margin-inline: min(0px, calc(var(--footer-pad) + .32em - 22px)); }
.segmented { display: inline-flex; align-items: stretch; flex-wrap: wrap; padding: 4px; gap: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.segmented label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; padding: .5rem .8rem; font-weight: 750; }
.mood-controls label { gap: .25rem; }
.segmented label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.segmented input[type=radio], .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; margin: -1px; border: 0; }
fieldset { min-width: 0; border: 0; padding: 0; }
legend { padding: 0; }
textarea, input[type=text], select { padding: .65rem .8rem; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
input[type=range] { min-height: 44px; width: 100%; }
label:has(input[type=checkbox]) { min-height: 44px; display: inline-flex; align-items: center; gap: .5rem; }
.maker { padding-block: 2.5rem; }
.maker-heading { margin-bottom: 1.7rem; }
.maker-heading h1 { font-size: clamp(2.7rem, 6vw, 5rem); }
.maker-heading p { color: var(--muted); margin-top: .6rem; }
.maker-layout { display: grid; gap: 1.25rem; align-items: start; }
.preview-pane, .editor-pane { min-width: 0; }
.preview-pane { padding: clamp(.8rem,2vw,1.5rem); background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; }
.canvas-stage { position: relative; overflow: hidden; border-radius: 12px; touch-action: none; }
.canvas-stage canvas { width: 100%; height: auto; display: block; touch-action: none; }
.crop-guide { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed white; box-shadow: 0 0 0 1px #21173088; pointer-events: none; }
.pfp-stage:has(canvas:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.editor-pane { display: grid; gap: .9rem; }
.control-group { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; display: grid; gap: .65rem; min-width: 0; }
.control-group > legend { background: var(--bg); padding: 0 .3rem; font-weight: 800; }
.swatches { display: flex; flex-wrap: wrap; gap: .3rem; }
.swatches button, .swatches label { min-width: 44px; min-height: 44px; }
.export-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.post-editor { display: grid; gap: .55rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.post-editor > label { font-weight: 750; }
.post-editor textarea { width: 100%; min-width: 0; line-height: 1.45; resize: vertical; }
.post-options { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; }
.post-options .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.status { color: var(--muted); min-height: 1.55em; }
@media (min-width: 760px) {
  .wrap { width: min(1200px, calc(100% - 5rem)); }
  .main-nav { margin-left: 2rem; }
  .menu-toggle, .enhanced .tools-label { display: none; }
  .enhanced #tool-links { position: absolute; top: 100%; left: 0; z-index: 1; min-width: 12rem; display: grid; gap: 0; padding: .4rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #14102b80; }
  .enhanced #tool-links a { padding-inline: .7rem; border-radius: 7px; }
  .enhanced #tool-links a:hover { background: var(--card); }
  .maker-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 1.6rem; }
  .preview-pane { position: sticky; top: 1rem; }
}
@media (max-width: 759px) {
  body:has(.maker, .score-result) { padding-bottom: 5rem; }
  :is(.maker, .score-result) .export-bar [data-action=download] { position: fixed; bottom: max(.7rem, env(safe-area-inset-bottom)); left: 1rem; right: 1rem; z-index: 8; box-shadow: 0 0 0 .6rem var(--bg), 0 -4px 24px #14102bbb; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.hero { display: grid; gap: 1.5rem; align-items: center; padding-block: 2rem; }
.hero-copy { min-width: 0; }
.home-wordmark, .home-roly-heading { display: flex; align-items: center; gap: .55rem; }
.home-wordmark { color: var(--accent); font-weight: 800; }
.hero-title { margin-block: .85rem 1rem; max-width: 14ch; font-size: clamp(3rem,6.2vw,5.65rem); line-height: .99; letter-spacing: -.065em; overflow-wrap: anywhere; }
.hero-sub { color: var(--muted); max-width: 54ch; font-size: clamp(1rem,1.4vw,1.17rem); }
#launch-notice { max-width: 54ch; margin-top: .85rem; padding: .6rem .85rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: .65rem; background: var(--bg-2); overflow-wrap: anywhere; }
#launch-prefix, #launch-open { font-weight: 700; }
#launch-timer { display: inline-block; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
#launch-date, #launch-price { color: var(--muted); font-size: .9rem; }
#launch-open a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.hero-actions, .button-row, .maker-actions, .official-links { display: flex; flex-wrap: wrap; gap: .65rem; }
.hero-actions { margin-top: 1rem; }
.home-search { margin-top: 1.35rem; max-width: 32rem; display: flex; border: 1px solid #685d91; border-radius: 12px; background: var(--bg-2); }
.home-search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.home-search input { min-width: 0; flex: 1; padding: .65rem .9rem; border: 0; background: transparent; color: var(--text); }
.home-search input:focus { outline: none; }
.home-search input::placeholder { color: var(--muted); opacity: 1; }
.home-search button { background: transparent; border: 0; color: var(--accent); padding: .65rem; min-width: 46px; }
.landing-section .button-row a:not(.button) { color: var(--accent); font-weight: 700; }
.landing-section .button-row a, .faq-list a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.home-token { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .65rem .85rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); text-decoration: none; min-width: 0; }
.home-token:hover { border-color: var(--accent); }
.home-token-logo { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
.home-token-name { min-width: 0; overflow-wrap: anywhere; }
.home-token-name strong, .home-token-name span { display: block; }
.home-token-name strong { font-size: 1.2rem; line-height: 1.2; }
.home-token-name span, .home-quote dt, .home-quote-note { color: var(--muted); }
.home-token-name span, .home-quote dt { font-size: .85rem; }
.home-quote, .home-quote-note { grid-column: 1/-1; }
.home-quote, .home-quote-note { border-top: 1px solid var(--line); padding-top: .65rem; margin: 0; }
.home-quote { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: .65rem; }
.home-quote dt { grid-row: 1; }
.home-quote dd { grid-row: 2; margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.quote-up { color: var(--accent); }
.quote-down { color: #ff9a9f; }
.home-preview .home-token { min-height: 14rem; padding: clamp(1.4rem,3.2vw,2.5rem); gap: 1.1rem; align-content: center; border-radius: 24px; background-color: var(--bg-2); background-image: repeating-radial-gradient(circle at 105% -60%,transparent 0 33px,#554b782e 34px 35px); }
.home-preview .home-token-name strong { font-size: clamp(1.85rem,4vw,3.3rem); letter-spacing: -.05em; }
.home-preview .home-token-logo { width: clamp(72px,7vw,96px); height: auto; aspect-ratio: 1; }
.home-preview .home-quote { grid-template-columns: minmax(0,1fr) fit-content(40%); }
.home-preview .home-quote dd { font-size: clamp(1.15rem,2vw,1.7rem); }
@media (min-width: 760px) and (max-width: 900px) {
  .home-preview .home-quote { grid-template-columns: minmax(0,1fr); }
  .home-preview .home-quote dt, .home-preview .home-quote dd { grid-row: auto; }
  .home-preview .home-quote dt:not(:first-child) { margin-top: .5rem; }
}
.home-list { display: grid; gap: 1.2rem; padding: clamp(1.3rem,3.6vw,3rem); border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.home-list ol { padding-left: 1.45rem; margin: 1rem 0 0; }
.home-list li { padding: .12rem 0 .12rem .2rem; }
.home-list li::marker { color: var(--accent); font-weight: 750; }
.landing-section .button-row { align-items: center; margin-top: .8rem; gap: 1rem; }
.home-roly-intro { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.2rem; }
.home-roly-intro p { color: var(--muted); margin-top: .65rem; }
.home-mascot { width: clamp(60px,9vw,98px); }
.home-buy { margin-top: 1.25rem; }
.home-buy h3 { font-size: 1.3rem; }
.disclaimer-box p + p { margin-top: .6rem; }
.contract-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; padding: 1.25rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; }
.contract-identity { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.contract-icon { flex-shrink: 0; box-sizing: content-box; width: 25px; height: 25px; padding: .75rem; color: var(--accent); background: #302942; border-radius: 12px; }
.contract-copy { min-width: 0; }
.contract-copy h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: -.025em; }
.contract-copy p { color: var(--muted); margin-top: .22rem; }
.supply-chip { display: grid; line-height: 1.35; }
.supply-chip span { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.address-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.address-row code { overflow-wrap: anywhere; user-select: all; }
.official-links { width: 100%; }
.landing-section { margin-top: clamp(3rem, 6vw, 5rem); }
.section-title { margin-bottom: 1.4rem; }
.tools-grid { display: grid; gap: 1rem; }
.tool-copy p { color: var(--muted); margin-top: .45rem; }
.tool-card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: var(--bg-2); }
.card-art { height: 126px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.pfp-art { background: #c9b3e7; background-image: radial-gradient(#9080af 1.4px, transparent 1.6px); background-size: 11px 11px; }
.preview-avatar { display: grid; place-items: center; height: 78%; aspect-ratio: 1; border-radius: 50%; background: #f8c28f; border: 6px solid var(--text); box-shadow: 4px 5px 0 var(--accent-ink); transform: rotate(-9deg); }
.preview-spark { position: absolute; margin-left: -115px; margin-top: -38px; color: var(--accent-ink); font-size: 2.8rem; }
.preview-ticker { position: absolute; margin-left: 90px; bottom: 12px; transform: rotate(-8deg); color: var(--accent-ink); background: var(--accent); border: 2px solid var(--accent-ink); border-radius: 7px; padding: .16rem .7rem; font-weight: 900; }
.meme-art { flex-direction: column; background: #f1ae9b; padding: .65rem; }
.preview-panel { width: 68%; height: 50%; border: 3px solid var(--accent-ink); display: flex; justify-content: center; align-items: center; gap: 6px; transform: rotate(4deg); color: var(--accent-ink); text-transform: uppercase; font-weight: 900; line-height: .95; }
.preview-panel img { height: 100%; width: auto; }
.preview-red { background: #ff9d9d; }
.preview-green { background: #d0ed9d; flex-direction: row-reverse; border-top: 0; }
.tool-copy { position: relative; padding: 1rem 2.4rem 1rem 1rem; }
.tool-arrow { position: absolute; right: .9rem; top: .8rem; font-size: 1.4rem; color: var(--accent); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 1.12rem .3rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-weight: 750; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 1.35rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 70ch; margin-bottom: 1.1rem; color: var(--muted); }
.disclaimer-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: 17px; padding: clamp(1.25rem,3vw,2rem); }
.disclaimer-box h2 { font-size: 1.8rem; margin-bottom: .7rem; }
.disclaimer-box p { color: var(--muted); max-width: 100ch; }
.not-found { display: grid; justify-items: center; align-content: center; text-align: center; gap: 1rem; min-height: 64vh; }
.not-found h1 { font-size: clamp(2.5rem,6vw,4.2rem); margin-bottom: .6rem; }
.lost-mascot { width: min(230px,55vw); }
#how-to-buy ol { padding-left: 1.35rem; }
#how-to-buy li { margin: .35rem 0; }
#how-to-buy p { margin-top: .65rem; color: var(--muted); }
.swatch { display: grid; place-items: center; position: relative; }
.swatch span { width: 32px; height: 32px; border: 1px solid var(--muted); border-radius: 50%; }
.swatch:has(:checked) span { outline: 2px solid var(--text); outline-offset: 3px; }
.swatch:has(:focus-visible) { outline: 3px solid var(--accent); border-radius: 8px; }
.preview-heading, .caption-label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.preview-heading { margin-bottom: .7rem; }
.preview-heading h2 { font-size: 1.35rem; }
.preview-heading span, .hint, .count, .export-hint, #image-hint { color: var(--muted); }
.maker .segmented { justify-self: start; }
#photo-controls, #pfp-export, .meme-editor fieldset fieldset { display: grid; gap: .65rem; }
.preview-pane .export-bar, .export-hint { margin-top: .7rem; }
.upload-zone { display: grid; gap: .5rem; border: 1px dashed var(--muted); border-radius: 12px; padding: 1rem; }
input[type=file] { width: 100%; min-width: 0; min-height: 44px; font-size: 1rem; }
input::file-selector-button { min-height: 44px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .7rem; }
.control-group output { float: right; color: var(--muted); }
@media (min-width: 760px) {
  .hero { grid-template-columns: minmax(0,1.25fr) minmax(0,.8fr); gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3rem,5vw,4.5rem); }
  .home-list { grid-template-columns: 1fr 1fr; align-items: center; }
  .home-list-actions { border-left: 1px solid var(--line); padding-left: clamp(1.5rem,4vw,3.5rem); }
  .tools-grid { grid-template-columns: repeat(2,1fr); }
  .faq-section { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; }
  .contract-box { padding: 1.35rem 1.6rem; }
  .meme-stage { max-width: min(100%, max(320px, calc((100dvh - 210px) * .8))); margin-inline: auto; }
  .pfp-stage { max-width: min(100%, max(300px, calc(100dvh - 380px))); margin-inline: auto; }
}
@media (max-width: 759px) {
  .hero-title { max-width: 13ch; }
  .hero-actions { gap: .5rem; }
  .hero-actions .button { padding-inline: .8rem; }
  .home-preview .home-token { min-height: 0; }
  .home-preview .home-token-logo { width: 68px; height: 68px; }
  .home-list-actions { padding-top: 1rem; border-top: 1px solid var(--line); }
  .contract-identity { align-items: flex-start; }
  .supply-chip { display: flex; align-items: center; gap: .5rem; }
}

.caption-writer { border-top: 1px solid var(--line); padding-top: .6rem; }
.caption-writer button { justify-self: start; }
#writer-status:empty { display: none; }
/* Native menus use a shorter line box. Match the caption input's line, padding and border. */
#topic { width: min(100%, 22rem); height: calc(1.55em + 1.3rem + 2px); }

.caption-swatch, .extras-target { display: inline-block; width: .9rem; flex: 0 0 .9rem; height: .9rem; border-radius: 50%; border: 1px solid var(--text); }
:is(.caption-swatch, .extras-target)[data-mood="r"] { background: #FF8386; }
:is(.caption-swatch, .extras-target)[data-mood="g"] { background: #C6FF4D; }
#dress-up { display: grid; gap: .75rem; }
.extra-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.extra-heading { flex-basis: 100%; font-weight: 700; }
.extra-option { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid var(--line); border-radius: 10px; background: var(--text); cursor: pointer; }
.extra-option img { width: 48px; height: 48px; }
.extra-option:has(:checked) { border-color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent); }
.extra-option:has(:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }
.caption-label label { margin-right: auto; }

.roll-art { background: #ffcf9a; gap: 12%; align-items: end; padding: 1rem 1rem 1.6rem; border-bottom: .7rem solid #65528c; }
.roll-art img { align-self: end; height: 75%; width: auto; }
.roll-art i { position: relative; width: 1.7rem; height: 46%; margin-bottom: .4rem; background: var(--danger); border: 3px solid var(--accent-ink); border-radius: 6px; }
.roll-art i::before, .roll-art i::after { content: ""; position: absolute; left: 45%; width: 3px; height: .6rem; background: var(--accent-ink); }
.roll-art i::before { bottom: 100%; } .roll-art i::after { top: 100%; }
.roll-art i:last-child { height: 35%; background: var(--accent); }
.replay-art { gap: 5%; background: #ecdfc9; border-color: #97b274; }
.replay-art i:first-child { height: 22%; background: var(--accent); }
.replay-art i:nth-child(2) { height: 41%; margin-bottom: 1.8rem; background: var(--accent); }
.replay-art i:nth-child(3) { height: 31%; margin-bottom: 1.2rem; }
@media (min-width: 1100px) { .tools-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
.roll-game { max-width: 1040px; padding-block: clamp(1.25rem,4vw,3rem); }
.game-board, .score-result { border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); padding: clamp(.65rem,2vw,1.25rem); }
.game-hud { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 0 .4rem .75rem; }
.game-hud > div { display: grid; align-content: start; }
.game-hud > div > span { color: var(--muted); font-weight: 650; }
.game-hud strong { display: flex; align-items: center; min-height: 1.7rem; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
#hud-score { color: var(--accent); }
#target-cell { border-inline-start: 2px solid var(--line); padding-inline-start: .55rem; }
#target-cell.is-passed { border-color: var(--accent); }
.target-label::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .35em; border: 2px solid currentColor; border-radius: 50%; background: radial-gradient(circle, currentColor 0 24%, transparent 26%); }
.target-readout { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .4rem; }
#hud-target { color: var(--muted); }
#target-passed { color: var(--accent); font-size: .875rem; font-weight: 750; }
#hud-lives span { display: flex; gap: 2px; }
#hud-lives img.spent { opacity: .22; }
.roll-stage { position: relative; margin-inline: auto; }
#roll-canvas { display: block; width: 100%; aspect-ratio: 16/9; border-radius: 12px; background: #ffdfba; }
#roll-canvas, #roll-hold { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; min-width: 7rem; font-size: 1.3rem; box-shadow: 0 4px 0 var(--accent-ink); }
#challenge-prompt { position: absolute; left: 50%; bottom: calc(50% + 2.2rem); translate: -50% 0; width: max-content; max-width: 98%; padding: .2em .65em; border-radius: .5rem; background: var(--bg); color: var(--text); font-size: clamp(1rem, 3vw, 2rem); font-weight: 800; line-height: 1.25; text-align: center; }
.roll-controls, .score-heading { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.roll-controls { margin: .9rem 0 .65rem; }
#roll-hold { min-width: min(100%,12rem); min-height: 52px; }
#roll-hold:active, #roll-hold[aria-pressed=true] { background: var(--danger); }
.score-result { margin-top: 1rem; }
.score-heading { margin-bottom: 1rem; }
.score-heading:has(#challenge-result:not([hidden])) { flex-direction: column; align-items: flex-start; }
.score-heading h2 { font-size: clamp(1.6rem,4vw,2.4rem); }
.record { color: var(--accent); font-weight: 750; }
#challenge-result { margin-top: .5rem; font-weight: 750; }
#challenge-link { width: min(100%, 32rem); margin-top: .75rem; }
@media (max-width: 500px) {
  .game-hud.has-target { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: .5rem; }
  .game-hud.has-target > div { grid-column: span 2; }
  .game-hud.has-target > div:nth-child(-n+2) { grid-column: span 3; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .roll-stage { max-width: calc(115vh - 50px); max-width: calc(115dvh - 50px); }
}
@media (max-width: 380px) {
  .game-hud { gap: .3rem; }
  #hud-lives img { width: 19px; height: 19px; }
}

.replay-page { max-width: 1004px; }
.replay-page .maker-heading { margin-bottom: 1.35rem; }
.replay-form { display: grid; gap: .4rem; }
.replay-form label { font-weight: 750; }
.replay-fields { display: flex; flex-wrap: wrap; align-items: stretch; gap: .65rem; }
.replay-fields input { flex: 1 1 18rem; min-width: 0; }
.replay-fields input[aria-invalid=true] { border-color: var(--danger); }
#replay-status { margin-block: .55rem; }
#replay-status:empty { min-height: .1rem; }
#replay-stage { overflow-wrap: anywhere; }
.replay-info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem 1rem; margin: .15rem .2rem .8rem; }
.replay-token { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .65rem; min-width: 0; }
.replay-token strong { font-size: clamp(1.3rem, 3vw, 1.85rem); letter-spacing: -.04em; color: var(--accent); }
.replay-token span, .replay-dates .hint, #last-trade, .replay-source { font-size: .92rem; }
.replay-dates { font-variant-numeric: tabular-nums; }
#last-trade { flex-basis: 100%; }
#replay-canvas { display: block; width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 12px; background: #FFF6E5; }
.replay-controls:has(button:not([hidden])) { margin-top: .85rem; }
#replay-sharing { margin-top: .85rem; border-top: 1px solid var(--line); padding-top: .85rem; }
#share-link { width: min(100%, 36rem); margin-top: .6rem; }
.replay-source { margin: .7rem .12rem 0; }
.replay-summary:not(.sr-only) { margin-top: 1.6rem; }
.replay-summary h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
#scene-list { margin: 1rem 0 .7rem; padding-inline-start: 1.65rem; }
#scene-list li { padding: .55rem 0 .55rem .3rem; border-bottom: 1px solid var(--line); }
#scene-list li::marker { color: var(--muted); font-weight: 700; }
#scene-list time { font-variant-numeric: tabular-nums; color: var(--muted); }
#scene-list strong { margin-inline: .4rem; color: var(--accent); }
#replay-outro { padding-block: .3rem; font-weight: 700; }
@media (min-width: 700px) { .replay-dates { text-align: right; } }
@media (max-width: 520px) {
  .replay-page .maker-heading { margin-bottom: 1rem; }
  .replay-fields .button-row { gap: .45rem; }
  .replay-token { flex-basis: 100%; }
  #replay-exports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #replay-exports > * { padding-inline: .5rem; }
  #scene-list span { display: block; }
}
@media (max-width: 359px) {
  #replay-exports > * { padding-inline: .25rem; }
}

.burrow-entry, .burrow-heading, .burrow-collection-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1rem;
}
.burrow-entry { margin: .85rem .15rem; }
#burrow-count, #burrow-status, .burrow-requirement { color: var(--muted); }
.score-heading:has(#burrow-notice:not([hidden])) { flex-direction: column; align-items: stretch; }
.score-heading:has(#burrow-notice:not([hidden])) #again { align-self: flex-start; }
#burrow-notice { margin-top: .9rem; padding: .8rem 1rem; background: var(--bg); border-inline-start: 4px solid var(--accent); border-radius: 5px 12px 12px 5px; }
#burrow-lines { font-weight: 750; color: var(--accent); }
#burrow-intro { margin-bottom: .3rem; }
#visit-burrow { margin-top: .65rem; }

.burrow-page { max-width: 1000px; padding-block: clamp(1.25rem,4vw,3rem) 0; }
.burrow-heading { justify-content: space-between; margin-bottom: 1.2rem; }
.burrow-heading h1 { font-size: clamp(2.55rem, 5.6vw, 4.6rem); }
.burrow-heading p { max-width: 55ch; }
.burrow-frame { overflow: hidden; border: 2px solid var(--line); border-radius: 20px; background: #685570; }
#burrow-scene { position: relative; isolation: isolate; }
.burrow-background { width: 100%; }
.burrow-layer, #burrow-roly { position: absolute; }
.burrow-layer { pointer-events: none; }
.burrow-floor { left: 30.5%; top: 61.5%; width: 15.3%; }
.burrow-wall { left: 32.8%; top: 28.5%; width: 12%; }
.burrow-table { left: 65.9%; top: 53.3%; width: 10.8%; }
#burrow-roly { left: 42.1%; top: 28.8%; width: 23%; aspect-ratio: 1; border: 0; background: transparent; padding: 0; z-index: 1; }
#burrow-roly img { width: 100%; }
#burrow-roly:hover { transform: none; }
#burrow-roly:focus-visible { outline: 3px dashed #2A1740; outline-offset: -4px; }
.burrow-collection { margin-top: clamp(1.3rem, 3vw, 2rem); }
.burrow-collection-heading { justify-content: space-between; margin-bottom: .8rem; }
.burrow-collection h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
#burrow-items { display: grid; gap: .65rem; padding: 0; margin: 0; list-style: none; }
#burrow-items li { display: grid; grid-template-columns: 4.45rem minmax(0,1fr) auto; gap: .4rem .85rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.burrow-thumbnail { grid-row: 1; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; background: #FFE4C2; border-radius: 12px; }
.burrow-thumbnail img { width: 94%; height: 90%; object-fit: contain; }
[data-item="green-candle-lamp"] .burrow-thumbnail { background: #715D77; }
[data-item="ant-plate"] .burrow-thumbnail { background: #D3BDC3; }
[data-state="locked"] .burrow-thumbnail { opacity: .67; }
#burrow-items h3 { font-size: 1.13rem; line-height: 1.18; letter-spacing: -.03em; }
.burrow-state { margin-top: .24rem; color: var(--accent); font-size: .83rem; font-weight: 750; }
[data-state="locked"] .burrow-state { color: var(--muted); }
.burrow-requirement { font-size: .92rem; }
#burrow-items li[data-state="locked"] > div:nth-child(2) { grid-column: 2 / -1; }
#burrow-items button { justify-self: start; padding-inline: .8rem; }
@media (max-width: 600px) {
  #burrow-scene { width: 125%; margin-left: -10%; }
}
@media (min-width: 760px) {
  #burrow-items { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
  #burrow-items li { grid-template-columns: 4.8rem minmax(0,1fr); align-content: start; padding: 1rem; }
  #burrow-items button { grid-column: 2; }
}

