/* ==========================================================
   ZUNARI — UI
   Site colors live here. Change --accent to re-theme.
   ========================================================== */

/* Magnolia Script — put the font file in the fonts/ folder named
   MagnoliaScript.woff2 / .woff / .otf / .ttf. If it's installed on the
   computer viewing the site, that copy is used too. Until then the
   site falls back to Inter / Rajdhani. */
@font-face {
  font-family: "Magnolia Script";
  src: local("Magnolia Script"), local("MagnoliaScript"), local("MagnoliaScript-Regular"),
       url("../fonts/MagnoliaScript.woff2") format("woff2"),
       url("../fonts/MagnoliaScript.woff") format("woff"),
       url("../fonts/MagnoliaScript.otf") format("opentype"),
       url("../fonts/MagnoliaScript.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #000000;
  --accent: #c9a0ff;          /* bright purple (main brand color) */
  --accent-hi: color-mix(in srgb, var(--accent) 60%, white);   /* lighter accent */
  --accent-glow: color-mix(in srgb, var(--accent) 55%, transparent);
  --text: #f4ecff;
  --muted: color-mix(in srgb, var(--text) 60%, var(--bg));
  --bg-image: none;
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --speed: 1;
  --font: "Magnolia Script", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Magnolia Script", "Rajdhani", "Inter", system-ui, sans-serif;
}

body.no-motion { --speed: 0; }
body.no-motion *, body.no-motion *::before, body.no-motion *::after {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

button, input { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

html { background-color: var(--bg); background-image: var(--bg-image); background-size: cover; background-position: center; background-attachment: fixed; }
html.has-bg-image body { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 500px at 50% 115%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(700px 300px at 15% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}

/* ---------------- Top bar ---------------- */
.topbar {
  position: relative; z-index: 2;
  padding: max(22px, env(safe-area-inset-top)) 6vw 0;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { height: 52px; width: 52px; display: block; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 35%, transparent)); }
.brand-name { font-size: 34px; line-height: 1; text-shadow: 0 0 14px var(--accent-glow); }

/* ---------------- Sliding pages ---------------- */
.stage {
  position: relative; z-index: 1;
  height: calc(100vh - 100px);
  height: calc(100dvh - 100px);
  margin-top: 16px;
  overflow: hidden;
}
.track {
  display: flex; height: 100%;
  transition: transform calc(.5s * var(--speed)) var(--ease);
}
.panel {
  flex: 0 0 100%; height: 100%;
  padding: 10px 6vw 40px;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  visibility: hidden;
  transition: visibility 0s linear calc(.5s * var(--speed));
}
.panel::-webkit-scrollbar { display: none; }
.panel.active { visibility: visible; transition-delay: 0s; }

/* ---------------- Hollow outlined boxes ---------------- */
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: transparent;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 0 14px color-mix(in srgb, var(--accent) 18%, transparent);
  text-align: left;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  outline: none;
}
.tile:active {
  transform: scale(.97);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 30px var(--accent-glow), inset 0 0 24px color-mix(in srgb, var(--accent) 35%, transparent);
  transition-duration: .08s;
}
@media (hover: hover) {
  .tile:hover {
    transform: scale(1.025);
    box-shadow: 0 0 0 1px var(--accent), 0 0 30px var(--accent-glow), inset 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent);
  }
}

/* ---------------- Home: four boxes, all different shapes ----------------
   Items = big block, Chat = wide strip, Settings = tall narrow, Account = square */
.hub {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-template-areas:
    "items items items chat chat partners"
    "items items items settings account account"
    "items items items settings account account";
  gap: 16px;
  height: min(520px, calc(100dvh - 170px));
  max-width: 1200px;
}
.t-items    { grid-area: items; }
.t-chat     { grid-area: chat; }
.t-settings { grid-area: settings; }
.t-account  { grid-area: account; }
.t-partners { grid-area: partners; }

.hub-tile {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px 22px;
}
.hub-icon {
  width: 46px; height: 46px;
  fill: none; stroke: var(--accent); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.hub-icon circle { fill: var(--accent); stroke: none; }
.hub-icon circle[r="6"] { fill: none; stroke: var(--accent); }
.t-items .hub-icon { width: 84px; height: 84px; }
.t-chat { flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; }

.hub-text { display: flex; flex-direction: column; gap: 4px; }
.hub-title { font-size: 34px; line-height: 1; }
.t-items .hub-title { font-size: 64px; }
.hub-sub { font-size: 14px; color: var(--accent-hi); }

.hub-avatar, .big-avatar {
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent);
  font-size: 30px; line-height: 1;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------------- Inner pages ---------------- */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 48px; line-height: 1; text-shadow: 0 0 18px var(--accent-glow); }
.back {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent);
  font-size: 22px; line-height: 1;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 35%, transparent);
}
.back:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.panel h2 { font-size: 30px; margin: 30px 0 12px; }

