* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; }
body {
  margin: 0; background: #0d1220; color: #eef2f7;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.45; padding-bottom: 40px;
}
.hidden { display: none !important; }
.pink { color: #ff5da2; }

/* top bar */
#topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  background: rgba(13,18,32,.96); padding: 10px 14px; border-bottom: 2px solid #ff2e88;
}
.brand { font-weight: 800; letter-spacing: .5px; font-size: 17px; flex: 1; }
.iconbtn {
  background: #16263a; color: #fff; border: 1px solid #2b4258; border-radius: 10px;
  width: 44px; height: 44px; font-size: 20px; cursor: pointer;
}
.chipbtn {
  background: #ff2e88; color: #fff; border: 0; border-radius: 999px;
  padding: 10px 16px; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 44px;
}
.chipbtn.owned { background: #14532d; }

/* views */
.view { max-width: 560px; margin: 0 auto; padding: 14px; }
.page-title { font-size: 26px; margin: 6px 0 4px; }
.page-sub { color: #aebdd0; margin: 0 0 14px; }
.kicker { color: #2dd4bf; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; margin: 4px 0 0; }

/* hero */
.hero { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid #ff2e88; }
.hero img { display: block; width: 100%; height: auto; }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 16px 12px;
  background: linear-gradient(transparent, rgba(7,10,20,.92) 55%);
}
.hero-text h1 { margin: 0 0 4px; font-size: 27px; line-height: 1.1; }
.hero-text p { margin: 0; font-size: 15px; color: #dbe6f2; }

.banner {
  background: #3a2b07; border: 1px solid #f5a623; border-radius: 12px;
  padding: 12px 14px; margin-top: 14px; font-size: 15px;
}
.smallbtn {
  background: #16263a; color: #fff; border: 1px solid #2dd4bf; border-radius: 10px;
  padding: 10px 14px; font-size: 15px; font-weight: 600; cursor: pointer; min-height: 44px;
}
.banner .smallbtn { display: block; margin-top: 10px; width: 100%; }
.smallbtn.center { display: block; margin: 14px auto 0; }

/* cards */
.card {
  background: #121c2e; border: 1px solid #22344d; border-radius: 14px;
  padding: 14px 16px; margin-top: 14px;
}
.card h3 { margin: 10px 0 4px; color: #2dd4bf; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; }
.card h3:first-child { margin-top: 0; }
.card p { margin: 0 0 6px; }
.note { color: #f5c86e; font-size: 14px; }

.progress-head { display: flex; justify-content: space-between; font-size: 16px; }
.progress-bar { background: #22344d; border-radius: 999px; height: 14px; margin: 10px 0; overflow: hidden; }
#progressFill { background: linear-gradient(90deg, #2dd4bf, #ff2e88); height: 100%; width: 0%; border-radius: 999px; transition: width .3s; }
.progress-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: #aebdd0; }

/* search */
.searchbox {
  display: flex; align-items: center; gap: 8px; background: #16263a;
  border: 1px solid #2b4258; border-radius: 12px; padding: 4px 12px; margin-top: 14px;
}
.searchbox input {
  flex: 1; background: none; border: 0; color: #fff; font-size: 17px; padding: 12px 0; outline: none; min-width: 0;
}
.search-title { margin: 16px 0 8px; font-size: 17px; }

/* tiles */
.section-title { font-size: 20px; margin: 20px 0 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: #121c2e; border: 1px solid #22344d; border-left: 5px solid #ff2e88;
  border-radius: 14px; padding: 16px 14px; text-align: left; color: #fff; cursor: pointer; min-height: 96px;
}
.tile.teal { border-left-color: #2dd4bf; }
.tile .t-name { font-size: 18px; font-weight: 800; display: block; }
.tile .t-count { color: #aebdd0; font-size: 14px; display: block; margin-top: 4px; }
.tile .t-lock { color: #f5a623; font-size: 13px; font-weight: 700; display: block; margin-top: 6px; }
.tile .t-done { color: #2dd4bf; font-size: 13px; display: block; margin-top: 2px; }

.bigbtn {
  display: block; width: 100%; margin-top: 16px; border: 0; border-radius: 14px;
  padding: 16px; font-size: 18px; font-weight: 800; cursor: pointer; color: #06281f; background: #2dd4bf;
}
.bigbtn.teal { background: #2dd4bf; color: #06281f; }
.bigbtn.pink { background: #ff2e88; color: #fff; }
.bigbtn:disabled { opacity: .45; }

.howto .steps { margin: 10px 0 6px 20px; padding: 0; }
.howto .steps li { margin-bottom: 7px; }
.controller { width: 100%; max-width: 340px; display: block; margin: 4px auto; }

.scene { width: 100%; border-radius: 14px; margin-top: 18px; display: block; border: 1px solid #22344d; }
.caption { font-size: 12.5px; color: #8496ad; margin: 6px 2px 0; }
.foot { margin-top: 22px; font-size: 13.5px; color: #8496ad; }
.foot p { margin: 0 0 10px; }
.license-state { color: #2dd4bf; font-weight: 600; }

/* cheat rows */
.row {
  display: block; width: 100%; text-align: left; background: #121c2e; color: #fff;
  border: 1px solid #22344d; border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; cursor: pointer;
}
.row .r-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row .r-name { font-weight: 700; font-size: 17px; }
.row .r-check { color: #2dd4bf; font-weight: 800; white-space: nowrap; }
.row .r-effect { color: #aebdd0; font-size: 14.5px; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.chip {
  background: #1d2f47; border: 1px solid #35597e; border-radius: 8px;
  padding: 4px 9px; font-size: 13.5px; font-weight: 700; letter-spacing: .3px;
}
.chip.done { background: #14532d; border-color: #2dd4bf; color: #a7f3ea; }
.chip.next { border-color: #ff2e88; background: #4a1030; }
.chip.unknown { background: #2a2f3a; border-color: #46536a; color: #aebdd0; font-weight: 600; }
.chip.locked { filter: blur(3px); opacity: .65; }
.lockline { margin-top: 9px; color: #f5a623; font-size: 14px; font-weight: 700; }

/* detail */
.checkrow { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkrow input { width: 28px; height: 28px; margin-top: 2px; accent-color: #2dd4bf; flex: none; }
.checkrow small { color: #aebdd0; }

/* practice */
.picker { display: block; margin-top: 6px; }
.picker span { display: block; font-size: 14px; color: #aebdd0; margin-bottom: 6px; font-weight: 600; }
.picker select, .picker input {
  width: 100%; background: #16263a; color: #fff; border: 1px solid #2b4258;
  border-radius: 12px; padding: 14px; font-size: 17px; outline: none;
}
.reminder .steps-line { font-size: 14.5px; color: #dbe6f2; }
.reminder .steps-line b { color: #ff5da2; }
.chips.target { margin-top: 10px; }
.practice-msg { font-size: 17px; font-weight: 700; margin: 12px 0 0; min-height: 24px; }
.practice-msg.bad { color: #ff8080; }
.practice-msg.good { color: #2dd4bf; }
.dpad {
  display: grid; grid-template-columns: 84px 84px 84px; grid-template-rows: 84px 84px 84px;
  gap: 6px; justify-content: center; margin: 22px auto 4px; width: max-content;
}
.dbtn {
  background: #1d2f47; border: 2px solid #35597e; color: #fff; font-size: 30px;
  border-radius: 16px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.dbtn:active { background: #ff2e88; border-color: #ff5da2; }
.dbtn.up { grid-area: 1 / 2; } .dbtn.left { grid-area: 2 / 1; }
.dbtn.right { grid-area: 2 / 3; } .dbtn.down { grid-area: 3 / 2; }
.dcenter { grid-area: 2 / 2; background: #121c2e; border-radius: 50%; border: 1px solid #22344d; }
.shake { animation: shake .3s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.celebrate { text-align: center; padding: 26px 10px 6px; }
.celebrate-emoji { font-size: 54px; }
.celebrate h2 { margin: 6px 0; color: #2dd4bf; }

/* activation sheet */
.sheet {
  position: fixed; inset: 0; z-index: 40; background: rgba(4,6,12,.78);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-card {
  background: #121c2e; border: 1px solid #ff2e88; border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 20px 18px 30px; width: 100%; max-width: 560px; position: relative; max-height: 92vh; overflow-y: auto;
}
.sheet-card h2 { margin: 0 30px 8px 0; font-size: 22px; }
.sheet-card .close { position: absolute; top: 12px; right: 12px; }
.activate-msg { min-height: 22px; font-weight: 700; margin: 12px 0 0; }
.activate-msg.bad { color: #ff8080; }
.activate-msg.good { color: #2dd4bf; }
.small { font-size: 13.5px; color: #8496ad; }

/* home nav row */
.navrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.navbtn {
  background: #121c2e; border: 1px solid #22344d; border-radius: 14px; color: #fff;
  padding: 14px 6px; font-size: 24px; cursor: pointer; min-height: 78px;
}
.navbtn span { display: block; font-size: 14px; font-weight: 700; margin-top: 5px; }

/* FAQ */
.faq {
  background: #121c2e; border: 1px solid #22344d; border-radius: 12px;
  padding: 4px 16px; margin-bottom: 10px;
}
.faq summary {
  font-weight: 700; font-size: 16.5px; padding: 13px 0; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: #ff5da2; font-size: 24px; font-weight: 800; flex: none; }
.faq[open ] summary::after { content: "–"; }
.faq p { margin: 0 0 14px; color: #dbe6f2; font-size: 15.5px; }

/* skill paths */
.path-level { border-left: 5px solid #ff2e88; }
.path-level.teal { border-left-color: #2dd4bf; }
.path-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.path-name { font-size: 19px; font-weight: 800; margin: 2px 0 2px; }
.path-count { color: #2dd4bf; font-weight: 800; white-space: nowrap; }
.path-tag { color: #aebdd0; font-size: 14px; margin: 0 0 8px; }
.path-step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #22344d; cursor: pointer; }
.path-step input { width: 26px; height: 26px; margin-top: 1px; accent-color: #2dd4bf; flex: none; }
.path-step span { font-size: 15.5px; }
.path-step small { display: block; color: #aebdd0; font-size: 13.5px; margin-top: 2px; }

/* empire stages */
.stage .stage-title { margin: 2px 0 8px; font-size: 19px; color: #fff; text-transform: none; letter-spacing: 0; }
.stage ul { margin: 6px 0 4px 20px; padding: 0; }
.stage li { margin-bottom: 8px; font-size: 15.5px; }
.stage p { font-size: 15.5px; }
