:root {
  font-family:
    Inter,
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #eeeef7;
  background: #10111b;
  font-synthesis: none;
  --muted: #9d9eaf;
  --line: #303141;
  --accent: #c5b4ff;
  --mint: #b2e8d8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #252635;
  color: #eeeef7;
  border-radius: 12px;
  padding: 12px 17px;
  transition: 0.15s;
}
button:hover {
  background: #37334a;
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  color: #211e36;
  border: 0;
  font-weight: 750;
}
button.mint {
  background: var(--mint);
  color: #132c28;
}
button.ghost {
  background: transparent;
}
input {
  border: 1px solid #3c3c50;
  border-radius: 11px;
  background: #161722;
  padding: 13px;
  color: white;
  min-width: 0;
  outline: none;
}
input:focus {
  border-color: var(--accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(32px, 4.4vw, 58px);
  letter-spacing: -2px;
  line-height: 1.17;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
  color: var(--muted);
}
header {
  max-width: 1400px;
  margin: auto;
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 850;
  font-size: 19px;
  letter-spacing: -0.5px;
}
.brand i {
  color: var(--accent);
  font-style: normal;
  margin-right: 10px;
}
.tag {
  display: inline-block;
  border: 1px solid #44435d;
  border-radius: 100px;
  font-size: 11px;
  padding: 5px 9px;
  color: #c5b4ff;
  margin-left: 10px;
}
.user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  background: #343048;
  color: var(--accent);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.wrap {
  max-width: 1400px;
  margin: auto;
  padding: 36px 40px 50px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.7px;
  color: var(--mint);
  font-weight: 750;
  margin-bottom: 18px;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 35px;
  margin: 15px 0 38px;
  align-items: end;
}
.intro p {
  max-width: 440px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 38px;
}
.gamecard {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #1a1b29;
}
.art {
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  background: linear-gradient(115deg, #32304c, #1c1d30);
}
.art.race span {
  font-size: 64px;
  transform: rotate(-10deg);
  text-shadow: 10px 10px #0003;
}
.art.race:after {
  content: '';
  position: absolute;
  width: 80%;
  bottom: 22px;
  border-bottom: 2px dashed #c5b4ff66;
}
.art.city {
  background: linear-gradient(135deg, #1b3c3e, #172c35);
}
.art.city span {
  width: 48px;
  background: #b2e8d8;
  box-shadow: 9px -8px 0 #508d8a;
  border-radius: 5px 5px 0 0;
  transform: skewY(-8deg);
}
.gamebody {
  padding: 24px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gamebody p {
  color: var(--muted);
  margin: 12px 0 20px;
  font-size: 14px;
}
.pills {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.pill {
  font-size: 11px;
  color: var(--muted);
  background: #ffffff09;
  border-radius: 6px;
  padding: 5px 8px;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 16px;
}
.rooms {
  display: grid;
  gap: 10px;
}
.roomrow {
  background: #1a1b29;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.empty {
  border: 1px dashed #3a3a4c;
  border-radius: 18px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}
.auth {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 70px;
  align-items: center;
  min-height: 72vh;
  max-width: 1050px;
  margin: auto;
}
.authform {
  padding: 32px;
  border-radius: 22px;
  background: #1a1b29;
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
}
.authform p {
  margin-bottom: 10px;
}
.authform label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.hero-symbol {
  font-size: 100px;
  margin: 30px 0;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  margin-top: 24px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #1a1b29;
  padding: 20px;
}
.players {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.player {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 15px;
  min-width: 125px;
  background: #1e2030;
}
.player.active {
  border-color: var(--mint);
  box-shadow: 0 0 0 1px #b2e8d833;
}
.player b {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}
.player small {
  font-size: 11px;
}
.track {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 34px 6px;
  background: radial-gradient(ellipse, #33304a, #171924);
  border-radius: 16px;
  margin: 18px 0;
}
.horse {
  flex: 1;
  max-width: 95px;
  border: 1px solid #51485e;
  background: #272336;
  border-radius: 12px;
  padding: 15px 5px;
  text-align: center;
}
.horse .emoji {
  font-size: 35px;
  display: block;
  margin: 7px 0;
}
.horse.dark {
  border-color: #e7c67a;
}
.horse .rank {
  font-size: 11px;
  color: var(--muted);
}
.horse.mine {
  box-shadow: inset 0 -3px var(--accent);
}
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 15px 0;
}
.actioncard {
  width: 125px;
  min-height: 83px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: #29283e;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.actions button {
  font-size: 12px;
  padding: 10px;
}
.ticket {
  display: inline-block;
  background: #403750;
  color: #e0caff;
  border: 1px dashed #9277b6;
  padding: 10px 18px;
  border-radius: 9px;
  margin: 10px 7px 0 0;
}
.status {
  padding: 15px 18px;
  background: #28253c;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.55;
  font-size: 14px;
}
.board {
  display: grid;
  grid-template-columns: repeat(12, minmax(25px, 1fr));
  gap: 4px;
  margin: 20px 0;
}
.cell {
  aspect-ratio: 1;
  padding: 0;
  border-radius: 5px;
  font-size: 10px;
  background: #232536;
}
.cell.tilechoice {
  border-color: var(--accent);
  color: white;
  background: #49405f;
}
.cell.occupied {
  color: #fff;
  cursor: default;
  border: 0;
}
.cell.single {
  background: #656b7a;
}
.stockbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.stock {
  font-size: 11px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--c);
  border-radius: 5px;
}
.chatlog {
  height: 220px;
  overflow: auto;
  margin: 13px 0;
  font-size: 12px;
}
.chatmsg {
  margin: 10px 0;
  word-break: break-word;
}
.chatmsg b {
  color: var(--accent);
  margin-right: 6px;
}
.chatform {
  display: flex;
  gap: 6px;
}
.chatform input {
  width: 100%;
  font-size: 12px;
  padding: 10px;
}
.chatform button {
  padding: 10px;
}
.logs {
  max-height: 240px;
  overflow: auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 15px;
}
.logs div {
  padding: 8px 0;
  border-bottom: 1px solid #ffffff08;
}
details {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.9;
}
summary {
  cursor: pointer;
  color: #d0c9e6;
}
.result {
  padding: 25px;
  border: 1px solid #b2e8d866;
  border-radius: 17px;
  background: #233a37;
  text-align: center;
  margin-bottom: 20px;
}
.result h2 {
  color: var(--mint);
  margin-bottom: 10px;
}
.footer {
  font-size: 11px;
  color: #75778e;
  margin-top: 35px;
  line-height: 1.7;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #eee7ff;
  color: #211e36;
  border-radius: 12px;
  max-width: 90vw;
  padding: 14px 22px;
  box-shadow: 0 6px 35px #0009;
  display: none;
  z-index: 10;
}
.joinbox {
  display: flex;
  gap: 8px;
}
.rules {
  white-space: pre-line;
}
.chosen {
  background: var(--accent) !important;
  color: #20182e !important;
}
@media (max-width: 850px) {
  header {
    padding: 18px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .board {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .wrap {
    padding: 24px 18px;
  }
  .intro {
    display: block;
  }
  .intro p {
    margin-top: 18px;
  }
  .cards,
  .auth {
    grid-template-columns: 1fr;
  }
  .auth {
    gap: 20px;
  }
  .hero-symbol {
    display: none;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .board {
    gap: 3px;
  }
  .cell {
    font-size: 9px;
  }
  .user small {
    display: none;
  }
  .horse .emoji {
    font-size: 26px;
  }
  .track {
    gap: 4px;
    padding: 20px 3px;
  }
  .horse {
    padding: 10px 2px;
  }
  .roomrow {
    padding: 13px;
  }
  .joinbox input {
    width: 120px;
  }
  .authform {
    padding: 22px;
  }
  h1 {
    font-size: 38px;
  }
  .actions {
    max-height: 280px;
    overflow: auto;
  }
}

/* ───────── v0.3 테이블 화면 ───────── */
.small { font-size: 12px; }
.center { justify-content: center; }
.tablehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.tablehead h2 { margin: 4px 0 0; }
.player { position: relative; transition: 0.2s; }
.player small { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.player em { font-style: normal; font-size: 11px; color: var(--mint); margin-left: 4px; }
.player.active { border-color: var(--mint); background: #1f2c2c; box-shadow: 0 0 0 2px #b2e8d855, 0 6px 20px #0006; transform: translateY(-2px); }
.player.winner { border-color: #ffd166; }
.turnmark { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: 10px; font-weight: 800; background: var(--mint); color: #132c28; padding: 2px 7px; border-radius: 99px; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: #34354a; color: #eeeef7; }
.badge.warn { background: #ffd16633; color: #ffd166; }
.badge.mint { background: #b2e8d833; color: var(--mint); }

.banner { border-radius: 14px; padding: 14px 18px; background: #23243a; border: 1px solid var(--line); margin-bottom: 14px; }
.banner.mine { background: linear-gradient(90deg, #2a3d3a, #23243a); border-color: var(--mint); }
.bannertop { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.bannertop b { font-size: 18px; }
.banner.mine .bannertop b { color: var(--mint); }
.bannertop span { color: #d7d7e5; }
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 12px 0 0; flex-wrap: wrap; }
.steps li { font-size: 12px; padding: 5px 11px; border-radius: 99px; background: #1a1b29; color: var(--muted); border: 1px solid var(--line); }
.steps li.on { background: var(--accent); color: #211e36; border-color: var(--accent); font-weight: 750; }
.steps li.done { color: #c9c9d6; text-decoration: line-through; opacity: 0.7; }

.fresh { border-left: 3px solid #ffd166; background: #2a2618; padding: 9px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; animation: freshin 0.5s ease; }
.fresh small { color: #ffd166; font-weight: 700; display: block; margin-bottom: 2px; }
@keyframes freshin { from { opacity: 0; transform: translateY(-4px); } }
.logs .new { color: #ffe3a3; }

.choice, .buybox, .mergebox, .betbox { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: #22233a; border: 1px solid #4a4566; }
.choice .actions, .buybox .actions { margin-top: 10px; }
.confirm { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 13px; }
button.on { background: var(--accent); color: #211e36; border-color: var(--accent); }
button.warnbtn { border-color: #ffd166; color: #ffd166; }
.guide { margin-top: 18px; }
.guide ol { margin: 8px 0; padding-left: 20px; line-height: 1.7; white-space: normal; }

/* 대기실 */
.lobbywait { text-align: center; padding: 30px 10px; }
.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px auto; max-width: 480px; }
.seat { border: 1px dashed var(--line); border-radius: 12px; padding: 14px 8px; color: #5c5d70; font-size: 13px; }
.seat.filled { border-style: solid; color: inherit; background: #1e2030; }
.seat small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

/* 결과 */
.result { text-align: center; padding: 20px 10px; margin-bottom: 16px; border-radius: 14px; background: radial-gradient(ellipse at top, #3a3352, #1a1b29); }
.scores { margin: 16px auto; border-collapse: collapse; font-size: 14px; }
.scores th, .scores td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.scores th { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ───────── 별똥 레이스 ───────── */
.runner { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: 14px; color: #1a1420; background: radial-gradient(circle at 35% 30%, #fff, var(--rc) 60%); box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 60%, transparent); vertical-align: middle; }
.track { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: linear-gradient(180deg, #1b1d33, #141522); border-radius: 14px; justify-content: stretch; }
.lane { display: grid; grid-template-columns: 44px 34px 1fr auto 46px; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; background: #20223a; border: 1px solid transparent; transition: 0.3s; }
.lane .rank { color: var(--muted); font-size: 13px; font-weight: 700; }
.lane .pts { text-align: right; color: var(--muted); font-size: 12px; }
.lane .tags { display: flex; gap: 5px; }
.lane.mine { border-color: #b2e8d877; background: #1f2f31; }
.lane.mine .pts { color: var(--mint); font-weight: 800; }
.lane.underdog { box-shadow: inset 3px 0 0 #ffd166; }
.lane.moved { animation: lanepulse 1.2s ease; }
.lane.preview { border-style: dashed; border-color: var(--accent); }
@keyframes lanepulse { 0% { background: #4a4366; } 100% { background: #20223a; } }
.delta { font-size: 12px; font-weight: 800; }
.delta.up { color: #7ee2a8; }
.delta.down { color: #ff8a8a; }
.mine-box { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.mine-box h3 { margin: 0 0 8px; }
.wishes { display: flex; gap: 8px; flex-wrap: wrap; }
.wish { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: #2b2540; border: 1px dashed #9277b6; font-size: 13px; }
.scorebox { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.scorebox b { font-size: 28px; color: var(--mint); }
.scorebox small { color: var(--muted); }
.scorebox .up { color: #7ee2a8; font-weight: 700; }
.scorebox .down { color: #ff8a8a; font-weight: 700; }
.betbox { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-color: #ffd16677; }
.betbox small { display: block; color: var(--muted); margin-top: 4px; }
.hand { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.card { width: 128px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; padding: 10px 12px; border-radius: 12px; background: linear-gradient(160deg, #2c2a48, #1f2033); }
.card .cardkind { font-size: 10px; color: var(--muted); }
.card b { font-size: 14px; line-height: 1.3; }
.card.on { background: linear-gradient(160deg, #4b4278, #2c2a48); border-color: var(--accent); transform: translateY(-4px); }
.setup { padding: 8px 0; }
.lane-preview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 44px; padding: 8px 12px; background: #1b1d33; border-radius: 12px; }
.lane-preview i { color: var(--muted); font-style: normal; }
.setupgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.setuprow { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; background: #20223a; }
.setuprow button { flex: 1; padding: 8px; }

/* ───────── 야시장 큰손 ───────── */
.boardwrap { margin: 6px 0 4px; }
.board { margin: 0; }
.cell { color: #6f7086; border: 1px solid #2a2c3e; }
.cell.loose { background: #8b8fa3; color: #191a26; font-weight: 700; border: 0; }
.cell.chain { background: var(--cc); color: #191a26; font-weight: 800; border: 0; }
.cell.myhand { outline: 2px dashed var(--mint); outline-offset: -3px; color: var(--mint); }
.cell.tilechoice { background: #2c4a44; color: #fff; border-color: var(--mint); cursor: pointer; animation: glow 1.6s ease-in-out infinite; }
.cell.last { box-shadow: 0 0 0 3px #ffd166, 0 0 16px #ffd166aa; z-index: 1; animation: lastpop 0.6s ease; }
.cell:disabled { opacity: 1; cursor: default; }
@keyframes glow { 50% { box-shadow: 0 0 10px #b2e8d888; } }
@keyframes lastpop { 0% { transform: scale(1.3); } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 8px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.lg.loose { background: #8b8fa3; }
.lg.myhand { outline: 2px dashed var(--mint); outline-offset: -2px; }
.lg.last { box-shadow: 0 0 0 2px #ffd166; }
.myhand-row { margin: 14px 0; }
.myhand-row h3 { margin: 0 0 6px; }
.tilebtn { font-weight: 800; min-width: 58px; border-color: var(--mint); }
.tilebtn.dead { text-decoration: line-through; }
.chainbtn { border-left: 5px solid var(--cc); }
.chainbtn small { color: var(--muted); }
.chains { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.chaincard { border-radius: 12px; padding: 10px 12px; background: #1f2033; border: 1px solid var(--line); border-top: 4px solid var(--cc); font-size: 13px; }
.chaintop { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.chaintop b { color: var(--cc); font-size: 15px; }
.chaintop .size { margin-left: auto; font-weight: 800; }
.chainrow { display: flex; justify-content: space-between; gap: 6px; color: #d4d4e0; margin-top: 3px; }
.chainrow.small { font-size: 11px; color: var(--muted); }
.chainrow em { font-style: normal; color: #ffd166; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cc); margin: 0 3px 0 8px; }
.mergebox { border-color: #ffd166; background: #2a2618; }
.mergebox h3 { margin: 4px 0; }
.mergegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stepper { background: #1a1b29; border-radius: 10px; padding: 10px; text-align: center; }
.stepper small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.stepper div { display: flex; align-items: center; justify-content: center; gap: 12px; }
.stepper b { font-size: 22px; min-width: 28px; }
.stepper button { padding: 6px 12px; }
.mergeresult { color: #e7e2c8; }

@media (max-width: 850px) {
  .lane { grid-template-columns: 38px 32px 1fr auto 40px; gap: 6px; padding: 6px 8px; }
  .card { width: calc(50% - 5px); }
  .mergegrid { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .players { flex-wrap: nowrap; overflow-x: auto; padding-top: 10px; }
  .player { min-width: 120px; }
}
.marketgrid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.chaincol h3 { margin-top: 0; }
.chaincol .chains { grid-template-columns: 1fr; }
.card.on b, .card.on .cardkind { color: #fff; }
@media (max-width: 1100px) { .marketgrid { grid-template-columns: 1fr; } .chaincol .chains { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
/* art-v01 */
.runner.art { position: relative; width: 36px; height: 36px; background: none; box-shadow: none; }
.runner.art img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rc) 45%, transparent)); }
.runner.art b { position: relative; font-size: 14px; font-weight: 900; color: #10111b; line-height: 1; }
.shopicon { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; flex: none; }
.chaintop .shopicon { margin-right: 2px; }
.closedshop { display: inline-flex; align-items: center; margin-right: 8px; }
.closedshop .shopicon { width: 16px; height: 16px; margin-right: 3px; }
.lane { grid-template-columns: 44px 38px 1fr auto 46px; }
.lane .runner.art { width: 42px; height: 42px; }
.lane .runner.art b { font-size: 15px; }
.lane { grid-template-columns: 44px 44px 1fr auto 46px; }
/* 지분표 */
.holdings { margin-top: 18px; }
.holdings h3 small .hold { font-size: 11px; }
.holdscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.holdings table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.holdings th, .holdings td { padding: 7px 8px; text-align: center; border-bottom: 1px solid #262838; }
.holdings thead th { position: sticky; top: 0; background: #1d1e2e; font-weight: 600; font-size: 12px; border-bottom: 2px solid var(--line); }
.holdings thead th[style] { border-bottom-color: var(--cc); }
.holdings .sticky { position: sticky; left: 0; z-index: 1; background: #1a1b29; text-align: left; font-weight: 700; }
.holdings tr.me td, .holdings tr.me .sticky { background: #1f2f31; }
.holdings tr.me .sticky em { font-style: normal; font-size: 11px; color: var(--mint); }
.holdings .subrow th, .holdings .subrow td { color: var(--muted); font-size: 11px; font-weight: 500; padding: 4px 8px; }
.holdings .closed { opacity: 0.35; }
.holdings .mergecol { background: #2a2618 !important; }
.holdings th.focus, .holdings td.focus { background: #2b2846; }
.colbtn { background: none; border: 0; padding: 2px 4px; color: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 2px; }
.colbtn:hover { transform: none; background: #2a2b3f; }
.hold { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: 99px; font-weight: 700; border: 2px solid transparent; }
.hold.r1 { background: #ffd166; color: #1a1420; }
.hold.r2 { border-color: #ffd166; color: #ffd166; }
.hold b { color: inherit; }
.sdelta { font-style: normal; font-size: 10px; font-weight: 800; color: #7ee2a8; margin-left: 3px; animation: freshin 0.5s ease; }
.gap { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; text-align: right !important; }
.proj { font-weight: 700; }
.proj.lead { color: #ffd166; }
.dotturn { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 6px; vertical-align: 1px; }
.cell.focus { box-shadow: 0 0 0 2px #fff; z-index: 1; }
.cell.dim { opacity: 0.3; }
@media (max-width: 850px) {
  .holdings .colname { display: none; }
  .holdings .opt { display: none; }
  .holdings th, .holdings td { padding: 6px 5px; }
}
/* 지분표 v2: 배지 아이콘 + 폭 줄이기 */
.holdings table { font-size: 12px; }
.holdings th, .holdings td { padding: 6px 5px; }
.colbtn { font-size: 11px; }
.hold { gap: 3px; min-width: 22px; height: 22px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.hold.r1 { background: #ffd16622; color: #ffd166; border-color: transparent; }
.hold.r2 { border-color: transparent; background: #d7dfef14; color: #e6ebf5; }
.rankic { width: 16px; height: 16px; flex: none; }
@media (max-width: 1400px) { .holdings .opt2 { display: none; } }
@media (max-width: 850px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > * { min-width: 0; }
  .panel.main { padding: 14px; }
}
@media (max-width: 1100px) { .marketgrid { grid-template-columns: minmax(0, 1fr); } }
.chaincol .chaincard { padding: 7px 10px; }
.chaincol .chaintop { margin-bottom: 2px; }
.chaincol .chainrow { margin-top: 1px; }
/* 가격표 */
.pricechart { margin-top: 16px; }
.pricechart summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.pricechart table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.pricechart th, .pricechart td { padding: 5px 6px; text-align: right; border-bottom: 1px solid #262838; font-variant-numeric: tabular-nums; }
.pricechart thead th { text-align: center; background: #1d1e2e; font-weight: 600; color: var(--muted); }
.pricechart tbody th { text-align: left; color: #d4d4e0; }
.pricechart .tierhead { color: #eeeef7; border-left: 1px solid var(--line); }
.pricechart .tiershops { font-weight: 400; font-size: 11px; color: var(--muted); }
.pricechart .tiershops .shopicon { width: 14px; height: 14px; margin: 0 2px 0 6px; vertical-align: -2px; }
.pricechart td.pp { border-left: 1px solid var(--line); font-weight: 700; }
.pricechart td.bn { color: #ffd166; opacity: 0.8; }
.pricechart td.here { background: #2b2846; }
.pricechart td.pp .shopicon { width: 16px; height: 16px; margin-right: 3px; }
.pricechart tr.safeline th, .pricechart tr.safeline td { border-top: 2px dashed #7ee2a8; }
.chainrow em.next { color: #7ee2a8; }
