:root{
  --bg0:#120b07;
  --bg1:#1b120c;
  --card:#1e140e;
  --line:rgba(217,165,90,.18);
  --text:rgba(243,234,223,.95);
  --muted:rgba(205,188,174,.78);
  --gold:#d9a55a;
  --red:#e35d5d;
  --green:#74c27c;
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --r:18px;
  --r2:14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 700px at 40% 0%, rgba(217,165,90,.12), transparent 60%),
              radial-gradient(900px 700px at 100% 20%, rgba(116,194,124,.08), transparent 55%),
              linear-gradient(180deg, var(--bg1), var(--bg0));
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.app{
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 12px 32px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  backdrop-filter: blur(10px);
  background: rgba(18,11,7,.55);
  border-bottom: 1px solid rgba(217,165,90,.10);
}

.brand{
  display:flex; gap:10px; align-items:center;
}
.logo{
  width:36px; height:36px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(217,165,90,.14);
  border:1px solid rgba(217,165,90,.18);
}
.brandTitle{ font-weight: 900; letter-spacing:.2px; }
.brandSub{ font-size: 12px; color: var(--muted); margin-top:2px; }

.screen{ margin-top: 12px; }
.hidden{ display:none !important; }

.card{
  background: linear-gradient(180deg, rgba(30,20,14,.90), rgba(18,11,7,.88));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
}

.heroTitle{ font-size: 26px; font-weight: 900; }
.heroDesc{ margin-top:8px; color:var(--muted); line-height:1.45; }
.sectionTitle{ font-weight: 900; font-size: 18px; }
.mt6{ margin-top:6px; } .mt8{ margin-top:8px; } .mt10{ margin-top:10px; } .mt12{ margin-top:12px; } .mt16{ margin-top:16px; }

.row{
  display:flex;
  gap:10px;
  align-items:center;
}
.row--wrap{ flex-wrap: wrap; }
.row--between{ justify-content:space-between; }

.muted{ color:var(--muted); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.smallText{ font-size: 12px; }

.btn{
  border:1px solid rgba(217,165,90,.22);
  background: rgba(217,165,90,.08);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  cursor:pointer;
}
.btn:hover{ filter: brightness(1.08); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.btn--primary{
  background: linear-gradient(180deg, rgba(217,165,90,.24), rgba(217,165,90,.12));
  border:1px solid rgba(217,165,90,.35);
}
.btn--secondary{
  background: rgba(205,188,174,.08);
  border:1px solid rgba(205,188,174,.20);
}
.btn--danger{
  background: rgba(227,93,93,.14);
  border:1px solid rgba(227,93,93,.30);
}
.btnBig{ padding: 12px 16px; font-size: 15px; }

.pill{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(217,165,90,.10);
}
.pillK{ font-size: 12px; color: var(--muted); font-weight: 800; }
.pillV{ font-weight: 900; }

.bullets{ margin:10px 0 0; padding-left: 18px; color: var(--muted); line-height:1.5; }
.bullets b{ color: var(--text); }

.adBox{
  margin-top: 12px;
  border-radius: var(--r2);
  border:1px dashed rgba(217,165,90,.22);
  padding: 12px;
  background: rgba(0,0,0,.15);
}
.adTitle{ font-weight:900; }
.adDesc{ color: var(--muted); font-size: 12px; margin-top:4px; }

.gameCard{ padding-bottom: 18px; }
.titleLine{ color: var(--muted); }

.bars{ display:grid; gap:8px; }
.barWrap{ display:flex; gap:10px; align-items:center; }
.barLabel{ width: 42px; font-weight:900; color: rgba(205,188,174,.92); }
.bar{
  flex:1;
  height: 12px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(217,165,90,.12);
  border-radius: 999px;
  overflow:hidden;
}
.barFill{
  height:100%;
  width:50%;
  background: linear-gradient(90deg, rgba(217,165,90,.35), rgba(217,165,90,.85));
}
.barHeat{
  background: linear-gradient(90deg, rgba(227,93,93,.25), rgba(227,93,93,.85));
}

.canvasWrap{
  border-radius: var(--r2);
  border:1px solid rgba(217,165,90,.12);
  overflow:hidden;
  background: rgba(0,0,0,.12);
}
.canvas{
  width: 100%;
  height: min(54vh, 520px);
  display:block;
}
.canvasSmall{
  height: min(36vh, 320px);
}

.hint{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217,165,90,.14);
  background: rgba(0,0,0,.16);
  color: rgba(243,234,223,.90);
  font-weight: 800;
}

.input{
  flex:1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217,165,90,.18);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}

.tileGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tile{
  border-radius: var(--r2);
  border: 1px solid rgba(217,165,90,.14);
  background: rgba(0,0,0,.14);
  padding: 12px;
}
.tileTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-weight: 900;
}
.badge{
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(205,188,174,.20);
  background: rgba(205,188,174,.10);
  color: rgba(243,234,223,.90);
}
.smallBtnRow{ margin-top: 10px; display:flex; gap: 10px; flex-wrap:wrap; }

.chipRow{ display:flex; gap:8px; flex-wrap: wrap; }
.chip{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217,165,90,.18);
  background: rgba(217,165,90,.10);
  font-weight: 900;
  cursor:pointer;
}

.modal{
  position: fixed;
  inset: 0;
  z-index: 20000;
  display:flex;
  align-items:center;
  justify-content:center;
}
.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}
.modalPanel{
  position: relative;
  width: min(520px, 92vw);
  background: rgba(28,18,12,.94);
  border: 1px solid rgba(217,165,90,.22);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
}
