/* ============================================================
   KIRAMEKI — estilos
   Secciones: variables · base · layout · componentes · rarezas ·
   vistas · modal/toasts · animaciones · responsive
   ============================================================ */

:root {
  /* Paleta KIRAMEKI */
  --bg: #160D20;           /* fondo oscuro */
  --panel: #21142E;        /* morado oscuro */
  --panel-2: #2B1B3B;
  --line: rgba(255, 240, 248, .09);
  --text: #FFF0F8;         /* blanco rosado */
  --muted: #B7A3C6;
  --accent: #B66BFF;       /* morado luminoso */
  --accent-2: #FF8BCB;     /* rosa pastel */
  --pink: #E65AAE;         /* rosa intenso */
  --grad: linear-gradient(135deg, var(--accent), var(--pink));
  --gold: #FFC96B;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(10, 4, 18, .5);
  --side-w: 220px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Avenir Next", "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --logo-font: "Optima", "Candara", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}
/* Temas cosméticos (se compran en la Shop) */
body[data-theme="cyan"] { --accent: #5BC8FF; --accent-2: #7DF9E0; --pink: #2BA4E0; }
body[data-theme="sunset"] { --accent: #FF9A5C; --accent-2: #FF8BCB; --pink: #E65A6E; }
body[data-theme="toxic"] { --accent: #5FD9A8; --accent-2: #D6FF6A; --pink: #3DBF7F; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.45; overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #43285C; border-radius: 10px; }

/* Fondo: luz morada y rosa, con un campo de estrellas muy sutil */
.bg-fx {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 62%),
    radial-gradient(700px 520px at -8% 108%, color-mix(in srgb, var(--pink) 16%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 48%, var(--bg)), var(--bg));
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0; opacity: .5; animation: twinkle 7s ease-in-out infinite;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 14%, rgba(255, 240, 248, .9), transparent),
    radial-gradient(1px 1px at 17% 63%, rgba(255, 240, 248, .7), transparent),
    radial-gradient(1.5px 1.5px at 26% 33%, rgba(255, 139, 203, .85), transparent),
    radial-gradient(1px 1px at 35% 86%, rgba(255, 240, 248, .6), transparent),
    radial-gradient(1.5px 1.5px at 47% 9%, rgba(182, 107, 255, .9), transparent),
    radial-gradient(1px 1px at 54% 52%, rgba(255, 240, 248, .6), transparent),
    radial-gradient(1.5px 1.5px at 63% 77%, rgba(255, 139, 203, .8), transparent),
    radial-gradient(1px 1px at 71% 24%, rgba(255, 240, 248, .7), transparent),
    radial-gradient(1.5px 1.5px at 82% 58%, rgba(182, 107, 255, .85), transparent),
    radial-gradient(1px 1px at 90% 88%, rgba(255, 240, 248, .6), transparent),
    radial-gradient(1px 1px at 95% 31%, rgba(255, 240, 248, .7), transparent),
    radial-gradient(1px 1px at 3% 92%, rgba(255, 139, 203, .7), transparent);
}
@keyframes twinkle { 50% { opacity: .2; } }

/* ---------- Layout ---------- */
.app { position: relative; z-index: 1; display: flex; height: 100vh; height: 100dvh; }
.sidebar {
  width: var(--side-w); flex: none; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px; background: color-mix(in srgb, var(--panel) 83%, transparent); backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; user-select: none; }
.logo-mark { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 55%, transparent)); animation: shimmer 5s ease-in-out infinite; }
.logo-text { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.logo-text b { font: 800 19px var(--logo-font); letter-spacing: .2em; background: linear-gradient(90deg, #FFF0F8, var(--accent-2) 50%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-text small { font-size: 10px; letter-spacing: .3em; color: var(--muted); }
@keyframes shimmer { 50% { transform: rotate(8deg) scale(1.06); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent-2) 70%, transparent)); } }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 13px;
  transition: .2s; position: relative;
}
.nav a .ico { width: 20px; text-align: center; font-size: 16px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.active { color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 38%, transparent), transparent); }
.nav a.active::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.side-foot { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.side-foot span { font-size: 11px; letter-spacing: .08em; background: linear-gradient(90deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.side-foot small { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; color: var(--accent-2); margin-bottom: 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; gap: 12px; }
.top-title { font: 800 22px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.hud { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: flex; align-items: baseline; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.chip b { font-size: 16px; font-variant-numeric: tabular-nums; }
.chip small { color: var(--muted); font-size: 11px; }
.chip-ico { color: var(--accent-2); }
.chip.gold .chip-ico, .chip.gold b { color: var(--gold); }
.chip.bump { animation: bump .45s; }

.view { flex: 1; overflow-y: auto; padding: 4px 28px 40px; outline: none; }
.view.enter > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; }
.view.enter > *:nth-child(3) { animation-delay: .1s; }
.view.enter > *:nth-child(4) { animation-delay: .15s; }

/* ---------- Componentes base ---------- */
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.panel h3, .section-title { margin: 0 0 14px; font: 800 13px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06); padding: 10px 18px; border-radius: 12px;
  font-weight: 700; letter-spacing: .03em; transition: .2s;
}
.btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary {
  border: 0; background: var(--grad); color: #fff;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; }
.btn.danger { color: #FF9CC2; }
.btn.big { padding: 15px 38px; font-size: 17px; letter-spacing: .12em; text-transform: uppercase; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
input[type=text], input[type=search], input[type=email], input[type=password], select, textarea {
  background: rgba(255, 255, 255, .05); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; outline: none; min-width: 0; font: inherit;
}
textarea { width: 100%; min-height: 150px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.suggest-feature-form { display: grid; gap: 14px; }
.suggest-field { display: grid; gap: 7px; min-width: 0; }
.suggest-field label { display: block; margin: 0; }
.suggest-field input, .suggest-field textarea { width: 100%; }
.suggest-count { font-size: 12px; }
select option { background: #21142E; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.toolbar input { flex: 1 1 220px; }
.muted { color: var(--muted); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .07); }

/* ---------- Rarezas ---------- */
[data-r] { --rc: #A99BBB; --rg: rgba(169, 155, 187, .3); }
[data-r="common"] { --rc: #A99BBB; --rg: rgba(169, 155, 187, .30); }
[data-r="uncommon"] { --rc: #5FD9A8; --rg: rgba(95, 217, 168, .40); }
[data-r="rare"] { --rc: #6FA8FF; --rg: rgba(111, 168, 255, .45); }
[data-r="epic"] { --rc: #B66BFF; --rg: rgba(182, 107, 255, .55); }
[data-r="legendary"] { --rc: #FFC96B; --rg: rgba(255, 201, 107, .55); }
[data-r="mythic"] { --rc: #E65AAE; --rg: rgba(230, 90, 174, .65); }
.rar { color: var(--rc); background: color-mix(in srgb, var(--rc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); }

/* Tarjeta de personaje */
.card {
  position: relative; border-radius: 14px; overflow: hidden; background: var(--panel-2); cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--rc) 60%, transparent);
  box-shadow: 0 0 0 transparent; transition: transform .25s, box-shadow .25s;
  aspect-ratio: 3 / 4.3;
}
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 12px 34px var(--rg); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; background: #2B1B3B; }
.card:hover img { transform: scale(1.07); }
.card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(22, 13, 32, .92)); pointer-events: none; }
.card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 11px; pointer-events: none; }
.card .nm { font-weight: 800; font-size: 14px; line-height: 1.15; text-shadow: 0 2px 8px #000; }
.card .an { font-size: 11px; color: #EBDDF5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; }
.card .val { color: var(--gold); font-weight: 800; }
.card .pill { position: absolute; top: 8px; left: 8px; }
.card .fav {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .55); color: #EBDDF5; font-size: 15px; backdrop-filter: blur(6px); transition: .2s;
}
.card .fav.on { color: var(--gold); text-shadow: 0 0 10px var(--gold); }
.card .fav:hover { transform: scale(1.15); }
.card.owned::after { content: "✓"; position: absolute; top: 40px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-2); display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.card.dim img { filter: grayscale(.85) brightness(.55); }
.cards { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

/* Efectos por rareza alta */
.card[data-r="epic"] { box-shadow: 0 0 16px -6px var(--rg); }
.card[data-r="legendary"] { box-shadow: 0 0 20px -4px var(--rg); }
.card[data-r="mythic"] { border-color: transparent; }
.card[data-r="mythic"]::before, .showcase.hi::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; padding: 2px;
  background: conic-gradient(from var(--ang, 0deg), var(--rc), #fff, var(--rc), transparent 60%, var(--rc));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 3.5s linear infinite;
}
.card[data-r="mythic"] .shade { background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--rc) 25%, #160D20) 100%); }
.card .sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-100%); }
.card[data-r="legendary"]:hover .sheen, .card[data-r="mythic"]:hover .sheen { opacity: 1; animation: sheen .9s; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- HOME ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
.greet { display: flex; gap: 18px; align-items: center; position: relative; overflow: hidden; }
.greet::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 35%, transparent), transparent 70%); }
.avatar { width: 76px; height: 76px; flex: none; border-radius: 22px; display: grid; place-items: center; font: 900 32px var(--display); background: var(--grad); box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 60%, transparent); }
.greet h2 { margin: 0; font: 800 26px var(--display); }
.greet .name-edit { cursor: pointer; border-bottom: 1px dashed var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; position: relative; z-index: 1; }
.stat b { display: block; font: 800 22px var(--display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.stat.gold b { color: var(--gold); }
.home-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; margin-bottom: 18px; }
.featured .card { aspect-ratio: 3 / 4; }
.activity { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.act { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); font-size: 14px; }
.act .ai { width: 28px; text-align: center; color: var(--accent-2); }
.act time { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.act .amt { font-weight: 800; font-size: 13px; }
.act .amt.pos { color: #5FD9A8; } .act .amt.neg { color: #FF9CC2; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quick a {
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; gap: 4px; transition: .25s; position: relative; overflow: hidden;
}
.quick a:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.quick a .qi { font-size: 22px; color: var(--accent-2); }
.quick a b { letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.quick a small { color: var(--muted); }
.daily { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.ach { display: flex; flex-wrap: wrap; gap: 8px; }
.ach span { padding: 6px 11px; border-radius: 10px; font-size: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); }
.ach span.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }

/* ---------- ROLL ---------- */
.roll-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 10px 0; }
.showcase {
  position: relative; width: min(340px, 82vw); aspect-ratio: 3 / 4.3; border-radius: 22px; overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--rc, #4a3560) 70%, transparent); background: var(--panel-2);
  box-shadow: 0 0 60px -10px var(--rg, rgba(0, 0, 0, .5));
}
.showcase img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(22, 13, 32, .95)); }
.showcase .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; }
.showcase .nm { font: 800 24px var(--display); text-shadow: 0 2px 10px #000; }
.showcase.hi { border-color: transparent; }
.showcase.reveal { animation: reveal .9s cubic-bezier(.2, .9, .2, 1) both; }
.showcase.empty { display: grid; place-items: center; text-align: center; color: var(--muted); border-style: dashed; border-color: var(--line); box-shadow: none; }
.showcase.empty .big { font-size: 56px; color: var(--accent); opacity: .6; animation: float 3s ease-in-out infinite; }
.showcase.shake { animation: shake .5s; }
.roll-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.roll-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.burst { position: fixed; inset: 0; z-index: 75; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, var(--rg), transparent 60%); }
.burst.go { animation: burst 1.1s ease-out; }
.odds { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ---------- Harem / Dex / Wishlist ---------- */
.sumbar { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.sumbar b { color: var(--text); }
.progress { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .07); overflow: hidden; margin: 6px 0 18px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 14px var(--accent-2); transition: width .6s; }
.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .02); }
.empty-state .big { font-size: 54px; color: var(--accent); opacity: .7; }
.empty-state h3 { font: 800 20px var(--display); letter-spacing: .06em; margin: 10px 0 6px; text-transform: none; color: var(--text); }
.results { display: grid; gap: 8px; margin-bottom: 20px; }
.res { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.res img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.res .grow { flex: 1; min-width: 0; cursor: pointer; }
.res .grow b, .res .grow small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res small { color: var(--muted); }

/* ---------- Shop ---------- */
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.item { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.item .ii { font-size: 34px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 40%, transparent), color-mix(in srgb, var(--accent-2) 30%, transparent)); }
.item h4 { margin: 4px 0 0; font: 800 16px var(--display); }
.item p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.item .price { color: var(--gold); font-weight: 800; }
.item .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cat-title { margin: 26px 0 12px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(18, 10, 27, .8); backdrop-filter: blur(8px); animation: fade .2s; }
.dialog {
  width: min(760px, 100%); max-height: 92vh; overflow: auto; border-radius: 22px; position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent), var(--panel); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 80px -30px var(--rg, var(--accent)); animation: pop .3s cubic-bezier(.2, .9, .2, 1);
}
.dialog.sm { width: min(420px, 100%); padding: 24px; }
.dlg-char { display: grid; grid-template-columns: 260px 1fr; }
.dlg-char .pic { position: relative; min-height: 340px; }
.dlg-char .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dlg-char .body { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.dlg-char h2 { margin: 0; font: 800 28px var(--display); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.facts small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.facts b { font-size: 16px; }
.dlg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.x { position: absolute; top: 10px; right: 12px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); font-size: 16px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 28px)); }
.toast {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: rgba(33, 20, 46, .95); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--accent)); box-shadow: var(--shadow); animation: slide .35s cubic-bezier(.2, .9, .2, 1);
}
.toast .ti { font-size: 20px; color: var(--tc, var(--accent)); }
.toast b { display: block; font-size: 14px; }
.toast small { color: var(--muted); }
.toast.out { animation: slideOut .3s forwards; }
.toast.good { --tc: #5FD9A8; } .toast.bad { --tc: #FF6FA8; } .toast.gold { --tc: var(--gold); }

/* ---------- Animaciones ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes spin { to { --ang: 360deg; } }
@keyframes sheen { to { transform: translateX(100%); } }
@keyframes bump { 40% { transform: scale(1.14); box-shadow: 0 0 22px var(--gold); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes shake { 20% { transform: translateX(-8px) rotate(-1deg); } 40% { transform: translateX(8px) rotate(1deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes reveal {
  0% { opacity: 0; transform: perspective(900px) rotateY(90deg) scale(.7); filter: brightness(3); }
  60% { opacity: 1; transform: perspective(900px) rotateY(-8deg) scale(1.04); filter: brightness(1.4); }
  100% { transform: none; filter: none; }
}
@keyframes burst { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero, .home-grid { grid-template-columns: 1fr; }
  .featured { display: grid; place-items: center; }
  .featured .card { width: min(260px, 70vw); }
}
@media (max-width: 760px) {
  .app { flex-direction: column-reverse; }
  .sidebar {
    width: 100%; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 0;
    border-right: 0; border-top: 1px solid var(--line); z-index: 20;
  }
  .logo, .side-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 7px 6px; font-size: 10px; letter-spacing: .02em; flex: 1; align-items: center; }
  .nav a.active::before { left: 25%; right: 25%; top: 0; bottom: auto; width: auto; height: 3px; }
  .topbar { padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .top-title { font-size: 17px; }
  .chip { padding: 6px 10px; } .chip small { display: none; } .chip #hudTimer { display: inline; }
  .view { padding: 2px 14px 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dlg-char { grid-template-columns: 1fr; }
  .dlg-char .pic { min-height: 0; aspect-ratio: 4 / 3.4; }
  .dlg-char .body { padding: 18px; }
  .toasts { top: 8px; right: 8px; left: 8px; max-width: none; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .greet { flex-direction: column; text-align: center; }
}

/* ---------- Reclamo, duplicados y pity ---------- */
.pity-box { width: min(340px, 82vw); display: grid; gap: 6px; }
.pity { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.pity > span { width: 74px; text-transform: uppercase; letter-spacing: .06em; }
.pity .progress { flex: 1; margin: 0; }
.pity b { color: var(--text); font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.showcase.dup img { filter: saturate(.55) brightness(.7); }
.dup-badge { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 3; text-align: center; padding: 8px 10px; border-radius: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; background: rgba(22, 13, 32, .78); border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold); backdrop-filter: blur(6px); }
.cd-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; position: relative; z-index: 1; }

/* ============================================================
   v1.2 — Álbum, Misiones, Logros, Evento, Racha, Potenciadores
   ============================================================ */
.nav a { position: relative; }
.nav a[data-badge]:not([data-badge="0"])::after {
  content: attr(data-badge); position: absolute; top: 6px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center; font-size: 10px; font-weight: 900; letter-spacing: 0; color: #fff; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2);
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot { 50% { transform: scale(1.18); } }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); transition: .2s; }
.tab:hover { color: var(--text); }
.tab.on { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent); }
.tab i { font-style: normal; margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: var(--accent-2); color: #fff; font-size: 11px; }

/* Barras de progreso */
.progress.done i { background: linear-gradient(90deg, #FFC96B, #FFE8B8); box-shadow: 0 0 14px #FFC96B; }
.progress.slim { height: 6px; margin: 8px 0 4px; }

/* Recompensa diaria y racha */

/* Misiones */

@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--gold); background: color-mix(in srgb, var(--gold) 25%, var(--panel)); } 100% { box-shadow: 0 0 0 24px transparent; } }