/* tile art: real image if provided, otherwise a purple letter */
.art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.art.generated {
  display: grid; place-items: center;
  font-size: 64px; line-height: 1; color: var(--accent);
  text-shadow: 0 0 18px var(--accent-glow);
}
img.art { width: 100%; height: 100%; object-fit: cover; display: block; }
.has-art .tile-label { background: linear-gradient(0deg, rgba(0,0,0,.92) 30%, rgba(0,0,0,0)); padding-top: 26px; }
.search {
  flex: 1 1 260px; min-width: 0; max-width: 520px; display: block;
  padding: 13px 18px; border-radius: 26px;
  border: 2px solid var(--accent); font-size: 16px; outline: none;
  user-select: text; -webkit-user-select: text;
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.search::placeholder { color: var(--muted); }
.tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; z-index: 1; }
.tile-title { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-cat { display: block; font-size: 12px; margin-top: 2px; color: var(--accent-hi); }
.fav-star { position: absolute; top: 8px; right: 10px; z-index: 2; color: var(--accent-hi); font-size: 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px;
}
.grid .tile { aspect-ratio: 4 / 3; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 8px 18px; border-radius: 20px;
  border: 1.5px solid var(--accent); color: var(--accent-hi); font-size: 14px;
}
.chip.on { background: var(--accent); color: #000; }

.empty { color: var(--muted); padding: 6px 0 10px; font-size: 15px; }
.empty[hidden] { display: none; }

/* settings */
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.setting { padding: 22px 18px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.setting-title { font-size: 28px; }
.setting-value { color: var(--accent-hi); font-size: 14px; }

/* account */
.note { color: var(--muted); font-size: 15px; margin-bottom: 16px; max-width: 520px; }
.name-form { display: flex; gap: 10px; max-width: 520px; }
.name-form input {
  flex: 1; padding: 14px 18px; border-radius: var(--radius);
  border: 2px solid var(--accent); font-size: 16px; outline: none;
  user-select: text; -webkit-user-select: text;
}
.pill-btn {
  padding: 12px 22px; border-radius: 26px;
  border: 2px solid var(--accent); color: var(--text); font-size: 15px; font-weight: 500;
}
.pill-btn:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.pill-btn.danger { border-color: #ff3d7f; color: #ff8fb4; }
.profile-card { display: flex; align-items: center; gap: 20px; padding: 22px; max-width: 520px; }
.big-avatar { width: 84px; height: 84px; font-size: 44px; }
.profile-name { font-size: 40px; line-height: 1.1; }
.profile-stats { color: var(--accent-hi); font-size: 14px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.account-view[hidden], .account-create[hidden] { display: none; }

/* ---------------- Player ---------------- */
.player {
  position: fixed; inset: 0; z-index: 20; background: #000;
  display: flex; flex-direction: column;
  animation: blade .35s var(--ease);
}
.player[hidden], .player-missing[hidden] { display: none; }
.player-bar {
  display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.player-title { flex: 1; font-size: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-actions { display: flex; gap: 8px; }
.pbtn {
  min-width: 46px; height: 46px; padding: 0 14px; border-radius: 23px;
  border: 1.5px solid var(--accent); font-size: 18px;
}
.pbtn:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.pbtn.on { background: var(--accent); color: #000; }
.player-frame-wrap { position: relative; flex: 1; }
#playerFrame { width: 100%; height: 100%; border: 0; background: #000; }
.player-missing { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; color: var(--muted); font-size: 18px; }
.player-missing h2 { font-size: 40px; color: var(--text); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 30;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 22px; border-radius: 24px;
  background: #000; border: 1.5px solid var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  font-size: 14px; pointer-events: none; white-space: nowrap;
  transition: .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes blade { from { transform: translateX(8%); opacity: 0; } }

/* ---------------- Phones: boxes restack, still four different shapes ---------------- */
@media (max-width: 760px) {
  .hub {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1.2fr 1.2fr .8fr .9fr .9fr;
    grid-template-areas:
      "items items items"
      "items items items"
      "chat chat partners"
      "settings account account"
      "settings account account";
    gap: 12px;
    height: calc(100dvh - 150px);
  }
  .t-items .hub-icon { width: 64px; height: 64px; }
  .t-items .hub-title { font-size: 52px; }
  .hub-title { font-size: 28px; }
  .hub-tile { padding: 16px; }
  .t-chat .hub-icon { width: 36px; height: 36px; }
  .t-account { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
  .hub-avatar { width: 46px; height: 46px; font-size: 24px; }
  .t-settings { justify-content: space-between; padding: 16px 12px; }
  .t-settings .hub-title { font-size: 23px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .page-head h1 { font-size: 40px; }
}
.grid .art.generated { padding-bottom: 30px; font-size: 52px; }
.search::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6) sepia(1) hue-rotate(230deg) saturate(6); cursor: pointer; }

/* search + category select bar */
.item-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.select-wrap { position: relative; flex: 0 1 260px; }
.select-wrap::after {
  content: ""; position: absolute; right: 20px; top: 50%; pointer-events: none;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}
.select {
  width: 100%; appearance: none; -webkit-appearance: none;
  padding: 13px 46px 13px 18px; border-radius: 26px;
  border: 2px solid var(--accent); background: #000; color: var(--text);
  font-family: var(--font); font-size: 16px; outline: none; cursor: pointer;
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.select option { background: #000; color: var(--text); font-family: system-ui, sans-serif; }
@media (max-width: 760px) { .select-wrap, .search { flex: 1 1 100%; max-width: none; } }

/* profile pictures */
.hub-avatar, .big-avatar { overflow: hidden; flex-shrink: 0; }
.has-pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.big-avatar { cursor: pointer; position: relative; }
.big-avatar::after {
  content: "Edit"; position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 0 5px; font-size: 14px; text-align: center; color: var(--text);
  background: rgba(0, 0, 0, .7);
}

/* Items box: rotating covers */
.hub-slides { position: absolute; inset: 0; pointer-events: none; }
.hub-slides .slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
  will-change: opacity;
}
.hub-slides .slide.on { opacity: 1; }
.hub-slides::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,0) 60%);
}
.t-items.has-slides .hub-icon { opacity: 0; }
.t-items .hub-text, .t-items .hub-icon { position: relative; z-index: 1; }

/* favorite star on every tile */
.fav-btn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px; line-height: 1; color: var(--text);
  background: rgba(0, 0, 0, .55); border: 1.5px solid color-mix(in srgb, var(--accent) 60%, transparent);
  font-family: system-ui, sans-serif; cursor: pointer;
  transition: transform .15s var(--ease), background .15s;
}
.fav-btn.on { color: #000; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.fav-btn:active { transform: scale(.85); }

/* ================= Performance (Chromebooks / iPads) =================
   Glows and shadows are expensive to paint hundreds of times, so item
   tiles get a flat outline and only glow on the one you touch/hover. */
.grid .tile {
  box-shadow: none;
  transition: transform .15s var(--ease);
  content-visibility: auto;            /* skip painting tiles that are off screen */
  contain-intrinsic-size: auto 150px;
  contain: layout paint;
}
.grid .tile:active { box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (hover: hover) {
  .grid .tile:hover { transform: scale(1.03); box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--accent-glow); }
}
.grid .art.generated { text-shadow: none; }
.fav-btn { transition: none; }
.fav-btn.on { box-shadow: none; }
#itemsMore { height: 1px; }

/* while the player is open, stop drawing the site underneath it */
body.playing .stage, body.playing .topbar, body.playing .bg-glow { display: none; }

/* pages that aren't on screen don't get painted */
.panel:not(.active) { content-visibility: hidden; }

/* top bar chat button */
.topbar { display: flex; align-items: center; justify-content: space-between; }
.top-chat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px 9px 14px; border-radius: 24px;
  border: 2px solid var(--accent); font-size: 20px; line-height: 1;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 35%, transparent);
}
.top-chat svg {
  width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.top-chat:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
@media (hover: hover) { .top-chat:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); } }

/* partners box + page */
.hub-icon circle.ring { fill: none; stroke: var(--accent); }
.t-partners { padding: 16px; }
.t-partners .hub-title { font-size: 26px; }
.t-chat .hub-sub { white-space: nowrap; }
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.partner {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.partner-img {
  width: 64px; height: 64px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0;
  border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
.partner-letter { display: grid; place-items: center; font-size: 34px; color: var(--accent); }
.partner-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.partner-name { font-size: 26px; line-height: 1.1; }
.partner-desc { font-size: 14px; color: var(--accent-hi); }
@media (max-width: 760px) {
  .top-chat span { display: none; }
  .top-chat { padding: 10px; }
  .t-partners .hub-title { font-size: 22px; }
  .t-partners .hub-icon { width: 34px; height: 34px; }
  .t-chat .hub-sub { display: none; }
}

/* ---------------- Settings page ---------------- */
.set-head { font-size: 30px; margin: 26px 0 12px; }
.set-head:first-of-type { margin-top: 0; }
.setting-wide { grid-column: 1 / -1; gap: 14px; justify-content: flex-start; cursor: default; }
.setting-wide:active { transform: none; }
.setting-wide .select-wrap { max-width: 320px; flex: none; width: 100%; }
.setting-danger { border-color: #ff3d7f; }
.setting-danger .setting-value { color: #ff8fb4; }
.custom-theme { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; }
.custom-theme[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field-wide { flex: 1 1 300px; }
.field input[type="color"] {
  width: 64px; height: 44px; padding: 3px; border-radius: var(--radius);
  border: 2px solid var(--accent); background: transparent; cursor: pointer;
}
.text-in {
  padding: 11px 16px; border-radius: var(--radius);
  border: 2px solid var(--accent); font-size: 15px; outline: none;
  user-select: text; -webkit-user-select: text;
}
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.panel .note { margin-bottom: 12px; }

/* ---------------- Fonts: Inter for text, Rajdhani for headings ---------------- */
.hub-title, .page-head h1, .panel h2, .set-head, .setting-title, .profile-name,
.player-title, .partner-name, .art.generated, .big-avatar, .hub-avatar, .partner-letter,
.player-missing h2 {
  font-family: var(--display); font-weight: 400;
}

/* ================= Google Material Symbols (self-hosted) =================
   File: fonts/MaterialSymbolsRounded.woff2 (or .ttf). Until it's there the
   built-in icons (.mf) show instead. Icons use the theme accent colour. */
@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url("../fonts/MaterialSymbolsRounded.woff2") format("woff2"),
       url("../fonts/MaterialSymbolsRounded.ttf") format("truetype");
}
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal;
  font-size: 1.25em; line-height: 1; letter-spacing: normal; text-transform: none;
  white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-smoothing: antialiased; font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  vertical-align: middle; user-select: none;
  display: none;
}
html.ms-ready .ms { display: inline-block; }
html.ms-ready .mf { display: none !important; }

/* themed colours */
.hub-ms {
  font-size: 46px; color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
}
.t-items .hub-ms { font-size: 84px; }
.back .ms { font-size: 24px; color: var(--accent); }
.top-chat .ms { font-size: 22px; color: var(--accent); }
.pbtn .ms { font-size: 22px; color: var(--accent); }
.pbtn.on .ms { color: #000; }
.fav-btn .ms { font-size: 22px; color: var(--text); }
.fav-btn.on .ms, .pbtn.on .ms, #playerFav.on .ms { font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.fav-btn.on .ms { color: #000; }
@media (max-width: 760px) {
  .t-items .hub-ms { font-size: 64px; }
  .t-partners .hub-ms { font-size: 34px; }
}

/* ---------------- Surprise me ---------------- */
.surprise {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 22px; min-height: 52px; border-radius: 26px;
  border: 2px solid var(--accent); background: var(--accent); color: #000;
  font-size: 16px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 0 14px var(--accent-glow);
  transition: transform .15s var(--ease), filter .15s;
}
.surprise .ms { font-size: 22px; color: #000; }
.surprise:active { transform: scale(.95); }
@media (hover: hover) { .surprise:hover { filter: brightness(1.1); } }
@media (max-width: 760px) { .surprise { flex: 1 1 100%; justify-content: center; } }

/* ---------------- Resume pop-up (notification card, top right) ---------------- */
.resume-pop {
  position: fixed; top: max(20px, env(safe-area-inset-top)); right: 20px; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  width: min(380px, calc(100vw - 40px)); padding: 14px 16px 18px 14px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent);
  transform: translateX(calc(100% + 40px)); opacity: 0;
  transition: transform .45s var(--ease), opacity .3s;
}
.resume-pop[hidden] { display: none; }
.resume-pop.show { transform: none; opacity: 1; }
.resume-art { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; flex-shrink: 0; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.resume-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.resume-kicker { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.resume-title { font-size: 16px; line-height: 1.3; }
.resume-title b { font-weight: 700; }
.resume-actions { display: flex; gap: 8px; margin-top: 8px; }
.resume-btn {
  padding: 8px 18px; border-radius: 4px; background: transparent; color: var(--text);
  border: 2px solid var(--accent);
  font-size: 14px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.resume-dismiss { padding: 8px 12px; border-radius: 4px; color: var(--muted); font-size: 14px; border: 2px solid transparent; }
.resume-btn:active { background: color-mix(in srgb, var(--accent) 15%, transparent); }
@media (hover: hover) { .resume-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); } }
.resume-btn:active, .resume-dismiss:active { transform: scale(.95); }
.resume-timer {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--accent); transform-origin: left;
}
.resume-pop.show .resume-timer { animation: resume-count var(--t, 12s) linear forwards; }
@keyframes resume-count { to { transform: scaleX(0); } }
