/* Aeroverse: flat, square, classic community look (white cards, light dotted grey page, green accent). */
:root {
  --green: #5ac800;
  --green-dark: #3f9a00;
  --green-soft: #ecf9dc;
  --bg: #efefef;
  --card: #ffffff;
  --line: #d6d6d6;
  --line-soft: #e8e8e8;
  --ink: #323232;
  --ink-soft: #7a7a7a;
  --red: #e5322d;
  --blue: #1b8fd3;
  --orange: #f09a1a;
  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  --px: "Press Start 2P", "Courier New", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 15px/1.45 var(--font);
  background-color: var(--bg);
  background-image: radial-gradient(#dcdcdc 1.2px, transparent 1.3px);
  background-size: 14px 14px;
  min-height: 100vh;
}
a { color: inherit; }
button { font: inherit; }
img, canvas { max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.top-in { max-width: 1000px; margin: 0 auto; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--green); font-weight: 800; font-size: 28px; letter-spacing: -.5px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a, .nav button.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 62px; height: 52px; padding: 2px 8px;
  text-decoration: none; color: #6b6b6b; font-size: 11px; font-weight: 700; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer;
}
.nav svg { width: 26px; height: 26px; fill: currentColor; }
.nav a:hover, .nav .nav-btn:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.nav .me-chip { display: flex; align-items: center; gap: 8px; }
.nav .signin { background: var(--green); color: #fff; border-radius: 3px; flex-direction: row; min-width: 0; height: 36px; padding: 0 16px; font-size: 14px; border-bottom: 0; }
.nav .signin:hover { background: var(--green-dark); color: #fff; }

/* ---- layout ---- */
.page { max-width: 1000px; margin: 0 auto; padding: 16px max(14px, env(safe-area-inset-right)) 70px max(14px, env(safe-area-inset-left)); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.col { display: grid; gap: 14px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 3px; }
.pad { padding: 14px 16px; }
.h-sec { display: flex; align-items: center; gap: 8px; margin: 4px 2px 0; font-size: 17px; font-weight: 800; color: #555; }
.h-sec svg { width: 20px; height: 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.empty { padding: 36px 16px; text-align: center; color: var(--ink-soft); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---- avatars (square frame; red frame = new post) ---- */
.av { --s: 48px; text-decoration: none; position: relative; flex: none; width: var(--s); height: var(--s); display: block; background: #fff; border: 2px solid var(--line); border-radius: 4px; overflow: hidden; }
.av img, .av canvas, .av span { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.av span { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * .5); }
.av.fresh { border-color: var(--red); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--red); }
.av.fresh::after { content: ""; position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; background: var(--red); border: 2px solid #fff; border-radius: 50%; }

/* ---- buttons / forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; background: var(--green); color: #fff; font-weight: 800; border: 1px solid var(--green-dark); border-radius: 3px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #4fb400; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.alt { background: #fff; color: #555; border-color: var(--line); }
.btn.alt:hover { background: #f4f4f4; }
.btn.red { background: var(--red); border-color: #b32420; }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 2px 4px; color: var(--ink-soft); font-size: 13px; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--ink); }
.link-btn.danger:hover { color: var(--red); }
label.f { display: grid; gap: 4px; font-weight: 700; font-size: 13px; color: #555; }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 9px 10px; font: 15px var(--font); color: var(--ink); background: #fff; border: 1px solid #bdbdbd; border-radius: 3px;
}
input:focus, textarea:focus { border-color: var(--green); outline: 2px solid var(--green-soft); }
textarea { resize: vertical; min-height: 84px; }
.form { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.err { color: var(--red); font-weight: 700; font-size: 14px; min-height: 1.2em; }

/* ---- community tiles ---- */
.feature { display: block; text-decoration: none; overflow: hidden; }
.feature .banner { height: 190px; display: grid; place-items: center; background: linear-gradient(#7fe02a, #4bb800); position: relative; }
.feature .banner .big { font: 800 56px/1 var(--font); color: #fff; letter-spacing: -2px; text-shadow: 0 3px 0 rgba(0,0,0,.18); padding: 0 16px; text-align: center; }
.feature .banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.feature .foot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.feature .foot b { display: block; font-size: 18px; }
.chev { margin-left: auto; color: #aaa; font-size: 26px; line-height: 1; }
.thumb { --s: 52px; flex: none; width: var(--s); height: var(--s); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--green); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * .5); }
.thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.c-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none; min-width: 0; }
.c-item:hover, .feature:hover { border-color: #aaa; }
.c-item > div { min-width: 0; }
.c-item b, .c-item span.d { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-item span.d { font-size: 13px; color: var(--ink-soft); }
.c-new { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px dashed #bdbdbd; background: #fafafa; text-decoration: none; color: #666; border-radius: 3px; }
.c-new:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.c-new .plus { width: 52px; height: 52px; display: grid; place-items: center; font-size: 34px; font-weight: 800; border: 2px solid currentColor; border-radius: 4px; flex: none; }

/* ---- community header ---- */
.c-head { display: flex; gap: 14px; padding: 14px 16px; align-items: center; }
.c-head .thumb { --s: 84px; }
.c-head h1 { margin: 0; font-size: 24px; line-height: 1.15; }
.msg-box { border-top: 1px solid var(--line-soft); padding: 12px 16px; background: #fafafa; }
.msg-box .who { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }

/* ---- composer ---- */
.composer { padding: 12px 14px; display: grid; gap: 10px; }
.composer .top-row { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea { min-height: 70px; }
.draft { position: relative; border: 1px solid var(--line); background: #fff; line-height: 0; width: fit-content; max-width: 100%; }
.draft canvas { display: block; image-rendering: pixelated; width: 320px; max-width: 100%; height: auto; }
.draft .x { position: absolute; right: 4px; top: 4px; line-height: 1; }

/* ---- posts ---- */
.feed { display: grid; gap: 12px; }
.post { padding: 12px 14px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
.post-head { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.post-head .nm { font-weight: 800; text-decoration: none; }
.post-head .nm:hover { text-decoration: underline; }
.post-head .un { color: var(--ink-soft); font-size: 13px; }
.post-head .tm { margin-left: auto; color: var(--ink-soft); font-size: 13px; }
.in-c { display: inline-block; margin-top: 2px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 2px; text-decoration: none; }
.in-c.wall { background: var(--blue); }
.body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.art { display: block; margin-top: 8px; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; height: auto; image-rendering: pixelated; border: 1px solid var(--line); background: #fff; }
.post-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.yeah { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; background: #fff; color: #666; font-weight: 800; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.yeah svg { width: 20px; height: 20px; }
.yeah:hover { border-color: var(--orange); color: var(--orange); }
.yeah.on { background: #fff4de; border-color: var(--orange); color: #c77700; }
.replies-btn { margin-left: 2px; }
.replies { margin-top: 10px; display: grid; gap: 8px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.reply { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; background: #f6f6f6; padding: 8px 10px; border: 1px solid var(--line-soft); }
.reply .art { max-width: 320px; }
.reply-form { display: grid; gap: 8px; }
.more { display: flex; justify-content: center; }
.newbar { position: sticky; top: 64px; z-index: 5; }
.newbar button { width: 100%; }

/* ---- sidebar ---- */
.search { position: relative; }
.search input { padding-right: 36px; }
.search svg { position: absolute; right: 9px; top: 9px; width: 20px; height: 20px; fill: #888; pointer-events: none; }
.draw-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; text-decoration: none; padding: 8px 10px; }
.draw-item .art { margin: 0; grid-column: 2; }
.draw-item .cap { grid-column: 2; font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--line-soft); padding-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draw-item:hover { border-color: #aaa; }
.admin-note { display: flex; gap: 10px; align-items: center; padding: 10px 12px; text-decoration: none; background: #fff8e1; border-color: #f0d28a; }

/* ---- profile ---- */
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px; }
.profile h1 { margin: 0; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.profile .bio { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stats { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.stats b { color: var(--ink); font-size: 16px; display: block; }
.badge { display: inline-block; padding: 1px 8px; font-size: 11px; font-weight: 800; color: #fff; background: var(--blue); border-radius: 2px; vertical-align: middle; }

/* ---- sign-in ---- */
.auth { max-width: 420px; margin: 24px auto; }
.tabs { display: flex; }
.tabs button { flex: 1; padding: 12px; background: #f1f1f1; border: 0; border-bottom: 1px solid var(--line); font-weight: 800; color: #888; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--green-dark); box-shadow: inset 0 3px 0 var(--green); border-bottom-color: #fff; }
.avatar-pick { display: flex; gap: 12px; align-items: center; }

/* ---- wizard ---- */
.steps { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.steps div { flex: 1; min-width: 92px; padding: 10px 6px; text-align: center; font-size: 12px; font-weight: 800; color: #aaa; border-bottom: 3px solid transparent; white-space: nowrap; }
.steps div.on { color: var(--green-dark); border-bottom-color: var(--green); }
.steps div.done { color: #666; }
.app-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; }
.status { padding: 2px 10px; font-size: 12px; font-weight: 800; color: #fff; border-radius: 2px; background: #999; }
.status.approved { background: var(--green); }
.status.rejected { background: var(--red); }
.status.pending { background: var(--orange); }
.review { display: grid; gap: 14px; }
.meter { height: 14px; background: #e3e3e3; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--green); }

/* ---- modal / toast ---- */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 10px; overflow: auto; }
.modal { background: #fff; border: 1px solid #888; max-width: 100%; width: min(460px, 100%); }
.modal.wide { width: min(1020px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; max-width: 92vw; padding: 10px 18px; background: #333; color: #fff; font-weight: 700; border-radius: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }

/* ---- pixel editor ---- */
.px { font-family: var(--px); }
.ed { display: grid; grid-template-columns: 84px minmax(0, 1fr) 176px; gap: 10px; padding: 10px; background: #d9d4c7; }
.ed-tools, .ed-side { display: grid; gap: 8px; align-content: start; }
.ed-tools { grid-template-columns: repeat(2, 1fr); gap: 4px; }
.ed-btn { height: 38px; display: grid; place-items: center; background: #f0ece0; color: #222; border: 2px solid #222; border-radius: 0; box-shadow: inset -2px -2px 0 #b4ae9c, inset 2px 2px 0 #fff; cursor: pointer; padding: 0; font: 10px var(--px); }
.ed-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.ed-btn:hover { background: #fff8d0; }
.ed-btn[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: inset 2px 2px 0 rgba(0,0,0,.3); }
.ed-btn:disabled { opacity: .4; cursor: default; }
.ed-stage { display: grid; gap: 6px; min-width: 0; }
.ed-wrap { background: #8c8878; padding: 6px; overflow: auto; border: 2px solid #222; max-width: 100%; }
.ed-canvas-box { position: relative; width: fit-content; line-height: 0; margin: 0 auto; }
.ed-canvas-box canvas { display: block; image-rendering: pixelated; touch-action: none; cursor: crosshair; background: #fff; }
.ed-grid { position: absolute; inset: 0; pointer-events: none; }
.ed-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font: 9px/1.4 var(--px); color: #222; }
.ed-bar .ed-btn { height: 30px; padding: 0 10px; }
.pal { display: grid; grid-template-columns: repeat(8, 1fr); border: 2px solid #222; }
.pal button { aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.pal button[aria-pressed="true"] { outline: 3px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000; position: relative; z-index: 1; }
.cur-swatch { height: 34px; border: 2px solid #222; box-shadow: inset 0 0 0 2px #fff; }
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sizes .ed-btn { height: 34px; }
.sizes i { display: block; background: currentColor; }
.ed-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---- age badges, rules, gate ---- */
.age { display: inline-block; padding: 0 7px; font-size: 11px; font-weight: 800; line-height: 18px; color: #fff; border-radius: 2px; vertical-align: middle; background: var(--green); white-space: nowrap; }
.age.a14 { background: var(--blue); }
.age.a16 { background: var(--orange); }
.age.a18 { background: var(--red); }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.rule { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.rule .n { width: 34px; height: 34px; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 800; border-radius: 3px; }
.rule h3 { margin: 2px 0 0; font-size: 16px; }
.rule p { margin: 2px 0 0; color: #555; overflow-wrap: anywhere; }
.modal.mid { width: min(640px, 100%); }
.modal-scroll { max-height: 58vh; overflow: auto; padding: 16px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; background: #fff; }
.opt:hover { border-color: #aaa; }
.opt[data-on="true"] { border-color: var(--green); background: var(--green-soft); }
.opt input { margin-top: 4px; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.chk input { margin-top: 3px; width: auto; }
.gate { max-width: 520px; margin: 30px auto; text-align: center; padding: 24px; display: grid; gap: 10px; justify-items: center; }
.gate h1 { margin: 0; }
.gate p { margin: 0; }

@media (max-width: 820px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-tools { grid-template-columns: repeat(8, 1fr); order: 2; }
  .ed-stage { order: 1; }
  .ed-side { order: 3; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .nav a, .nav button.nav-btn { min-width: 46px; padding: 2px 4px; }
  .nav .lbl { display: none; }
  .logo span { display: none; }
  .c-list { grid-template-columns: minmax(0, 1fr); }
  .post { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .post > a > .av { --s: 44px !important; }
  .feature .banner { height: 130px; }
  .feature .banner .big { font-size: 38px; }
  .c-head { flex-direction: column; align-items: flex-start; }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .app-card { grid-template-columns: 48px minmax(0, 1fr); }
  .app-card .status { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- header tools, tab bar ---- */
.tools { display: flex; align-items: center; gap: 4px; }
.tool { position: relative; width: 38px; height: 38px; display: grid; place-items: center; color: #6b6b6b; background: none; border: 0; border-radius: 3px; cursor: pointer; text-decoration: none; }
.tool svg { width: 24px; height: 24px; fill: currentColor; }
.tool:hover { background: #f1f1f1; color: var(--ink); }
.tool[aria-current="page"] { color: var(--green); }
.dot { position: absolute; right: 0; top: 0; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px; border: 2px solid #fff; line-height: 1; }
.top-in { height: 60px; }
.nav.tabbar { margin-left: auto; margin-right: 6px; }
/* ---- figure, hero ---- */
.fig { display: block; position: absolute; transform-origin: 50% 100%; }
.fig svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fig-link { display: block; width: 100%; height: 100%; }
.fig-box { display: grid; place-items: center; padding: 6px 10px; }
.fig-box .fig, .profile .fig { position: static; }
.hero { padding: 14px 10px 12px; background: linear-gradient(#ffffff, #eefaff 70%, #e3f6ff); overflow: hidden; }
.hero-t { text-align: center; font-weight: 800; font-size: 19px; color: #4a9a00; }
.stage { position: relative; width: 100%; margin-top: 6px; }
.globe { position: absolute; display: block; }
.globe-time { position: absolute; transform: translate(-50%, -50%); text-align: center; color: #fff; text-shadow: 0 2px 4px rgba(0,60,100,.45); pointer-events: none; }
.globe-time .big { font-size: 28px; font-weight: 700; letter-spacing: -.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.globe-time .sm { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .95; }
.clk { width: 104px; text-align: center; font-variant-numeric: tabular-nums; }
.clk.abs { position: absolute; transform: translate(-50%, -50%); }
.clk b { display: block; font-size: 12px; color: #777; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid #7fd34a; padding-bottom: 1px; }
.clk span { display: block; font-size: 17px; font-weight: 700; color: #333; margin-top: 1px; white-space: nowrap; }
.clocks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding: 6px 4px 0; }
.clocks .clk { width: 92px; }
/* ---- drawings of the week, notifications ---- */
.dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dcard { display: block; text-decoration: none; padding: 8px; }
.dcard:hover { border-color: #aaa; }
.dcard .art { margin: 0; max-width: 100%; }
.dfoot { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-width: 0; }
.dn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13px; }
.dy { font-size: 12px; font-weight: 800; color: #c77700; white-space: nowrap; }
.notif { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 10px 14px; text-decoration: none; align-items: center; }
.notif.new { border-color: var(--green); background: var(--green-soft); }
.notif:hover { border-color: #888; }
.nsn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.swatches .sw { width: 28px; height: 28px; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 0 1px #bbb; cursor: pointer; padding: 0; }
.swatches .sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--green); }
@media (max-width: 700px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0 !important; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left)); }
  .tabbar a { flex: 1; height: 56px; border-bottom: 0; border-top: 3px solid transparent; }
  .tabbar a[aria-current="page"] { border-top-color: var(--green); }
  .tabbar .lbl { display: inline !important; }
  .page { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .globe-time .big { font-size: 22px; }
}

/* ---- plaza ---- */
.plaza-card { padding: 0; overflow: hidden; }
.plaza { position: relative; width: 100%; height: 420px; overflow: hidden; background: #bdeeff; }
.pl-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tree { position: absolute; bottom: 22%; width: calc(60px * var(--k)); height: calc(100px * var(--k)); transform: translateX(-50%); z-index: 3; }
.tree svg { width: 100%; height: 100%; display: block; }
.walker { position: absolute; display: block; transform: translateX(-50%) scale(var(--sc)); transform-origin: 50% 100%; text-decoration: none; }
.walker .fig { position: static; }
.walker:hover, .walker:focus-visible { filter: drop-shadow(0 0 6px #fff); outline: 0; }
.wtag { display: block; margin: 0 auto 2px; width: max-content; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255,255,255,.92); color: #333; font-size: 12px; font-weight: 800; padding: 1px 7px; border: 1px solid #00000022; border-radius: 9px; }
.wtag.pop { background: #fff0a8; }
.walker-empty { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #0006; z-index: 50; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 6px 12px; font-weight: 800; font-size: 13px; cursor: pointer; border-radius: 16px; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 700px) { .plaza { height: 360px; } .tabbar a .lbl { font-size: 10px; } }

/* ---- flat look with a light aero touch ---- */
:root { --bg: #e8f3f8; --line: #c9d6dd; --font: "Nunito", "Helvetica Neue", Helvetica, Arial, sans-serif; }
body { background-image: radial-gradient(#d3e3ea 1.2px, transparent 1.3px); }
.top { background: #fff; border-bottom: 3px solid #8fd4f2; }
.card { border-radius: 3px; border-color: var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.btn { background: var(--green); border: 1px solid var(--green-dark); border-bottom-width: 3px; border-radius: 3px; text-shadow: none; box-shadow: none; }
.btn:hover { background: #66d400; }
.btn.alt { background: #fff; color: #2d5d78; border-color: #b4c9d4; border-bottom-width: 3px; }
.h-sec { color: #2d5d78; }
.page.wide { max-width: 1240px; }
.page.wide .cols { grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
body.aero .top-in { max-width: 1240px; }
.page.wide .hero { position: relative; margin-bottom: 18px; padding: 18px 14px 14px; border: 1px solid #9fcfe6; border-radius: 3px; background: linear-gradient(#bfe7fa, #e6f6fd); overflow: hidden; box-shadow: none; }
.page.wide .hero .stage, .page.wide .hero .clocks, .page.wide .hero-t { position: relative; z-index: 2; }
.page.wide .hero .stage { margin-top: 40px; }
.hero-t { font-size: 26px; letter-spacing: -.3px; color: #2d5d78; text-shadow: none; }
.page.wide .clk b { border-bottom-color: #5ac800; color: #2d5d78; font-size: 13px; }
.page.wide .clk span { font-size: 21px; color: #1d3f52; text-shadow: none; }
.page.wide .globe-time .big { font-size: 36px; }
@media (max-width: 1000px) { .page.wide .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .hero-t { font-size: 20px; } .page.wide .globe-time .big { font-size: 22px; } .page.wide .clk span { font-size: 17px; } }

/* ---- 3D plaza + 3D character ---- */
.plaza3d { position: relative; width: 100%; height: min(70vh, 560px); min-height: 340px; background: #a9dcf6; overflow: hidden; }
.pl3-canvas { display: block; width: 100%; height: 100%; outline-offset: -3px; }
.pl3-canvas.pixel { image-rendering: crisp-edges; image-rendering: pixelated; }
.pl3-pix { position: absolute; right: 8px; bottom: 8px; z-index: 2; font: inherit; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 12px; border: 1px solid #00000033; background: #ffffffd9; color: #2d5d78; cursor: pointer; }
.pl3-pix:hover { background: #fff; }
.pl3-pix[aria-pressed="true"] { background: #5ac800; color: #fff; border-color: #3f9a00; }
.pl3-pixel .pl3-tag { border-radius: 0; border: 2px solid #222; font-size: 11px; padding: 0 5px; box-shadow: 2px 2px 0 #0004; }
.pl3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pl3-tag { position: absolute; left: 0; top: 0; white-space: nowrap; background: #fff; color: #222; font-size: 12px; font-weight: 800; padding: 1px 7px; border: 1px solid #00000033; border-radius: 2px; will-change: transform; }
.pl3-tag.pop { background: #fff0a8; }
.pl3-tag.hover { background: #5ac800; color: #fff; border-color: #3f9a00; }
.pl3-load { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font-weight: 800; color: #2d5d78; }
.char-box { padding: 0; }
.char3d { display: block; width: 200px; height: 200px; cursor: grab; touch-action: none; }
.profile .char-box .fig { display: block; }
@media (max-width: 700px) { .plaza3d { height: 62vh; } .char3d { width: 150px; height: 150px; } }

/* ---- coloured posts ---- */
.styled { margin: 8px 0 0; padding: 14px 16px; border-radius: 3px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.body b { font-weight: 800; }
.style-bar { display: grid; gap: 8px; padding-top: 2px; }
.style-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.style-row .lab { font-size: 12px; font-weight: 800; color: #6b7c86; min-width: 44px; }
.sw-post { width: 24px; height: 24px; border: 1px solid #00000040; border-radius: 3px; cursor: pointer; padding: 0; }
.sw-post[aria-pressed="true"] { outline: 3px solid var(--green); outline-offset: 1px; }
.fmt { min-width: 34px; height: 30px; padding: 0 8px; border: 1px solid #b4c9d4; border-bottom-width: 3px; border-radius: 3px; background: #fff; cursor: pointer; font-weight: 800; }
.fmt[aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); }
select.fontsel { height: 30px; border: 1px solid #b4c9d4; border-radius: 3px; background: #fff; padding: 0 6px; font-size: 14px; max-width: 100%; }

/* ---- Miiverse-style speech-bubble posts, yellow Yeah! ---- */
.post { background: #fff; align-items: start; }
.post > div:nth-child(2) { position: relative; background: #f5faf0; border: 1px solid #d3e3c4; border-radius: 4px; padding: 10px 12px; }
.post > div:nth-child(2)::before { content: ""; position: absolute; left: -6px; top: 20px; width: 10px; height: 10px; background: #f5faf0; border-left: 1px solid #d3e3c4; border-bottom: 1px solid #d3e3c4; transform: rotate(45deg); }
.post .styled { margin-top: 8px; }
.yeah { background: #fff8e1; color: #9a6a00; border: 1px solid #f0cf73; border-bottom-width: 3px; }
.yeah:hover { background: #ffefb0; border-color: #e5b92f; color: #7a5200; }
.yeah.on { background: #ffd54a; border-color: #d9a400; color: #4a3200; }

select.fontsel { width: 160px; }

/* ---- restored Frutiger Aero look (glass cards, gloss, sky) on every page ---- */
:root { --bg: #dff3fb; --line: #cfe3ee; }
body.aero { background: linear-gradient(#5cc4f2 0, #aee8fb 380px, #e4f8ff 760px, #f3fff0 100%) fixed; }
body.aero .top { background: linear-gradient(#ffffffee, #eaf9ffdd); backdrop-filter: blur(8px); border-bottom: 1px solid #ffffffaa; box-shadow: 0 2px 12px rgba(20,120,170,.25); }
body.aero .card:not(.hero) { background: linear-gradient(#ffffffee, #f4fcffe6); border: 1px solid #ffffff; border-radius: 14px; box-shadow: 0 4px 14px rgba(20,110,160,.2), inset 0 1px 0 #fff; backdrop-filter: blur(6px); }
body.aero .h-sec { color: #145d86; text-shadow: 0 1px 0 #fff; font-size: 19px; }
body.aero .btn:not(.alt) { background: linear-gradient(#a6ee5c, #5ac800 50%, #46b000 51%, #7ad82c); border: 1px solid #3f9a00; border-radius: 18px; box-shadow: inset 0 1px 0 #ffffffcc, 0 2px 4px rgba(0,80,0,.3); text-shadow: 0 -1px 0 rgba(0,80,0,.4); }
body.aero .btn.alt { background: linear-gradient(#fff, #dff2fb); border: 1px solid #9ccbe3; border-radius: 18px; color: #145d86; box-shadow: inset 0 1px 0 #fff; }
body.aero input, body.aero textarea, body.aero select { border-radius: 8px; }
body.aero .chip { border-radius: 16px; background: linear-gradient(#fff, #e8f6fd); }
body.aero .chip[aria-pressed="true"] { background: linear-gradient(#a6ee5c, #5ac800 50%, #46b000 51%, #7ad82c); }
body.aero .post > div:nth-child(2) { border-radius: 10px; background: #f3fbff; border-color: #cfe6f1; }
body.aero .post > div:nth-child(2)::before { background: #f3fbff; border-color: #cfe6f1; }
body.aero .yeah { border-radius: 14px; background: linear-gradient(#fffbe8, #ffeaa0); }
.page.wide .hero { border: 1px solid #fff; border-radius: 22px; background: radial-gradient(ellipse at 50% 0, #ffffffcc, transparent 60%), linear-gradient(#8fdcff, #c9f0ff 55%, #e6fbff); box-shadow: 0 8px 28px rgba(20,110,160,.35), inset 0 2px 0 #fff, inset 0 -30px 60px rgba(255,255,255,.4); }
.page.wide .hero::before { content: ""; position: absolute; left: -10%; right: -10%; top: -45%; height: 70%; background: linear-gradient(#ffffff99, #ffffff00); border-radius: 0 0 50% 50%; pointer-events: none; }
.hero-t { color: #1f8a00; text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(0,100,150,.3); }
.plaza-card { border-radius: 18px !important; overflow: hidden; }

.ed-brush { position: absolute; display: none; pointer-events: none; box-sizing: border-box; border: 1px solid #fff; outline: 1px solid #000; z-index: 3; }

/* ---- blog-style post themes ---- */
.styled.theme { border: 1px solid rgba(255,255,255,.85); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,50,100,.22), inset 0 1px 0 rgba(255,255,255,.7); }
.styled.th-sky, .styled.th-gloss, .styled.th-sunset, .styled.th-night { text-shadow: 0 1px 2px rgba(0,30,80,.55); }
.styled.th-glass { -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 6px 18px rgba(0,50,100,.18), inset 0 1px 0 #fff; }
.styled.th-gloss { border-color: #1a6fb0; }
.styled.th-meadow { text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.sw-post.sw-theme { border-radius: 50%; border: 1px solid #1a6fb0; }

/* ---- rich text from the blog editor ---- */
.rt-grad { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-weight: 800; }
.rt-h { font-size: 1.35em; font-weight: 800; line-height: 1.25; margin: .2em 0; }
.rt-q { margin: .5em 0; padding: 6px 12px; border-left: 4px solid #0a84ff; background: rgba(10,132,255,.1); border-radius: 0 8px 8px 0; }
.rt-ul { margin: .3em 0; padding-left: 1.4em; white-space: normal; }
.rt-hr { border: 0; height: 4px; margin: .7em 0; border-radius: 4px; background: linear-gradient(90deg, rgba(0,160,255,0), #39b8ff, #8fff5a, rgba(140,255,90,0)); }
.colpick { width: 30px; height: 30px; padding: 0; border: 1px solid #b4c9d4; border-radius: 6px; background: #fff; cursor: pointer; }
.emoji-row .em { min-width: 32px; padding: 0 4px; font-size: 16px; }
.fmt .rt-grad { font-weight: 900; }

/* ---- post editor ---- */
.cmp-fake { width: 100%; text-align: left; min-height: 56px; padding: 12px 14px; border: 1px solid #b4c9d4; border-radius: 12px; background: rgba(255,255,255,.9); color: #7a8c96; font: inherit; cursor: text; overflow: hidden; }
.cmp-fake.has { color: #25343d; }
.pe { display: grid; gap: 8px; padding: 12px 14px; max-height: 70vh; overflow-y: auto; }
.pe-area { min-height: 170px; max-height: 40vh; overflow-y: auto; outline: none; margin: 4px 0 0 !important; white-space: pre-wrap; overflow-wrap: anywhere; border: 2px solid #b4c9d4; background: #fff; }
.pe-area:focus { border-color: var(--green); }
.pe-area[data-ph]:empty::before { content: attr(data-ph); color: #90a0a8; }
.pe-area > div { min-height: 1.3em; }
.pe-area hr { cursor: default; }
.pe-area blockquote { margin: .3em 0; }
.pe-area ul { margin: .3em 0; }
.pe .style-row .lab { min-width: 52px; }

.rt-imgwrap { display: inline-block; vertical-align: bottom; max-width: 100%; margin: 4px 2px; line-height: 0; }
.rt-img { display: block; max-width: 100%; max-height: 380px; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,50,100,.3); }
.rt-imgwrap.bad { font-size: 12px; color: #7a8c96; line-height: 1.3; }

/* Super Wiggle Paint: jelly wobble of the whole canvas while drawing */
@keyframes superjelly { 0%{transform:rotate(-.6deg) scale(1.005,.995)} 25%{transform:rotate(.5deg) scale(.995,1.006)} 50%{transform:rotate(-.4deg) scale(1.006,.995)} 75%{transform:rotate(.6deg) scale(.996,1.005)} 100%{transform:rotate(-.6deg) scale(1.005,.995)} }
.ed-wrap.live { animation: superjelly .32s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ed-wrap.live { animation: none; } }

/* Games and Super Wiggle Paint challenge */
.game-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 12px; text-decoration: none; color: inherit; align-items: center; }
.game-card:hover { border-color: #aaa; }
.gc-art { height: 100px; border-radius: 8px; background: linear-gradient(135deg, #5bd1ff, #6fe36a); display: flex; flex-direction: column; align-items: center; justify-content: center; font: 800 26px/1.05 system-ui, sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); animation: gcw 1.1s ease-in-out infinite; }
@keyframes gcw { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .gc-art { animation: none; } }
.gc-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.gc-body .d { color: var(--ink-soft); font-size: 14px; }
@media (max-width: 520px) { .game-card { grid-template-columns: 1fr; } }
.wg-big { font-size: 24px; font-weight: 800; color: #1a6e1a; }
.wg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wg-item { padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wg-item .art { margin: 0; max-width: 100%; }
.wg-title { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }

.gc-art.ultra { background: linear-gradient(135deg, #ff4fa3, #ffb02e, #7a5cff); animation-duration: .35s; }
.ed-wrap.live.ultra { animation-duration: .11s; }

/* ===== Badge Arcade ===== */
.char3d.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.char3d.pixel { image-rendering: pixelated; }
.bdg { display: block; object-fit: contain; image-rendering: pixelated; user-select: none; }
.bdg.locked { filter: grayscale(1) brightness(.35) contrast(.8); opacity: .55; }
.arc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(200px, 300px); gap: 14px; align-items: center; padding: 14px 16px; }
.arc-coin { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 26px; color: #8a5a00;
  background: #ffcf3a; border: 3px solid #e0a800; box-shadow: 0 2px 0 #b07800; }
.pts-n { display: block; font-size: 30px; line-height: 1.1; color: var(--green-dark); }
.pts-ms { display: grid; gap: 8px; }
.pts-m span { display: block; font-size: 12px; color: #777; font-weight: 700; margin-bottom: 3px; }
.arc-tabs { overflow: hidden; }
.arc-machine { overflow: hidden; background: #fafafa; }
.arc-title { text-align: center; padding: 12px 10px 8px; }
.arc-title span { display: inline-block; padding: 6px 22px; border-radius: 30px; font-weight: 900; letter-spacing: 3px; color: #fff; background: #5ac800; border: 2px solid #3f9a00; }
.arc-window { position: relative; height: 128px; margin: 6px 14px; overflow: hidden; border-radius: 8px; background: repeating-linear-gradient(90deg, #26313d 0 104px, #2b3846 104px 208px);
  box-shadow: inset 0 6px 14px rgba(0,0,0,.45), inset 0 -6px 14px rgba(0,0,0,.45); }
.arc-window::before, .arc-window::after { content: ""; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none; }
.arc-window::before { left: 0; background: linear-gradient(90deg, rgba(20,26,33,.9), transparent); }
.arc-window::after { right: 0; background: linear-gradient(-90deg, rgba(20,26,33,.9), transparent); }
.arc-strip { display: flex; height: 100%; will-change: transform; }
.arc-tile { flex: none; width: 96px; margin: 0 4px; height: 100%; display: grid; place-items: center; position: relative; }
.arc-tile::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 5px; border-radius: 3px; background: var(--rc); }
.arc-tile.won { background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%); }
.arc-tile.won img { animation: arcwin .6s ease-out; }
@keyframes arcwin { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1.1); } }
.arc-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; z-index: 3; background: #ffd400; }
.arc-marker::before, .arc-marker::after { content: ""; position: absolute; left: -7px; border: 9px solid transparent; }
.arc-marker::before { top: -2px; border-top-color: #ffd400; }
.arc-marker::after { bottom: -2px; border-bottom-color: #ffd400; }
.arc-play { font-size: 18px; padding: 10px 28px; border-radius: 30px; }
.arc-odds { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 0 12px 14px; }
.arc-odds i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.reveal { position: relative; text-align: center; overflow: hidden; }
.reveal .bdg { margin: 6px auto 0; position: relative; animation: rv .7s cubic-bezier(.2,1.6,.4,1); }
.reveal-glow { position: absolute; left: 50%; top: 10px; width: 300px; height: 300px; margin-left: -150px; border-radius: 50%; background: radial-gradient(circle, var(--rc), transparent 65%); opacity: .2; animation: spinG 6s linear infinite; }
@keyframes rv { from { transform: scale(.2) rotate(-200deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spinG { to { transform: rotate(360deg); } }
.reveal h2 { margin: 4px 0; position: relative; }
.reveal-r { font-weight: 900; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; color: var(--rc); position: relative; }
.unlock { color: var(--green-dark); }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.bcell { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px; cursor: pointer; font: inherit; border-bottom: 3px solid var(--rc); }
.bcell:hover { background: #fafafa; transform: translateY(-1px); }
.bcell .bn { font-size: 12px; font-weight: 800; text-align: center; line-height: 1.2; }
.bcell.no .bn { color: #aaa; }
.bcell .bc { position: absolute; top: 6px; right: 6px; font-size: 11px; font-weight: 900; color: #fff; background: #555; border-radius: 10px; padding: 0 6px; }
.bcell .bs { position: absolute; top: 4px; left: 8px; color: #f5b400; font-size: 16px; }
.av-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; }
.av-prev { min-height: 220px; }
.av-slot { margin-bottom: 12px; }
.av-slot > b { display: block; margin-bottom: 6px; color: #555; }
.av-items { display: flex; flex-wrap: wrap; gap: 6px; }
.av-item { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); background: #fff; border-radius: 22px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.av-item[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); box-shadow: inset 0 0 0 1px var(--green); }
.av-item.lock { opacity: .6; cursor: not-allowed; }
.av-item .av-lock { color: #999; font-weight: 600; }
.av-none, .av-free { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #f1f1f1; color: #999; }
.av-free { background: var(--green-soft); color: var(--green-dark); }
.tr { padding: 12px 14px; display: grid; gap: 10px; }
.tr-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.tr-arrow { font-size: 22px; color: #aaa; }
.tr-items { display: flex; flex-wrap: wrap; gap: 4px; min-height: 48px; }
.tr-it, .pb-it { position: relative; }
.tr-it b, .pb-it b { position: absolute; right: -2px; bottom: 0; font-size: 11px; background: #555; color: #fff; border-radius: 8px; padding: 0 5px; }
.tr-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 200px; overflow: auto; padding: 6px; background: #f6f6f6; border-radius: 4px; }
.tr-cell { display: grid; justify-items: center; padding: 4px; border: 2px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; }
.tr-cell.on { border-color: var(--green); background: var(--green-soft); }
.pbadges { padding: 12px 14px; display: grid; gap: 10px; }
.pb-row { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 700px) {
  .arc-head { grid-template-columns: auto minmax(0, 1fr); } .pts-ms { grid-column: 1 / -1; }
  .av-wrap { grid-template-columns: 1fr; } .tr-cols { grid-template-columns: 1fr; } .tr-arrow { transform: rotate(90deg); justify-self: center; }
}
.modal-head .x { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: #888; padding: 2px 6px; }
/* badge market */
.mk-q { flex: 1; min-width: 0; }
.mk-list { overflow: hidden; }
.mk-sub { font-weight: 800; color: #555; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mk-row { display: grid; grid-template-columns: minmax(0, 2.4fr) .7fr 1fr 1.3fr; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #eee; color: inherit; text-decoration: none; }
.mk-row:last-child { border-bottom: 0; }
a.mk-row:hover { background: #f7fbf2; }
.mk-hd { background: #f5f5f5; font-weight: 800; padding-top: 6px; padding-bottom: 6px; }
.mk-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-rar { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.mk-price { font-weight: 800; color: var(--green-dark); }
.mk-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px; align-items: center; }
.mk-top h2 { margin: 0; }
.mk-top p { margin: 4px 0 10px; }
.mk-stats { display: flex; flex-wrap: wrap; gap: 18px; }
.mk-stats div { display: grid; font-size: 12px; color: #888; }
.mk-stats b { font-size: 18px; color: #333; }
.mk-chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.mk-nochart { padding: 20px 0; text-align: center; }
.mk-pr { width: 120px; }
.mk-sell { display: grid; gap: 8px; }
.mk-sell .mk-sub { padding: 0 0 8px; }
@media (max-width: 640px) { .mk-row { grid-template-columns: minmax(0, 1fr) auto; } .mk-row > :nth-child(2), .mk-hd > :nth-child(4) { display: none; } .mk-row > :nth-child(4) { grid-column: 1 / -1; } .mk-top { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.mk-bar { display: flex; gap: 8px; }
.mk-bar .mk-q { flex: 1; min-width: 0; }
.mk-bar select { width: auto; flex: none; }

/* reveal backgrounds per rarity (legendary/epic can use your own picture: badges/bg-legendary.png, badges/bg-epic.png) */
.reveal { border-radius: 0 0 3px 3px; }
.reveal.rv-common { background: #f4f6f8; }
.reveal.rv-rare { background: repeating-conic-gradient(from 0deg at 50% 38%, #e3f3ff 0 10deg, #f4faff 10deg 20deg); }
.reveal.rv-epic { background: url(/badges/bg-epic.png) center / cover no-repeat, repeating-conic-gradient(from 0deg at 50% 38%, #efe0ff 0 10deg, #f8f0ff 10deg 20deg); }
.reveal.rv-legendary { background: url(/badges/bg-legendary.jpg) center / cover no-repeat, repeating-conic-gradient(from 0deg at 50% 38%, #fff0b8 0 10deg, #fff9df 10deg 20deg); image-rendering: pixelated; }
.reveal.rv-legendary h2, .reveal.rv-epic h2 { text-shadow: 0 1px 0 #fff; }
.reveal.rv-legendary h2, .reveal.rv-legendary p, .reveal.rv-legendary .reveal-r { background: rgba(255,255,255,.85); display: table; margin: 6px auto 0; padding: 2px 10px; border-radius: 3px; }
.reveal.rv-legendary p { display: block; margin-left: auto; margin-right: auto; max-width: 90%; }
.bdg.smooth { image-rendering: auto; }

/* fullscreen plaza and arcade */
.fs-fake { position: fixed !important; inset: 0; z-index: 100; margin: 0 !important; border-radius: 0 !important; }
.fs-exit { display: none; }
.plaza-card:fullscreen .fs-exit, .plaza-card.fs-fake .fs-exit { display: block; position: absolute; top: 12px; right: 12px; z-index: 5; }
.plaza-card:fullscreen, .plaza-card.fs-fake { border-radius: 0 !important; background: #a9dcf6; position: relative; }
.plaza-card:fullscreen .plaza3d, .plaza-card.fs-fake .plaza3d { height: 100vh; min-height: 0; }
.arc-machine:fullscreen, .arc-machine.fs-fake { display: flex; flex-direction: column; justify-content: center; background: #f4f8fb; overflow: hidden; }
.arc-machine:fullscreen .arc-title span, .arc-machine.fs-fake .arc-title span { font-size: 30px; padding: 10px 34px; }
.arc-machine:fullscreen .arc-window, .arc-machine.fs-fake .arc-window { height: 230px; margin: 16px 40px; }
.arc-machine:fullscreen .arc-tile, .arc-machine.fs-fake .arc-tile { width: 180px; margin: 0 6px; }
.arc-machine:fullscreen .arc-tile .bdg, .arc-machine.fs-fake .arc-tile .bdg { width: 160px !important; height: 160px !important; }
.arc-machine:fullscreen .arc-play, .arc-machine.fs-fake .arc-play { font-size: 24px; padding: 14px 40px; }
.arc-machine:fullscreen .arc-odds, .arc-machine.fs-fake .arc-odds { font-size: 15px; }
.arc-machine:fullscreen .arc-window, .arc-machine.fs-fake .arc-window { background: repeating-linear-gradient(90deg, #26313d 0 192px, #2b3846 192px 384px); }