/* Logros */

/* Álbum */

/* Eventos */
.event-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 16px 20px; border-radius: var(--radius); position: relative; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent-2) 55%, transparent);
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 35%, var(--panel)), color-mix(in srgb, var(--accent-2) 22%, var(--panel)));
}
.event-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .1) 50%, transparent 60%); transform: translateX(-100%); animation: sheen 5s ease-in-out infinite; pointer-events: none; }
.event-banner .ei { font-size: 34px; }
.event-banner .eb { flex: 1; min-width: 200px; }
.event-banner b { font: 800 18px var(--display); display: block; }
.event-banner small { color: #F0DFF6; }
.event-head { margin-bottom: 14px; }
.event-head h2 { margin: 0; font: 800 24px var(--display); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

/* Tienda / HUD extra */
.boost-line { padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold); font-size: 13px; }
.avatar.frame-neon { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-2), 0 0 28px var(--accent-2); }
.avatar.frame-gold { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #FFC96B, 0 0 28px rgba(255, 201, 107, .7); }

@media (max-width: 760px) {
  .nav a { padding: 6px 2px; font-size: 9px; letter-spacing: 0; min-width: 0; }
  .nav a .ico { font-size: 15px; }
  .nav a[data-badge]:not([data-badge="0"])::after { top: 2px; right: 4px; min-width: 15px; height: 15px; font-size: 9px; }

  .tab { padding: 8px 12px; font-size: 12px; }
}

/* Perfil de jugador */
.profile-cover {
  min-height: 190px; border-radius: var(--radius) var(--radius) 0 0; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 75% 20%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 45%),
              linear-gradient(120deg, color-mix(in srgb, var(--accent) 55%, var(--panel)), var(--panel-2) 55%, var(--bg));
  background-position: center; background-size: cover; border: 1px solid var(--line);
}
.profile-cover::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.07),transparent 65%); }
.profile-cover-actions { position:absolute; right:16px; bottom:14px; z-index:1; }
.profile-head { display:flex; align-items:center; gap:20px; padding:0 22px 22px; border-radius:0 0 var(--radius) var(--radius); margin-bottom:16px; }
.profile-avatar-wrap { display:grid; justify-items:center; gap:9px; margin-top:-48px; position:relative; z-index:2; }
.profile-avatar { width:112px; height:112px; border-radius:28px; overflow:hidden; display:grid; place-items:center; border:4px solid var(--panel); background:linear-gradient(135deg,var(--accent),var(--panel-2)); box-shadow:0 0 0 2px var(--accent-2),0 12px 35px rgba(0,0,0,.35); font:900 42px var(--display); color:white; }
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-avatar.frame-neon { box-shadow:0 0 0 4px var(--panel),0 0 0 7px var(--accent-2),0 0 28px var(--accent-2); }
.profile-avatar.frame-gold { box-shadow:0 0 0 4px var(--panel),0 0 0 7px #FFC96B,0 0 28px rgba(255,201,107,.65); }
.profile-identity { min-width:0; flex:1; padding-top:17px; }
.profile-identity h2 { margin:7px 0 4px; font:900 27px var(--display); }
.profile-identity p { color:var(--muted); margin:0; overflow-wrap:anywhere; }
.profile-edit-note { align-self:flex-end; color:var(--accent-2); font-size:12px; font-weight:700; padding-bottom:4px; }
.file-hidden { display:none !important; }
.profile-stats { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:16px 0; }
.profile-stats .panel { padding:15px 12px; display:grid; gap:5px; min-width:0; }
.profile-stats b { font:900 21px var(--display); color:var(--text); overflow-wrap:anywhere; }
.profile-stats span { color:var(--muted); font-size:11px; }
.profile-columns { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:16px; align-items:start; }
.profile-editor, .profile-showcase, .profile-records { padding:20px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.section-heading h3, .profile-records h3 { margin:0 0 4px; font:800 18px var(--display); }
.section-heading p { margin:0; font-size:12px; }
.profile-spark { color:var(--accent-2); font-size:24px; }
.profile-editor label { display:flex; justify-content:space-between; gap:10px; margin:15px 0 7px; color:var(--text); font-size:12px; font-weight:700; }
.profile-editor label small { color:var(--muted); font-weight:400; }
.profile-editor textarea, .profile-editor select { width:100%; }
.profile-editor textarea { resize:vertical; min-height:76px; }
.favorite-preview { max-width:190px; margin-top:12px; }
.frame-options { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.frame-option { border:1px solid var(--line); border-radius:999px; padding:8px 12px; background:var(--panel-2); color:var(--text); cursor:pointer; font-size:11px; }
.frame-option.selected { border-color:var(--accent-2); color:var(--accent-2); box-shadow:0 0 16px color-mix(in srgb,var(--accent-2) 20%,transparent); }
.profile-pins { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.profile-pin { min-width:0; display:grid; gap:6px; }
.profile-pin .card { min-width:0; }
.pin-picker { border-top:1px solid var(--line); margin-top:18px; padding-top:14px; }
.pin-picker h4 { margin:0 0 10px; }
.pin-row { display:flex; align-items:center; gap:10px; width:100%; padding:7px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.pin-row:hover, .pin-row.pinned { background:var(--panel-2); border-color:var(--line); }
.pin-row img { width:38px; height:44px; border-radius:7px; object-fit:cover; }
.pin-row span { flex:1; min-width:0; font-size:12px; font-weight:700; }
.pin-row small { display:block; color:var(--muted); font-weight:400; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pin-row b { color:var(--accent-2); font-size:10px; white-space:nowrap; }
.profile-records { margin-top:16px; }
.record-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:14px; }
.record-grid div { display:grid; gap:5px; padding:13px; border-radius:12px; background:var(--panel-2); }
.record-grid small { color:var(--muted); font-size:11px; }
.record-grid b { font-size:14px; }
@media (max-width:1000px) { .profile-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:760px) {
  .profile-cover { min-height:145px; }
  .profile-head { align-items:flex-start; flex-wrap:wrap; gap:12px; padding:0 14px 16px; }
  .profile-avatar { width:88px; height:88px; border-radius:22px; font-size:32px; }
  .profile-avatar-wrap { margin-top:-38px; }
  .profile-identity { padding-top:12px; }
  .profile-identity h2 { font-size:22px; }
  .profile-edit-note { display:none; }
  .profile-columns { grid-template-columns:1fr; }
  .profile-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-pins { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:760px) { .nav { overflow-x:auto; scrollbar-width:none; } .nav::-webkit-scrollbar { display:none; } .nav a { flex:0 0 auto; min-width:54px; } }

/* KIRAMEKI — ajustes de perfil y jerarquía visual */
.profile-edit-panel { margin: 16px 0; }
.profile-image-edit { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:8px; }
.profile-image-edit > div { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--panel-2); }
.profile-image-edit b { font-size:12px; }
.profile-edit-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.profile-public-columns { grid-template-columns:repeat(2,minmax(0,1fr)); margin:16px 0; }
.profile-featured, .profile-showcase { min-width:0; padding:20px; }
.profile-feature-card { width:min(100%,310px); margin:0 auto; }
.profile-feature-card .card { aspect-ratio:3 / 4; }
.profile-showcase .profile-pins { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-records { margin-top:16px; }
.profile-edit-trigger { flex-shrink:0; align-self:center; }
.stat b.roll-count { white-space:nowrap; }
.stat b.roll-count .js-rolls { display:inline; font:inherit; color:inherit; letter-spacing:normal; text-transform:none; }
@media (max-width:760px) {
  .profile-public-columns { grid-template-columns:1fr; }
  .profile-image-edit { grid-template-columns:1fr; }
  .profile-edit-trigger { width:100%; }
  .profile-showcase .profile-pins { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* La foto de perfil también se utiliza en el saludo de inicio. */
.greet .avatar {
  width:76px; min-width:76px; max-width:76px; height:76px; min-height:76px; max-height:76px;
  flex:0 0 76px; aspect-ratio:1; overflow:hidden; position:relative;
}
.greet .avatar img { position:absolute; inset:0; width:100%; height:100%; min-width:0; min-height:0; max-width:none; max-height:none; display:block; object-fit:cover; border-radius:inherit; }

/* ============================================================
   v1.3 — Álbum (colecciones con tarjetas) y Misiones (tarjetas)
   ============================================================ */

/* ---------- Álbum ---------- */
.coll { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), var(--panel); }
.coll.full { border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 0 28px -10px var(--gold); }
.coll-head { display: grid; grid-template-columns: 1fr auto auto 22px; grid-template-areas: "title stats reward chev" "bar bar bar bar"; gap: 8px 16px; align-items: center; padding: 16px 20px; cursor: pointer; user-select: none; }
.coll-head:hover { background: rgba(255, 255, 255, .03); }
.coll-title { grid-area: title; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.coll-title h3 { margin: 0; font: 800 17px var(--display); letter-spacing: .02em; text-transform: none; color: var(--text); }
.coll-stats { grid-area: stats; font-size: 13px; color: var(--muted); white-space: nowrap; }
.coll-stats b { font: 800 20px var(--display); color: var(--text); }
.coll-stats span { margin-left: 8px; color: var(--accent-2); font-weight: 800; }
.coll-reward { grid-area: reward; font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 999px; white-space: nowrap; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.coll-reward.paid { color: #5FD9A8; border-color: color-mix(in srgb, #5FD9A8 45%, transparent); background: color-mix(in srgb, #5FD9A8 10%, transparent); }
.chev { grid-area: chev; color: var(--muted); transition: transform .25s; }
.coll.closed .chev { transform: rotate(-90deg); }
.coll-head .progress { grid-area: bar; margin: 4px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 6px 20px 20px; animation: fade .3s; }
.coll.closed .tiles { display: none; }

/* Tarjeta de personaje del álbum */
.tile { position: relative; aspect-ratio: 3 / 4.2; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--panel-2);
  border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent); transition: transform .25s, box-shadow .25s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 10px 26px var(--rg); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s, filter .3s; }
.tile:hover img { transform: scale(1.06); }
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(5, 3, 10, .92)); }
.t-name { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 8px 9px; pointer-events: none; }
.t-name b { display: block; font-size: 12.5px; line-height: 1.15; text-shadow: 0 2px 6px #000; }
.t-name small { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--rc); font-weight: 700; }
.t-state { position: absolute; top: 7px; right: 7px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.tile.got .t-state { background: var(--accent-2); color: #fff; box-shadow: 0 0 12px var(--accent-2); }
.tile.miss { border-color: var(--line); border-style: dashed; }
.tile.miss img { filter: grayscale(1) brightness(.32) contrast(1.1); }
.tile.miss .t-name b { color: #b9b3cc; }
.tile.miss .t-name small { color: var(--muted); }
.tile.miss:hover { box-shadow: none; }
.tile.miss:hover img { filter: grayscale(1) brightness(.5) contrast(1.1); }

/* ---------- Misiones ---------- */
.qsummary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.qs { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.qs b { display: block; font: 800 24px var(--display); font-variant-numeric: tabular-nums; }
.qs span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.qs.hot { border-color: color-mix(in srgb, var(--accent-2) 65%, transparent); box-shadow: 0 0 24px -8px var(--accent-2); }
.qs.hot b { color: var(--accent-2); }
.qs.gold b { color: var(--gold); }

.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.qcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; transition: transform .25s, box-shadow .25s;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent), var(--panel); }
.qcard:hover { transform: translateY(-3px); }
.qc-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.qc-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 22px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 24%, transparent); }
.qc-badge { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted); }
.qcard h4 { margin: 0; font: 700 15px var(--font); line-height: 1.3; min-height: 40px; position: relative; z-index: 1; }
.qc-prog { position: relative; z-index: 1; }
.qc-prog .progress { margin: 0 0 6px; }
.qc-prog span { font-size: 12px; color: var(--muted); }
.qc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; position: relative; z-index: 1; }
.qc-reward { font-weight: 800; color: var(--gold); font-size: 14px; }
.qcard.ready { border-color: var(--accent-2); box-shadow: 0 0 28px -8px var(--accent-2); }
.qcard.ready::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 55%); }
.qcard.ready .qc-badge { background: var(--accent-2); color: #fff; animation: pulseDot 1.8s ease-in-out infinite; }
.qcard.claimed { opacity: .62; }
.qcard.claimed .qc-ico { background: color-mix(in srgb, #5FD9A8 22%, transparent); }
.qcard.claimed .qc-badge { color: #5FD9A8; background: color-mix(in srgb, #5FD9A8 14%, transparent); }
.qcard.flash { animation: flash 1.1s ease-out; }

/* Recompensa diaria */
.daily-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 24px; margin-bottom: 18px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  background: radial-gradient(520px 220px at 0 0, color-mix(in srgb, var(--gold) 20%, transparent), transparent 70%), var(--panel); box-shadow: var(--shadow); }
.dh-ico { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 55%, #000), color-mix(in srgb, var(--accent-2) 40%, #000)); box-shadow: 0 0 34px -4px rgba(255, 200, 61, .5); animation: float 3.5s ease-in-out infinite; }
.dh-body small { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: 11px; font-weight: 800; }
.dh-amount { font: 900 40px var(--display); color: var(--gold); line-height: 1.1; text-shadow: 0 0 26px rgba(255, 200, 61, .4); }
.dh-body p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.dh-body p b { color: var(--text); }
.streak7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 14px; }
.dpip { position: relative; padding: 14px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.dpip small { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.dpip .di { font-size: 22px; }
.dpip .dr { font-size: 12px; font-weight: 800; color: var(--muted); }
.dpip.bonus { border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 16%, var(--panel)), var(--panel)); }
.dpip.done { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 12%, var(--panel)); }
.dpip.done small, .dpip.done .dr { color: var(--gold); }
.dpip.done::after { content: "✓"; position: absolute; top: 6px; right: 8px; font-size: 11px; font-weight: 900; color: var(--gold); }
.dpip.today { border-color: var(--accent-2); box-shadow: 0 0 22px -4px var(--accent-2); animation: pulseDot 2s ease-in-out infinite; }
.dpip.today .dr { color: var(--accent-2); }
.dh-note { text-align: center; color: var(--muted); font-size: 13px; margin: 0; }

/* Logros */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 8px; }
.acard { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.acard .aic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 50%; background: rgba(255, 255, 255, .05); filter: grayscale(1) opacity(.55); }
.acard .ab { flex: 1; min-width: 0; }
.acard b { display: block; font-size: 14px; line-height: 1.25; }
.acard small { color: var(--muted); font-size: 12px; }
.acard .progress { margin: 8px 0 4px; }
.acard.on { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 14%, var(--panel)), var(--panel) 70%); }
.acard.on .aic { filter: none; background: color-mix(in srgb, var(--gold) 20%, transparent); box-shadow: 0 0 20px -2px rgba(255, 200, 61, .5); animation: rise .5s both; }
.acard.on small { color: var(--gold); }

@media (max-width: 760px) {
  .coll-head { grid-template-columns: 1fr auto 20px; grid-template-areas: "title stats chev" "reward reward reward" "bar bar bar"; padding: 14px; }
  .coll-reward { justify-self: start; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 12px 14px; }
  .t-name { padding: 6px; } .t-name b { font-size: 11px; } .t-name small { font-size: 9px; }
  .t-state { width: 20px; height: 20px; font-size: 10px; top: 5px; right: 5px; }
  .qsummary { gap: 8px; } .qs { padding: 10px; } .qs b { font-size: 18px; } .qs span { font-size: 10px; }
  .qgrid { grid-template-columns: 1fr; gap: 10px; }
  .daily-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 20px 16px; gap: 14px; }
  .dh-ico { width: 64px; height: 64px; font-size: 30px; border-radius: 20px; }
  .dh-body { width: 100%; } .dh-amount { font-size: 32px; }
  .streak7 { gap: 5px; } .dpip { padding: 10px 2px; } .dpip small { font-size: 9px; letter-spacing: 0; } .dpip .di { font-size: 17px; } .dpip .dr { font-size: 10px; }
  .agrid { grid-template-columns: 1fr; gap: 10px; }
}


