:root {
  --bg: linear-gradient(180deg, #232428 0%, #2b2d32 100%);
  --panel: #1f2024;
  --text: #f4f7f5;
  --accent: #f5d67a;
  --danger: #e24242;
  --warning: #21f36c;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#app { max-width: 900px; margin: 0 auto; padding: 16px; }
.title { font-size: 24px; font-weight: 700; margin: 8px 0 16px; text-align: center; text-shadow: 0 2px 8px rgba(245,214,122,0.25); }
.title .ampersand { font-size: 2em; display: inline-block; line-height: 1; }
.panel { background: var(--panel); border-radius: 14px; padding: 12px; margin-bottom: 12px; border: 1px solid #1e3526; box-shadow: 0 6px 20px rgba(0,0,0,0.35), inset 0 0 12px rgba(33, 243, 108, 0.05); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.btn { appearance: none; border: 1px solid #33384a; padding: 12px 14px; border-radius: 12px; background: #2a2e3a; color: var(--text); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; }
.btn.wide { width: 100%; }
.btn.left { justify-content: flex-start; }
.btn:disabled { opacity: 0.5; filter: grayscale(0.3); pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, #ffe08a 0%, #f5d67a 100%); color: #0b1b14; box-shadow: 0 6px 18px rgba(245,214,122,0.35); }
.btn.danger { background: var(--danger); }
.btn.warning { background: var(--warning); color: #0b1b14; }
.row { display: flex; gap: 8px; align-items: center; }
.title-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.hero { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.card { background: #1c1f29; border-radius: 12px; padding: 10px; }
.levelup-card { display: flex; flex-direction: column; gap: 8px; }
.levelup-primary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.levelup-card .item-title { margin-bottom: 4px; }
.card.active { border: 2px solid var(--accent); box-shadow: 0 0 12px rgba(93, 212, 165, 0.25); }
.bar { height: 10px; background: #1f2024; border-radius: 8px; overflow: hidden; border: 1px solid #33384a; }
.bar.quiz { background: #2a2e3a; border-color: #33384a; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.bar.hp > span { background: var(--danger); }
.bar.resource > span { background: var(--warning); }
.bar.hp.glow { box-shadow: 0 0 18px rgba(227,91,91,0.55), inset 0 0 12px rgba(227,91,91,0.45); animation: hpPulse 1.1s ease-in-out infinite; outline: 2px solid rgba(227,91,91,0.35); }
@keyframes hpPulse { 0% { box-shadow: 0 0 10px rgba(227,91,91,0.4), inset 0 0 6px rgba(227,91,91,0.35); } 50% { box-shadow: 0 0 22px rgba(227,91,91,0.7), inset 0 0 12px rgba(227,91,91,0.55); } 100% { box-shadow: 0 0 10px rgba(227,91,91,0.4), inset 0 0 6px rgba(227,91,91,0.35); } }
.list { display: flex; flex-wrap: wrap; gap: 8px; }
.loot-list { display: flex; flex-direction: column; gap: 10px; }
.loot-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.loot-info { flex: 1 1 auto; }
.item-title { font-weight: 700; margin-bottom: 4px; }
.item-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item-stat { color: #aab0c0; font-weight: 600; }
.loot-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.loot-actions .select { min-width: 120px; }
.list .item { background: #203728; padding: 8px 10px; border-radius: 10px; border: 1px solid #274a37; }
.log { height: 200px; overflow-y: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #0a1711; border-radius: 12px; padding: 10px; -webkit-overflow-scrolling: touch; margin-bottom: 12px; border: 1px solid #1e3526; }
.turn-order { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: center; }
.turn-order .chip { background: #203728; padding: 6px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #274a37; }
.turn-order .chip.active { background: var(--accent); color: #0b1b14; font-weight: 700; box-shadow: 0 0 8px rgba(93, 212, 165, 0.35); }
.turn-order .chip.dead { opacity: 0.45; filter: grayscale(0.3); cursor: default; }
.turn-order .chip.side-player { border: 1px solid #33384a; }
.turn-order .chip.side-boss { border: 1px solid var(--danger); }
.turn-order .chip .icon { font-size: 18px; line-height: 1; }
.turn-order .chip .label { font-weight: 600; }
.footer { display: flex; gap: 8px; position: static; padding-top: 8px; flex-wrap: wrap; }
.select { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #274a37; background: #0f1e16; color: var(--text); }
.section-title { font-size: 18px; font-weight: 700; margin: 8px 0; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: linear-gradient(135deg, #0f1116, #121318); max-width: 720px; width: calc(100% - 32px); border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); }
.modal-title { font-size: 24px; font-weight: 800; color: #fff; margin: 0 0 8px 0; background: linear-gradient(90deg, #FFD76A, #FFF59D); -webkit-background-clip: text; background-clip: text; color: transparent; }
.modal-desc { color: #fff; font-size: 14px; margin-bottom: 16px; line-height: 1.4; }
.quiz-meta { display: flex; justify-content: space-between; font-size: 12px; color: #aab0c0; margin-bottom: 6px; }
.level-banner { text-align: center; padding: 8px 0 12px; }
.level-text { font-weight: 900; font-size: 56px; letter-spacing: 0.08em; background: linear-gradient(135deg, #ffd76a 0%, #ffe082 50%, #ffcd3c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(245,214,122,0.8)) drop-shadow(0 0 40px rgba(245,214,122,0.4)); animation: shimmer 2s linear infinite; }
.boss-label { margin-top: 6px; font-weight: 800; font-size: 14px; letter-spacing: 0.08em; color: #aab0c0; }
@keyframes shimmer { 0% { filter: drop-shadow(0 0 20px rgba(245,214,122,0.8)) drop-shadow(0 0 40px rgba(245,214,122,0.4)) brightness(1); } 50% { filter: drop-shadow(0 0 30px rgba(245,214,122,1)) drop-shadow(0 0 60px rgba(245,214,122,0.6)) brightness(1.2); } 100% { filter: drop-shadow(0 0 20px rgba(245,214,122,0.8)) drop-shadow(0 0 40px rgba(245,214,122,0.4)) brightness(1); } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #1e2430; color: #fff; font-weight: 600; font-size: 12px; text-align: center; box-shadow: inset 0 1px 2px rgba(255,255,255,0.1); }
.badge.str { background: linear-gradient(135deg, #dc2626, #ef4444); }
.badge.dex { background: linear-gradient(135deg, #059669, #10b981); }
.badge.int { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.badge.wis { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.badge.ac { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #111; }
.badge.hp { background: linear-gradient(135deg, #dc2626, #f87171); }
.badge.resource { background: linear-gradient(135deg, #21f36c, #4ade80); color: #0b1b14; }
.badge.primary { background: var(--accent); color: #0b1b14; }
.ability { padding: 10px 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; margin: 6px 0; background: #232a36; color: #fff; font-size: 13px; line-height: 1.4; box-shadow: inset 0 1px 2px rgba(255,255,255,0.05); }
.ability-attack { background: linear-gradient(135deg, #7f1d1d, #dc2626); border-color: rgba(220, 38, 38, 0.3); }
.ability-buff { background: linear-gradient(135deg, #064e3b, #059669); border-color: rgba(5, 150, 105, 0.3); }
.ability-utility { background: linear-gradient(135deg, #1e3a8a, #3b82f6); border-color: rgba(59, 130, 246, 0.3); }
.ability-heal { background: linear-gradient(135deg, #065f46, #10b981); border-color: rgba(16, 185, 129, 0.3); }
.modal-close-btn { background: linear-gradient(135deg, #FFD76A, #FFE082); color: #111; font-weight: 700; padding: 10px 16px; border-radius: 999px; border: none; margin-top: 16px; cursor: pointer; box-shadow: 0 4px 12px rgba(255, 215, 106, 0.3); transition: all 0.2s ease; }
.modal-close-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 215, 106, 0.4); }
.modal-close-btn:active { transform: translateY(0); }
.levelup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.levelup-actions .btn { flex: 1 1 48%; }

@media (min-width: 780px) {
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .grid-players { grid-template-columns: repeat(2, 1fr); }
  .boss-art { height: 200px; }
}
@media (min-width: 480px) {
  .boss-art { height: 160px; }
}
.grid-players { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.card.boss { padding: 16px; }
.boss-name { font-weight: 800; font-size: 18px; }
.boss-type { color: #aab0c0; font-weight: 600; }
.level-num { font-weight: 800; }

.bar.hp.boss.damaged > span {
  background: linear-gradient(90deg, #ff6f6f 0%, #b32121 50%, #7b0f0f 100%);
  background-size: 200% 100%;
  animation: bossDamageGradient 1.2s ease-in-out infinite;
}
@keyframes bossDamageGradient { 0% { background-position: 0% 0; } 50% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
.boss-name { font-weight: 800; font-size: 18px; }
.boss-type { color: #aab0c0; font-weight: 600; }
.boss-art { height: 120px; background: radial-gradient(60% 60% at 50% 40%, #1c3224 0%, #0f1e16 100%); border-radius: 8px; margin-bottom: 10px; background-position: center; background-repeat: no-repeat; position: relative; overflow: hidden; }
.boss-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn .icon { margin-right: 6px; }
.log .entry, .arena-log .entry { line-height: 1.35; }
.log .actor, .arena-log .actor { color: var(--accent); font-weight: 700; }
.log .target, .arena-log .target { color: #9ec3ff; font-weight: 700; }
.log .keyword, .arena-log .keyword { color: #aab0c0; }
.log .num, .arena-log .num { color: #f5d67a; font-weight: 700; }
.log .hit, .arena-log .hit { color: #5dd4a5; font-weight: 800; }
.log .miss, .arena-log .miss { color: #e35b5b; font-weight: 800; }
.log .damage, .arena-log .damage { color: #ff8b7a; font-weight: 800; }
.log .heal, .arena-log .heal { color: #6fe7a9; font-weight: 800; }
.log .bonus, .arena-log .bonus { color: #c29cff; font-weight: 800; }
.log .ability, .arena-log .ability { color: #aab0c0; font-weight: 700; }
.log .crit, .arena-log .crit { color: #f5d67a; font-weight: 900; text-shadow: 0 0 8px rgba(245,214,122,0.45); }

@media (max-width: 420px) {
  .turn-order { gap: 4px; }
  .turn-order .chip { padding: 6px; min-width: 36px; justify-content: center; }
  .turn-order .chip .label { display: none; }
  .title-actions .btn { flex: 1 1 calc(50% - 12px); }
  .loot-row { flex-direction: column; align-items: stretch; }
  .loot-actions { justify-content: space-between; }
  .grid { grid-template-columns: 1fr; }
  .levelup-primary { grid-template-columns: 1fr; }
  .levelup-actions .btn { flex: 1 1 100%; }
  .level-text { font-size: 32px; letter-spacing: 0.06em; }
  .boss-label { font-size: 12px; }
}
.fight-container { max-width: 393px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.boss-box { padding: 10px; }
.boss-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.boss-level { color: #e24242; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.boss-hp { display: flex; flex-direction: column; gap: 4px; }
.boss-hp-meta { display: flex; justify-content: space-between; font-size: 10px; color: #e35b5b; font-weight: 700; }
.ac-box { background: rgba(10,23,17,0.6); border: 1px solid #f5d67a66; border-radius: 8px; padding: 6px 8px; text-align: right; }
.ac-label { color: #f5d67a; font-size: 9px; font-weight: 700; }
.ac-val { color: #fff; font-size: 18px; font-weight: 800; }
.arena-center { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; position: relative; min-height: 136px; }
.arena-log { width: 100%; background: rgba(10,23,17,0.6); border: 1px solid #1e3526; border-radius: 10px; padding: 8px; max-height: 120px; overflow-y: auto; }
.damage-flash { animation: redPulse var(--flash-speed, 2s) ease-in-out infinite; box-shadow: 0 0 14px rgba(226,66,66,0.55); outline: 2px solid rgba(226,66,66,0.5); }
@keyframes redPulse { 0% { box-shadow: 0 0 6px rgba(226,66,66,0.35); } 50% { box-shadow: 0 0 18px rgba(226,66,66,0.75); } 100% { box-shadow: 0 0 6px rgba(226,66,66,0.35); } }
.arena-log .entry { font-size: 11px; }
.dice-overlay { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #b45309, #f59e0b); color: #0b1b14; font-weight: 800; border: 2px solid rgba(255,255,255,0.25); box-shadow: 0 8px 20px rgba(245,214,122,0.25); animation: diceSpin 1.2s ease-in-out; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none; }
.
.dice-overlay.crit { background: linear-gradient(135deg, #f59e0b, #ffd166); box-shadow: 0 0 18px rgba(245,214,122,0.55), 0 8px 24px rgba(245,214,122,0.45); }
@keyframes diceSpin { 0% { transform: rotate(0deg) scale(0.8); } 50% { transform: rotate(180deg) scale(1.05); } 100% { transform: rotate(360deg) scale(1); } }
.party-carousel { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.party-vertical { display: flex; flex-direction: column; gap: 8px; }
.party-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.party-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.char-card { min-width: 130px; max-width: 130px; background: linear-gradient(135deg, #243447, #1a2538); border: 2px solid #3a4a63; border-radius: 10px; padding: 8px; scroll-snap-align: start; }
.char-card.fullwidth { min-width: 100%; max-width: 100%; }
.char-card.compact { min-width: auto; max-width: none; }
.char-card.micro { min-width: auto; max-width: none; padding: 6px; }
.char-badges.micro { grid-template-columns: repeat(2, 1fr); }
.char-stats.micro .stat-label { font-size: 8px; }
.char-stats.micro .stat-val { font-size: 10px; }
.char-card.compact .equip-block, .char-card.compact .status-row { display: none; }
.char-card.compact .char-title { font-size: 12px; }
.char-card.compact .char-level { font-size: 10px; }
.char-card.compact .stat-label { font-size: 9px; }
.char-card.compact .stat-val { font-size: 11px; }
.char-card.compact .stat-badge .badge-label { font-size: 8px; }
.char-card.compact .stat-badge .badge-val { font-size: 12px; }
.char-card.active { box-shadow: 0 0 18px rgba(245,214,122,0.35); border-color: #f5d67a; transform: scale(1.02); }
.char-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; border-bottom: 1px solid #274a37; margin-bottom: 6px; }
.char-title { color: #fff; font-weight: 800; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-level { color: #aab0c0; font-size: 10px; }
.char-stats { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.stat-row { display: flex; justify-content: space-between; }
.stat-label { font-size: 9px; font-weight: 700; }
.stat-label.hp { color: #e35b5b; }
.stat-label.res { color: #21f36c; }
.stat-val { color: #fff; font-size: 10px; font-weight: 800; }
.char-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 6px; }
.stat-badge { background: rgba(10,23,17,0.6); border: 1px solid #274a37; border-radius: 6px; padding: 6px; }
.stat-badge .badge-label { font-size: 8px; font-weight: 700; }
.stat-badge .badge-val { font-size: 12px; font-weight: 800; color: #fff; }
.stat-badge.ac .badge-label { color: #f5d67a; }
.stat-badge.init .badge-label { color: #60a5fa; }
.equip-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.equip-line { color: #d1d5db; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-row { display: flex; flex-wrap: wrap; gap: 4px; }
.status-badge { font-size: 8px; padding: 4px 6px; border-radius: 999px; background: #7c3aed33; color: #e9d5ff; border: 1px solid #8b5cf630; }
.action-dock { display: flex; flex-direction: column; gap: 8px; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip-btn { border: 2px solid rgba(255,255,255,0.2); background: linear-gradient(135deg, #b45309, #f59e0b); color: #0b1b14; box-shadow: 0 8px 20px rgba(245,214,122,0.25); }
.utility-dock { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sheet-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sheet-portrait { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: #203728; border: 2px solid #274a37; }
.sheet-title { font-weight: 800; }
.home { max-width: 393px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.home-header { padding: 24px 16px 12px; text-align: center; }
.home-logo { display: inline-block; padding: 12px; border-radius: 16px; border: 2px solid #3aaa6c55; background: linear-gradient(135deg, #1c4d32, #0f2a1e); box-shadow: 0 10px 30px rgba(58,170,108,0.25); }
.home-title { font-size: 32px; font-weight: 800; background: linear-gradient(90deg, #a7f3d0, #6ee7b7, #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 8px; }
.home-sub { color: #aab0c0; font-size: 12px; font-weight: 700; }
.home-menu { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.home-card { width: 100%; border: 2px solid rgba(255,255,255,0.2); border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.home-card .icon { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); padding: 8px; border-radius: 10px; }
.home-card .title { font-size: 16px; font-weight: 800; margin: 0; text-align: left; }
.home-card .desc { font-size: 12px; color: rgba(255,255,255,0.7); }
.home-card .arrow { margin-left: auto; font-size: 20px; color: rgba(255,255,255,0.6); }
.home-card.emerald { background: linear-gradient(135deg, #065f46, #0f766e); }
.home-card.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.home-card.purple { background: linear-gradient(135deg, #7e22ce, #db2777); }
.home-card.slate { background: linear-gradient(135deg, #334155, #1f2937); }
.home-footer { padding: 0 16px 16px; }
.home-info { background: rgba(10,23,17,0.6); border: 1px solid #1e3526; border-radius: 12px; padding: 10px; display: flex; justify-content: space-between; align-items: center; }
.class-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px 12px; }
.party-container { max-width: 393px; margin: 0 auto; min-height: 70vh; display: flex; flex-direction: column; }
.class-list { flex: 1; overflow-y: auto; padding: 0 16px calc(200px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.start-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(10,23,17,0.95); backdrop-filter: blur(4px); border-top: 1px solid #1e3526; box-shadow: 0 -6px 20px rgba(0,0,0,0.35); z-index: 50; }
.start-bar .panel { margin: 0; background: transparent; border: none; box-shadow: none; }
.start-bar .btn { width: 100%; }
.class-card { width: 100%; border: 2px solid rgba(255,255,255,0.2); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 10px; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.3); overflow: hidden; }
.class-card .icon { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); padding: 8px; border-radius: 10px; font-size: 18px; }
.class-card .name { font-size: 15px; font-weight: 800; margin: 0; }
.class-card .desc { font-size: 11px; color: rgba(255,255,255,0.75); }
.class-card .arrow { margin-left: auto; font-size: 20px; color: rgba(255,255,255,0.6); }
.class-card.emerald { background: linear-gradient(135deg, #065f46, #0f766e); }
.class-card.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.class-card.purple { background: linear-gradient(135deg, #7e22ce, #db2777); }
.class-card.slate { background: linear-gradient(135deg, #334155, #1f2937); }
.class-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: center; margin-top: 0; margin-left: auto; width: 220px; }
.class-actions .btn { width: 100%; min-height: 34px; padding: 8px 10px; border-radius: 10px; font-size: 12px; }
.class-card .icon { font-size: 16px; }
.chosen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.chosen-card { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 8px 10px; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 6px 16px rgba(0,0,0,0.25); color: #fff; }
.chosen-card .icon { font-size: 16px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); padding: 6px; border-radius: 8px; }
.chosen-card .name { font-weight: 800; font-size: 13px; }
.chosen-card .meta { font-size: 11px; color: rgba(255,255,255,0.8); }
.chosen-card.emerald { background: linear-gradient(135deg, #065f46, #0f766e); }
.chosen-card.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.chosen-card.purple { background: linear-gradient(135deg, #7e22ce, #db2777); }
.chosen-card.slate { background: linear-gradient(135deg, #334155, #1f2937); }
.codex-container { max-width: 393px; margin: 0 auto; padding: 0 16px 16px; }
.codex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.codex-card { border-radius: 12px; padding: 10px; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 6px 16px rgba(0,0,0,0.25); color: #fff; }
.codex-card.emerald { background: linear-gradient(135deg, #065f46, #0f766e); }
.codex-card.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.codex-card.purple { background: linear-gradient(135deg, #7e22ce, #db2777); }
.codex-card.slate { background: linear-gradient(135deg, #334155, #1f2937); }
.codex-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.codex-card .name { font-weight: 800; font-size: 14px; }
.codex-card .level { font-size: 11px; color: rgba(255,255,255,0.85); font-weight: 700; }
.codex-card .stat-row { display: flex; justify-content: space-between; font-size: 11px; }
.codex-card .badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; }
.codex-card .badge-box { background: rgba(10,23,17,0.6); border: 1px solid #274a37; border-radius: 8px; padding: 6px; }
.codex-card .badge-box .label { font-size: 9px; font-weight: 700; color: #f5d67a; }
.codex-card .badge-box .val { font-size: 12px; font-weight: 800; color: #fff; }
.nav-back-btn { position: fixed; top: 12px; left: 12px; bottom: auto; right: auto; width: 36px; height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,0.2); background: linear-gradient(135deg, #065f46, #0f766e); color: #fff; font-weight: 800; box-shadow: 0 8px 20px rgba(0,0,0,0.3); z-index: 60; }
.nav-back-btn:active { transform: scale(0.98); }
.sub { color: #aab0c0; font-size: 14px; font-weight: 700; text-align: center; margin: 4px 0 8px; }
.landing-section { margin: 10px 0; }
.copy { color: rgba(255,255,255,0.8); font-size: 13px; line-height: 1.4; }

.glow-panel { border: 1px solid rgba(245,214,122,0.35); box-shadow: 0 8px 24px rgba(0,0,0,0.45), inset 0 0 12px rgba(93,212,165,0.08); }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; margin-right: 8px; background: linear-gradient(135deg, #FFD76A, #FFE082); color: #111; font-weight: 800; border: 2px solid rgba(255,255,255,0.25); box-shadow: 0 4px 12px rgba(255,215,106,0.35); }
.vegas-banner { display: flex; align-items: center; justify-content: center; min-height: 64px; background: radial-gradient(60% 60% at 50% 40%, #1c3224 0%, #0f1e16 100%); border-radius: 14px; }
.hero.landing-hero { min-height: 0; padding: 0; margin: 8px 0; }
.landing-section .panel { margin-bottom: 8px; }
.vegas-text { font-size: 18px; font-weight: 900; letter-spacing: 0.08em; background: linear-gradient(90deg, #FFD76A, #FFF59D); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(245,214,122,0.6)); animation: shimmer 2s linear infinite; }
.showcase-card { position: relative; border-radius: 16px; padding: 14px; background: linear-gradient(135deg, #0f1116, #171a22); border: 2px solid rgba(255,215,106,0.25); box-shadow: 0 12px 30px rgba(0,0,0,0.6), inset 0 0 18px rgba(245,214,122,0.08); }
.showcase-title { font-size: 18px; font-weight: 900; background: linear-gradient(90deg, #ffd76a, #ffe082); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 10px rgba(245,214,122,0.35); }
.chip-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 12px; border: 2px solid rgba(255,255,255,0.2); box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.chip-amber { background: linear-gradient(135deg, #b45309, #f59e0b); color: #0b1b14; }
.chip-emerald { background: linear-gradient(135deg, #065f46, #10b981); color: #0b1b14; }
.chip-purple { background: linear-gradient(135deg, #7e22ce, #db2777); }
.chip-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.neon-divider { height: 2px; background: linear-gradient(90deg, rgba(255,215,106,0), rgba(255,215,106,0.8), rgba(255,215,106,0)); border-radius: 999px; margin: 6px 0 10px; }
.showcase-card:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(0,0,0,0.7), inset 0 0 22px rgba(245,214,122,0.12); transition: all 0.15s ease; }
.showcase-copy { color: rgba(255,255,255,0.85); }
.bar.hp.glow { box-shadow: 0 0 18px rgba(227,91,91,0.55), inset 0 0 12px rgba(227,91,91,0.45); }
.bar.hp.boss.glow { box-shadow: 0 0 18px rgba(227,91,91,0.55), inset 0 0 12px rgba(227,91,91,0.45); }
.examples-title { font-size: 20px; font-weight: 900; letter-spacing: 0.02em; }