/* ============================================================
   KIRAMEKI — capa común de consistencia y adaptación
   Reglas de refuerzo centralizadas; no sustituyen estilos propios
   de cada vista ni modifican la identidad de los temas cosméticos.
   ============================================================ */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --control-radius: 12px;
  --control-height: 42px;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent);
}

button, input, select, textarea { min-width: 0; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
.btn, .tab, .frame-option, .x {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
}
.btn:active:not(:disabled), .tab:active:not(:disabled), .frame-option:active:not(:disabled) {
  transform: translateY(0) scale(.98);
  filter: brightness(.96);
}
.btn:disabled, button:disabled, [aria-disabled="true"] {
  cursor: not-allowed;
  pointer-events: auto;
}
.panel, .item, .qcard, .acard, .coll, .profile-columns > *, .profile-public-columns > * {
  min-width: 0;
}
.toolbar > *, .row > *, .dlg-actions > * { max-width: 100%; }
input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="password"],
input[type="number"], input[type="file"], select, textarea {
  max-width: 100%;
}
.dialog {
  max-height: min(92dvh, 900px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.modal { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.toasts { padding-top: env(safe-area-inset-top); }

/* Tablets: conserva las nueve rutas sin comprimir el contenido principal. */
@media (min-width: 761px) and (max-width: 1050px) {
  :root { --side-w: 190px; }
  .sidebar { padding-inline: 10px; }
  .nav a { gap: 9px; padding-inline: 10px; font-size: 11px; }
  .topbar { padding-inline: 18px; }
  .view { padding-inline: 18px; }
  .hud { gap: 6px; }
  .chip { padding-inline: 10px; }
}

@media (max-width: 760px) {
  .app { min-height: 100dvh; }
  .main { min-height: 0; }
  .sidebar { padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
  .nav { gap: 2px; }
  .nav a { min-width: 0; min-height: 52px; flex: 1 1 0; white-space: nowrap; }
  .nav a .ico { width: auto; font-size: 17px; line-height: 1.1; }
  .nav a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: clamp(8px, 2.1vw, 10px); }
  .topbar { flex-wrap: wrap; align-items: flex-start; }
  .top-title { min-width: 0; }
  .hud { flex: 1 1 100%; justify-content: flex-start; }
  .chip { min-height: 34px; }
  .view { min-height: 0; overflow-x: hidden; overscroll-behavior-y: contain; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .panel { padding: 16px; }
  .toolbar input, .toolbar select { flex: 1 1 100%; width: 100%; }
  .dlg-actions { align-items: stretch; }
  .dlg-actions .btn { flex: 1 1 auto; }
  .dialog { width: 100%; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .cards, .shop-grid, .qgrid, .agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { gap: 9px; }
  .streak7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .hud { gap: 5px; }
  .chip { padding: 5px 8px; gap: 5px; }
  .chip b { font-size: 13px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid, .qgrid, .agrid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stats, .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlg-actions .btn { width: 100%; }
}

@media (hover: none) {
  .btn:hover, .nav a:hover, .card:hover, .tile:hover, .qcard:hover { transform: none; }
}

/* Resultados simultáneos de Roll ×5 / ×10; conserva la estética de las cartas originales. */
.roll-batch { width:100%; display:flex; flex-direction:column; align-items:center; gap:14px; }
.roll-batch-grid { width:100%; display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:14px; }
.roll-batch-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--panel-2); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.roll-batch-image { width:100%; aspect-ratio:3/4; overflow:hidden; background:var(--panel); }
.roll-batch-image img { width:100%; height:100%; object-fit:cover; display:block; }
.roll-batch-info { padding:10px; display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; }
.roll-batch-info b { font-size:14px; }
.roll-batch-info small { color:var(--muted); }
.roll-batch-info .btn { width:100%; }
.roll-batch-card.done { opacity:.72; }

/* Todas las tarjetas de resultados comparten exactamente la misma geometría. */
.roll-batch-grid {
  width:100%;
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  align-items:stretch;
  gap:14px;
}
.roll-batch-card {
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
}
.roll-batch-image { flex:0 0 auto; aspect-ratio:3/4; }
.roll-batch-info {
  flex:1 1 auto;
  min-height:142px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.roll-batch-info b {
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  min-height:2.4em;
  line-height:1.2;
}
.roll-batch-info small {
  display:block;
  min-height:1.2em;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.roll-batch-info .btn { margin-top:auto; }
@media (max-width: 900px) {
  .roll-batch-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .roll-batch-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .roll-batch-info { min-height:136px; }
}

/* Corrección robusta del reparto de tarjetas: evita que Roll ×5 apile cartas a ancho completo. */
.roll-batch > .roll-batch-grid {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  gap: 14px !important;
}
.roll-batch > .roll-batch-grid > .roll-batch-card {
  box-sizing: border-box !important;
  flex: 0 0 calc((100% - 56px) / 5) !important;
  width: calc((100% - 56px) / 5) !important;
  min-width: 0 !important;
  max-width: calc((100% - 56px) / 5) !important;
}
@media (max-width: 900px) {
  .roll-batch > .roll-batch-grid > .roll-batch-card {
    flex-basis: calc((100% - 28px) / 3) !important;
    width: calc((100% - 28px) / 3) !important;
    max-width: calc((100% - 28px) / 3) !important;
  }
}
@media (max-width: 560px) {
  .roll-batch > .roll-batch-grid { gap: 10px !important; }
  .roll-batch > .roll-batch-grid > .roll-batch-card {
    flex-basis: calc((100% - 10px) / 2) !important;
    width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
  }
}


/* ---------- Cartel de actualización (entra y sale con transición) ---------- */
.notice { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(18, 10, 27, 0); backdrop-filter: blur(0); transition: background .35s ease, backdrop-filter .35s ease; }
.notice.show { background: rgba(18, 10, 27, .82); backdrop-filter: blur(8px); }
.notice-card {
  width: min(460px, 100%); max-height: 88vh; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent), var(--panel); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 80px -30px var(--accent);
  opacity: 0; transform: translateY(28px) scale(.93); transition: opacity .35s ease, transform .4s cubic-bezier(.2, .9, .2, 1);
}
.notice.show .notice-card { opacity: 1; transform: none; }
.notice-head { padding: 24px 24px 12px; text-align: center; }
.notice-head small { color: var(--muted); letter-spacing: .3em; font-size: 11px; text-transform: uppercase; }
.notice-head h2 { margin: 6px 0 0; font: 800 22px var(--display); letter-spacing: .08em; }
.notice-body { padding: 4px 24px 8px; overflow: auto; }
.notice-body section { margin-top: 14px; }
.notice-body h3 { margin: 0 0 6px; font: 800 13px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2, var(--muted)); }
.notice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.notice-row:last-child { border-bottom: 0; }
.notice-foot { padding: 14px 24px 22px; display: flex; justify-content: center; }
.notice-text { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.notice-bonus { color: var(--gold); font: 800 15px var(--display); white-space: nowrap; }
.notice-reward { flex: none; max-width: 48%; color: var(--gold); font-weight: 700; text-align: right; }
@media (prefers-reduced-motion: reduce) { .notice, .notice-card { transition-duration: .01s; } }

/* ---------- Mensajes en directo del creador ---------- */
.live-msg {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; z-index: 1200;
  display: flex; align-items: center; gap: 12px; width: min(560px, calc(100vw - 24px));
  padding: 14px 16px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 0 28px color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translate(-50%, -140%); opacity: 0; transition: transform .4s cubic-bezier(.2, .9, .3, 1.1), opacity .4s;
}
.live-msg.show { transform: translate(-50%, 0); opacity: 1; }
.live-msg.event { border-color: var(--gold); }
.live-msg.warning { border-color: #FF8A8A; }
.live-ico { font-size: 24px; }
.live-msg div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.live-msg small { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.live-msg b { color: var(--text); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.live-x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 6px; }
.live-x:hover { color: var(--text); }

/* Formulario de funcionalidades: estilos encapsulados para evitar controles nativos blancos. */
.suggest-feature-form,
.suggest-feature-form .suggest-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 8px !important;
}
.suggest-feature-form label {
  display: block !important;
  position: static !important;
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.suggest-feature-form input,
.suggest-feature-form textarea {
  display: block !important;
  box-sizing: border-box !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  background: rgba(255, 255, 255, .05) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font: inherit !important;
}
.suggest-feature-form textarea {
  min-height: 150px !important;
  line-height: 1.5 !important;
  resize: vertical !important;
}
.suggest-feature-form .suggest-count {
  display: block;
  color: var(--muted);
  font-size: 12px;
}


/* ---------- Consola de administración: pestañas y anuncios ---------- */
.dialog.admin-console-dialog { width: min(560px, calc(100vw - 28px)); max-height: min(88vh, 820px); overflow-y: auto; padding: 24px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-tabs .btn { flex: 1 1 160px; }
.admin-tabs [aria-selected="true"] { color: #fff; }
.admin-tab-content { min-width: 0; }
.admin-field { box-sizing: border-box; }
.admin-announcement-meta { display: flex; justify-content: space-between; gap: 10px; margin: 0 2px 14px; }
.admin-security-note { margin: 14px 0 0; font-size: 12px; }


/* Admin Abuse global y panel de control */
.admin-abuse-global{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 22px 12px;padding:11px 14px;border:1px solid rgba(255,139,203,.38);border-radius:13px;background:linear-gradient(100deg,rgba(255,139,203,.13),rgba(182,107,255,.13));color:var(--text);font-size:.82rem}
.admin-abuse-global[hidden]{display:none}
.admin-abuse-global strong{font-variant-numeric:tabular-nums;color:#ffb4dd;margin-left:auto}
.admin-abuse-global b{letter-spacing:.04em;color:#ff9ed2}
.admin-abuse-live-dot{display:inline-block;width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#ff72b6;box-shadow:0 0 10px #ff72b6;vertical-align:middle;margin-right:5px}
.admin-abuse-current{padding:13px 15px;margin-bottom:16px;border:1px solid rgba(255,139,203,.25);border-radius:12px;background:rgba(255,139,203,.07)}
.admin-abuse-current p{margin:7px 0 0}
.admin-abuse-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.admin-abuse-anime-select{width:100%;min-height:150px;margin:8px 0 12px;padding:8px}
.admin-abuse-anime-select option{padding:5px}
.admin-abuse-actions{flex-wrap:wrap}
.admin-abuse-actions .danger{border-color:rgba(255,90,120,.35);color:#ff8b9e}
@media(max-width:600px){.admin-abuse-global{margin:0 12px 10px;font-size:.74rem;gap:7px}.admin-abuse-global strong{margin-left:0}.admin-abuse-grid{grid-template-columns:1fr}}

/* ============================================================
   KIRAMEKI MOBILE EXPERIENCE — navegación y layouts respirables
   Capa final para resolver la navegación móvil saturada sin alterar
   las vistas ni la lógica del juego.
   ============================================================ */
.mobile-more-toggle, .mobile-more-menu { display: none; }

@media (max-width: 760px) {
  .app {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .main { flex: 1 1 auto; width: 100%; min-width: 0; }
  .sidebar {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(22, 13, 32, .96);
    backdrop-filter: blur(20px);
    box-shadow: 0 -10px 30px rgba(0,0,0,.18);
  }
  .nav {
    flex: 1 1 80%;
    width: 80%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 3px;
    overflow: visible;
  }
  .nav a,
  .mobile-more-toggle {
    min-width: 0;
    min-height: 54px;
    padding: 6px 2px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font: 700 10px/1.1 var(--font);
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    position: relative;
  }
  .nav a:not([data-route="home"]):not([data-route="roll"]):not([data-route="harem"]):not([data-route="shop"]):not([data-route="profile"]) {
    display: none;
  }
  .nav a .ico, .mobile-more-toggle .ico {
    width: auto;
    font-size: 19px;
    line-height: 1;
  }
  .nav a > span:last-child, .mobile-more-toggle > span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
  }
  .nav a.active, .mobile-more-toggle.active {
    color: #fff;
    background: color-mix(in srgb, var(--accent) 17%, transparent);
  }
  .nav a.active::before, .mobile-more-toggle.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28%;
    right: 28%;
    width: auto;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: var(--accent-2);
    box-shadow: 0 0 12px var(--accent-2);
  }
  .mobile-more-toggle { flex: 0 0 20%; }
  .mobile-more-menu {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(100% + 10px);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    border-radius: 18px;
    background: rgba(30, 18, 43, .98);
    box-shadow: 0 18px 50px rgba(0,0,0,.48), 0 0 24px color-mix(in srgb, var(--accent) 12%, transparent);
    backdrop-filter: blur(22px);
    z-index: 40;
  }
  .mobile-more-menu[hidden] { display: none !important; }
  .mobile-more-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255,255,255,.035);
    font-size: 12px;
    font-weight: 700;
  }
  .mobile-more-menu a .ico { width: 22px; flex: 0 0 22px; text-align: center; font-size: 17px; }
  .mobile-more-menu a.active { color: #fff; border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 18%, transparent); }
  .mobile-more-menu a[data-badge]:not([data-badge="0"])::after {
    content: attr(data-badge);
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    background: var(--accent-2);
    color: #24132f;
    font-size: 10px;
    font-weight: 900;
  }
  .topbar {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  }
  .top-title { flex: 0 0 auto; max-width: 34%; font-size: clamp(14px, 4vw, 17px); letter-spacing: .08em; }
  .hud {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hud::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; min-height: 34px; padding: 5px 8px; gap: 5px; }
  .chip b { font-size: 13px; }
  .view {
    flex: 1 1 auto;
    min-height: 0;
    padding: 4px 14px 28px;
    overflow-y: auto;
    overflow-x: clip;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .view > * { min-width: 0; }
  .panel { padding: 16px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .toolbar { gap: 8px; }
  .toolbar > * { min-width: 0; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs > * { flex: 0 0 auto; }
  .modal { align-items: flex-end; padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
  .dialog { width: 100%; max-width: 100%; border-radius: 20px 20px 14px 14px; }
}

@media (max-width: 380px) {
  .topbar { padding-inline: 10px; gap: 7px; }
  .top-title { max-width: 30%; font-size: 13px; }
  .chip { padding-inline: 6px; }
  .chip b { font-size: 12px; }
  .view { padding-inline: 10px; }
  .mobile-more-menu { left: 8px; right: 8px; gap: 6px; padding: 10px; }
  .mobile-more-menu a { padding-inline: 9px; font-size: 11px; }
}

@media (min-width: 761px) {
  .mobile-more-toggle, .mobile-more-menu { display: none !important; }
}


/* ---------- PWA / Android system chrome integration ---------- */
:root { color-scheme: dark; }
html, body { background-color: #160D20; }
@media (max-width: 760px) {
  /* Keep the app's bottom navigation and the Android safe area visually continuous. */
  .sidebar {
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    background-color: #160D20;
  }
}
@media (display-mode: standalone) {
  html, body, .app { background-color: #160D20; }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
}
@media (display-mode: standalone) and (max-width: 760px) {
  .sidebar { padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  .view { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}


/* ---------- Aviso de actualización PWA ---------- */
.pwa-update-banner {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(540px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 42%, var(--line));
  border-radius: 18px;
  color: var(--text);
  background: rgba(30, 18, 43, .97);
  box-shadow: 0 18px 55px rgba(0,0,0,.48), 0 0 28px color-mix(in srgb, var(--accent) 18%, transparent);
  backdrop-filter: blur(22px);
  animation: pwa-update-enter .24s ease-out both;
}
.pwa-update-copy { display: flex; align-items: center; gap: 11px; flex: 1 1 auto; min-width: 0; }
.pwa-update-icon {
  flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; color: #fff; font-size: 21px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.pwa-update-copy strong { display: block; font-size: 13px; line-height: 1.3; }
.pwa-update-copy p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.pwa-update-button {
  flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px;
  color: #fff; font-size: 12px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 22%, transparent);
}
.pwa-update-button:disabled { opacity: .7; cursor: wait; }
.pwa-update-dismiss {
  flex: 0 0 26px; width: 26px; height: 30px; padding: 0; border: 0;
  color: var(--muted); background: transparent; font-size: 22px; line-height: 1;
}
@keyframes pwa-update-enter {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 600px) {
  .pwa-update-banner {
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    gap: 8px;
    padding: 11px;
    border-radius: 16px;
  }
  .pwa-update-copy { gap: 8px; }
  .pwa-update-icon { flex-basis: 32px; width: 32px; height: 32px; }
  .pwa-update-copy strong { font-size: 11px; }
  .pwa-update-copy p { font-size: 10px; }
  .pwa-update-button { min-height: 38px; padding-inline: 10px; font-size: 11px; }
}


/* ============================================================
   KIRAMEKI RADIO — reproductor persistente
   ============================================================ */

.radio-player {
  position: fixed;
  z-index: 50;
  left: calc(var(--side-w) + 18px);
  right: 18px;
  bottom: 14px;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(100px, 180px);
  align-items: center;
  gap: 18px;
  padding: 11px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 17px;
  background: rgba(30, 18, 43, .96);
  box-shadow: 0 12px 40px rgba(0,0,0,.4),
              0 0 25px color-mix(in srgb, var(--accent) 12%, transparent);
  backdrop-filter: blur(20px);
}

.radio-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.radio-cover {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-size: 23px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent);
}

.radio-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.radio-info b,
.radio-info small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.radio-info b { font-size: 13px; }
.radio-info small { color: var(--muted); font-size: 11px; }

.radio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.radio-controls button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.radio-controls button:hover:not(:disabled) {
  background: rgba(255,255,255,.1);
}

.radio-controls .radio-play {
  width: 42px;
  height: 42px;
  color: white;
  font-size: 16px;
  background: var(--grad);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 30%, transparent);
}

.radio-controls button:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.radio-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
}

.radio-volume input {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent-2);
  cursor: pointer;
}

@media (max-width: 760px) {
  .radio-player {
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    min-height: 66px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 12px;
  }

  .radio-cover {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .radio-controls { gap: 5px; }
  .radio-controls button { width: 30px; height: 34px; }
  .radio-controls .radio-play { width: 38px; height: 38px; }

  .radio-volume { display: none; }
}

@media (max-width: 380px) {
  .radio-player { left: 7px; right: 7px; }
  .radio-info b { font-size: 11px; }
  .radio-info small { font-size: 10px; }
}

/* Espacio reservado para KIRAMEKI RADIO */
.view {
  padding-bottom: 110px !important;
}

@media (max-width: 760px) {
  .view {
    padding-bottom: 160px !important;
  }
}

/* ── KIRAMEKI MUSIC MODAL ── */

.dlg-music {
  max-width: 760px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 24px;
  align-items: center;
}

.music-modal-cover {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(182, 107, 255, .10);
  box-shadow: 0 0 30px rgba(182, 107, 255, .15);
}

.music-modal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dlg-music .body {
  min-width: 0;
}

.dlg-music h2 {
  overflow-wrap: anywhere;
  margin: 10px 0 4px;
}

.dlg-music .dlg-actions {
  margin-top: 20px;
}

.dlg-music .btn.primary {
  width: 100%;
}

@media (max-width: 600px) {
  .dlg-music {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .music-modal-cover {
    width: min(100%, 220px);
    margin: 0 auto;
  }
}

/* Borde reforzado de la ficha musical */

.dlg-music {
  max-width: 760px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 24px;
  align-items: center;

  padding: 28px;
  box-sizing: border-box;
  border: 2px solid rgba(190, 100, 255, .65);

  box-shadow:
    0 0 0 1px rgba(255, 90, 210, .12),
    0 0 25px rgba(180, 80, 255, .2),
    0 20px 60px rgba(0, 0, 0, .45);
}

.music-modal-cover {
  border: 2px solid rgba(210, 130, 255, .45);
  box-shadow:
    0 0 15px rgba(190, 100, 255, .2),
    inset 0 0 12px rgba(0, 0, 0, .2);
}

.dlg-music .facts > div {
  border: 1px solid rgba(190, 120, 255, .2);
}

/* === Tienda visual · nuevas paletas que cambian TODA la interfaz === */
:root { --cosmetic-top: #160D20; }
:is(body, .theme-swatch)[data-theme="crimson"], .theme-swatch[data-preview-theme="crimson"] {
  --bg:#130c12; --panel:#23151e; --panel-2:#33202a; --line:rgba(255,164,169,.17);
  --text:#fff0f0; --muted:#caa2ac; --accent:#f04459; --accent-2:#ff9f8a; --pink:#ed4169; --gold:#ffc489;
}
:is(body, .theme-swatch)[data-theme="sakura"], .theme-swatch[data-preview-theme="sakura"] {
  --bg:#21121f; --panel:#342035; --panel-2:#482b45; --line:rgba(255,192,220,.17);
  --text:#fff1f6; --muted:#dfb9d0; --accent:#f28fc1; --accent-2:#ffc3d3; --pink:#ee78a5; --gold:#ffe5ac;
}
:is(body, .theme-swatch)[data-theme="eclipse"], .theme-swatch[data-preview-theme="eclipse"] {
  --bg:#101014; --panel:#1d1d23; --panel-2:#29292e; --line:rgba(222,194,143,.19);
  --text:#f8f1e9; --muted:#bcb5a9; --accent:#c2a16b; --accent-2:#efce92; --pink:#9b805d; --gold:#efce92;
}
:is(body, .theme-swatch)[data-theme="aurora"], .theme-swatch[data-preview-theme="aurora"] {
  --bg:#0c1724; --panel:#142637; --panel-2:#203649; --line:rgba(132,246,205,.16);
  --text:#effff9; --muted:#a3c6c9; --accent:#53d2ad; --accent-2:#89e6f0; --pink:#a188f3; --gold:#ffdfa5;
}
:is(body, .theme-swatch)[data-theme="ocean"], .theme-swatch[data-preview-theme="ocean"] {
  --bg:#0a1223; --panel:#14233b; --panel-2:#1d3552; --line:rgba(145,220,255,.16);
  --text:#eff7ff; --muted:#a6bdd9; --accent:#4da9ff; --accent-2:#69e8ff; --pink:#518ef8; --gold:#f8d694;
}
:is(body, .theme-swatch)[data-theme="royal"], .theme-swatch[data-preview-theme="royal"] {
  --bg:#111329; --panel:#1e2340; --panel-2:#2d3554; --line:rgba(242,204,131,.16);
  --text:#fff9eb; --muted:#bec5d5; --accent:#e3b76c; --accent-2:#ffe0a0; --pink:#b98959; --gold:#ffe0a0;
}

/* Los marcos afectan tanto al avatar pequeño como al del perfil. */
.avatar.frame-prism, .profile-avatar.frame-prism { box-shadow:0 0 0 3px var(--bg),0 0 0 6px #7de9fa,0 0 0 9px #da88ff,0 0 26px #a986f0a6; }
.avatar.frame-void, .profile-avatar.frame-void { box-shadow:0 0 0 3px #090811,0 0 0 7px #6a45cc,0 0 35px #a55af9aa,inset 0 0 18px #4b298f; }
.avatar.frame-sakura, .profile-avatar.frame-sakura { box-shadow:0 0 0 3px var(--bg),0 0 0 7px #f5a7cc,0 0 24px #f6a2d9b0; }
.avatar.frame-royal, .profile-avatar.frame-royal { box-shadow:0 0 0 3px #1b294d,0 0 0 6px #efc879,0 0 0 8px #34549e,0 0 24px #efc8799e; }

.cosmetic-item { border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); gap: 9px; }
.cosmetic-item .foot { gap:10px; flex-wrap:wrap; }
.cosmetic-item .cosmetic-try { align-self:stretch; border:1px solid var(--line); }
.theme-swatch { height:112px; border-radius:13px; overflow:hidden; position:relative; background:var(--bg); border:1px solid var(--line); display:grid; grid-template-columns:28px 1fr; grid-template-rows:24px 1fr 20px; padding:10px; gap:7px; }
.theme-swatch .swatch-bar { grid-row:1/4; border-radius:7px; background:var(--panel); border:1px solid var(--line); }
.theme-swatch .swatch-title { border-radius:7px; background:var(--panel-2); }
.theme-swatch .swatch-chip { grid-column:2; grid-row:2; width:75%; border-radius:7px; background:linear-gradient(110deg,var(--accent),var(--pink)); opacity:.85; }
.theme-swatch .swatch-tiles { grid-column:2; grid-row:3; display:flex; gap:7px; }
.theme-swatch .swatch-tiles i { flex:1; border-radius:5px; border:1px solid var(--accent); background:var(--panel-2); }
.frame-swatch,.title-swatch { height:112px; display:grid; place-items:center; border-radius:13px; background:radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--accent) 25%,transparent),transparent 70%),var(--bg); border:1px solid var(--line); }
.frame-swatch .avatar { height:58px; width:58px; border-radius:17px; font-size:25px; }
.title-swatch { gap:5px; color:var(--accent-2); font-weight:800; letter-spacing:.08em; }
.title-swatch span { display:block; text-align:center; font-size:12px; }
.cosmetic-dialog { width:min(680px,100%); padding:26px; }
.cosmetic-dialog-head h2 { font:850 27px var(--display); margin:4px 0 5px; }
.cosmetic-dialog-head p { font-size:13px; margin:0 0 18px; color:var(--muted); }
.cosmetic-screen { display:grid; grid-template-columns:65px 1fr; gap:12px; min-height:252px; padding:12px; background:var(--bg); border:1px solid var(--line); border-radius:18px; }
.cosmetic-screen-sidebar { display:flex; flex-direction:column; align-items:center; gap:13px; border-radius:12px; background:var(--panel); padding:13px 8px; }
.cosmetic-screen-sidebar b { color:var(--accent); font-size:23px; }
.cosmetic-screen-sidebar i { width:24px; height:6px; border-radius:6px; background:var(--accent-2); opacity:.55; }
.cosmetic-screen-main { min-width:0; display:flex; flex-direction:column; gap:12px; }
.cosmetic-screen-head { display:flex; justify-content:space-between; gap:8px; border-radius:10px; color:var(--text); background:var(--panel); padding:13px; font-size:12px; }
.cosmetic-screen-head span { color:var(--gold); }
.cosmetic-screen-hero { display:flex; flex-direction:column; gap:8px; justify-content:center; flex:1; border-radius:11px; padding:16px; background:radial-gradient(circle at 85% 25%,color-mix(in srgb,var(--accent) 35%,transparent),transparent 65%),var(--panel-2); }
.cosmetic-screen-hero small { color:var(--accent-2); letter-spacing:.1em; font-size:9px; font-weight:800; }
.cosmetic-screen-hero b { color:var(--text); font:800 21px var(--display); }
.cosmetic-screen-hero em { align-self:flex-start; background:var(--grad); border-radius:8px; font-style:normal; font-size:10px; padding:6px 12px; color:#fff; }
.cosmetic-screen-tiles { display:flex; gap:8px; }
.cosmetic-screen-tiles span { flex:1; height:25px; border:1px solid var(--line); border-radius:8px; background:var(--panel-2); }
.cosmetic-avatar-stage { min-height:230px; border-radius:16px; background:radial-gradient(circle,color-mix(in srgb,var(--accent) 20%,transparent),transparent 65%),var(--panel-2); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:15px; }
.cosmetic-avatar-stage .profile-avatar { width:84px; height:84px; font-size:34px; }
.cosmetic-avatar-stage strong { font-size:19px; }
.cosmetic-dialog-footer { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-top:18px; }
.cosmetic-dialog-footer>span { color:var(--gold); font-size:16px; font-weight:800; }
.cosmetic-dialog-footer .dlg-actions { margin:0; }
.cosmetic-preview-tip { font-size:11px; color:var(--muted); margin-bottom:0; }
.bulk-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:14px; }
.bulk-toolbar>div { display:grid; gap:3px; }
.bulk-toolbar span { color:var(--muted); font-size:12px; }
.bulk-dialog { max-width:600px; padding:28px; }
.bulk-dialog h2 { font:850 26px var(--display); margin:0 0 12px; }
.bulk-dialog p { color:var(--muted); font-size:13px; }
.bulk-dialog p strong { color:var(--text); }
.bulk-amount { display:flex; align-items:center; justify-content:space-between; border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line)); padding:16px; border-radius:14px; background:color-mix(in srgb,var(--gold) 8%,var(--panel)); }
.bulk-amount small { color:var(--muted); }
.bulk-amount b { font-size:22px; color:var(--gold); }
.bulk-list { display:grid; gap:8px; max-height:170px; overflow:auto; margin:14px 0; }
.bulk-list>div { display:flex; justify-content:space-between; gap:10px; font-size:12px; border-bottom:1px solid var(--line); padding:6px 0; }
.bulk-list b { color:var(--gold); white-space:nowrap; }
@media(max-width:520px) { .cosmetic-dialog,.bulk-dialog {padding:18px;} .cosmetic-screen{grid-template-columns:45px 1fr;min-height:210px;} .cosmetic-screen-hero b{font-size:16px;} .bulk-dialog .dlg-actions{flex-direction:column;} }

/* ---------- Ajustes ---------- */
.settings-dialog .section-title { margin: 0 0 14px; padding-right: 40px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-text b { display: block; font-size: 14px; }
.setting-text small { color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, .14); position: relative; cursor: pointer; transition: background .2s; border: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.setting-preview { padding: 12px 0 0; }
.setting-preview-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Tienda: rolls a medida · Harem: cargar más ---------- */
.harem-more { display: flex; justify-content: center; padding: 18px 0 8px; }
.item-wide { grid-column: 1 / -1; }
.roll-shop { flex-direction: row; align-items: stretch; gap: 22px; flex-wrap: wrap; padding: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent) 60%, transparent), var(--panel);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 0 40px -18px var(--accent); }
.roll-shop-info { display: flex; gap: 16px; align-items: center; flex: 1 1 260px; min-width: 0; }
.roll-shop-info .ii { flex: none; width: 64px; height: 64px; font-size: 30px; box-shadow: 0 0 26px -6px var(--accent); }
.roll-shop-info h4 { font-size: 20px; margin: 0 0 4px; }
.roll-shop-info p { flex: none; font-size: 13.5px; }
.roll-shop-buy { flex: 1.4 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.roll-qty-field { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.roll-qty-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.roll-qty-label, .roll-qty-unit { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.roll-shop .roll-qty { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: 8px 0; text-align: right; font: 800 28px var(--display); font-variant-numeric: tabular-nums; }
.roll-shop .roll-qty:focus { outline: none; box-shadow: none; }
.qty-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.qty-chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.qty-chip:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 28%, transparent); border-color: var(--accent); transform: translateY(-1px); }
.qty-chip.max { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.qty-chip:disabled { opacity: .4; cursor: not-allowed; }
.roll-quote { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.roll-quote > div { display: grid; gap: 2px; min-width: 0; }
.roll-total { font: 800 24px var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.roll-total.off { color: var(--muted); }
.roll-quote .btn { min-width: 130px; }
@media (max-width: 520px) { .roll-shop { padding: 16px; gap: 16px; } .roll-quote .btn { width: 100%; } .roll-shop .roll-qty { font-size: 24px; } }
