/* Shanghai Card Game — site styles. Felt-and-gold theme shared with the game. */
:root {
  --felt-1: #3d7a3a;
  --felt-2: #2c5d2b;
  --felt-3: #1d421d;
  --gold: #e8c35a;
  --gold-deep: #b98a2d;
  --cream: #faf6ec;
  --panel: rgba(10, 26, 10, .78);
  --ink: #223a5e;
  --red: #d2342a;
  --maxw: 780px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  color: var(--cream);
  background: radial-gradient(130% 110% at 50% 0%, var(--felt-1) 0%, var(--felt-2) 55%, var(--felt-3) 100%) fixed;
  line-height: 1.65;
}
a { color: var(--gold); }
a:hover { color: #f7e09a; }

/* Header */
.site-header {
  background: linear-gradient(180deg, rgba(8,20,8,.92), rgba(8,20,8,.75));
  border-bottom: 1px solid rgba(232,195,90,.3);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
}
.header-inner {
  max-width: 1020px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo {
  font-weight: 800; letter-spacing: .06em; font-size: 19px;
  background: linear-gradient(180deg, #f7e09a, #caa23c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none; white-space: nowrap;
}
.logo .suit { -webkit-text-fill-color: var(--red); font-size: 15px; }
nav.main { display: flex; gap: 2px 14px; flex-wrap: wrap; }
nav.main a {
  color: var(--cream); text-decoration: none; font-size: 13.5px; font-weight: 600;
  opacity: .85; padding: 4px 2px; border-bottom: 2px solid transparent;
}
nav.main a:hover { opacity: 1; }
nav.main a.active { color: var(--gold); border-bottom-color: var(--gold); opacity: 1; }
.nav-play {
  margin-left: auto;
  background: linear-gradient(180deg, #f3d87c, #cda23a);
  color: #3a2a06 !important; font-weight: 800; letter-spacing: .06em;
  padding: 7px 18px !important; border-radius: 999px; text-decoration: none;
  border: 1px solid #fff3c4; opacity: 1 !important; border-bottom: 1px solid #fff3c4 !important;
  font-size: 13.5px;
}

/* Layout */
main { max-width: var(--maxw); margin: 0 auto; padding: 34px 18px 60px; }
.hero { text-align: center; padding: 28px 0 10px; }
h1 {
  font-size: clamp(30px, 5.5vw, 44px); line-height: 1.15; font-weight: 800;
  letter-spacing: .02em; margin-bottom: 14px;
  color: #fdf4d7;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.hero p.lead { font-size: clamp(16px, 2.4vw, 19px); opacity: .92; max-width: 640px; margin: 0 auto 22px; }
h2 { font-size: clamp(21px, 3.4vw, 27px); color: var(--gold); margin: 34px 0 10px; font-weight: 800; }
h3 { font-size: clamp(17px, 2.6vw, 20px); color: #f2e3ae; margin: 22px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 7px; }
strong { color: #fdf0c9; }

.panel {
  background: var(--panel);
  border: 1px solid rgba(232,195,90,.28);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 18px 0;
}
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #f3d87c, #cda23a);
  border: 1px solid #fff3c4; border-radius: 999px;
  color: #3a2a06; font-weight: 800; font-size: 17px;
  letter-spacing: .08em; padding: 14px 44px; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .15s;
}
.btn-primary:hover { transform: scale(1.04); color: #3a2a06; }
.btn-secondary {
  display: inline-block;
  border: 1.5px solid rgba(232,195,90,.6); border-radius: 999px;
  color: var(--cream); font-weight: 700; font-size: 14px;
  padding: 10px 26px; text-decoration: none; margin-left: 10px;
}

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 14px 0 20px; font-size: 15px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid rgba(232,195,90,.2); }
th { color: var(--gold); font-weight: 700; }
tr:last-child td { border-bottom: none; }

/* Round ladder cards */
.rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 16px 0; }
.round-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(232,195,90,.25);
  border-radius: 12px; padding: 12px 14px;
}
.round-card .rnum { color: var(--gold); font-weight: 800; font-size: 13px; letter-spacing: .1em; }
.round-card .rreq { font-weight: 700; font-size: 16px; }

/* FAQ */
.faq-item { margin-bottom: 6px; }
details {
  background: rgba(255,255,255,.04); border: 1px solid rgba(232,195,90,.22);
  border-radius: 12px; padding: 13px 18px; margin-bottom: 10px;
}
summary { cursor: pointer; font-weight: 700; color: #f2e3ae; font-size: 16px; }
details p { margin: 10px 0 2px; }

/* Callout */
.callout {
  border-left: 4px solid var(--gold);
  background: rgba(232,195,90,.09);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(232,195,90,.25);
  background: rgba(8,20,8,.8);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1020px; margin: 0 auto; padding: 26px 18px;
  display: flex; gap: 10px 28px; flex-wrap: wrap; justify-content: space-between;
  font-size: 13px; opacity: .85;
}
.footer-inner nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer-inner a { color: var(--cream); text-decoration: none; }
.footer-inner a:hover { color: var(--gold); }

/* Cards motif */
.card-fan { display: flex; justify-content: center; gap: 0; margin: 10px 0 24px; }
.mini-card {
  width: 58px; height: 82px; border-radius: 8px;
  background: linear-gradient(160deg, #fff, #f1ecdd);
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  display: grid; place-items: center; font-size: 26px; font-weight: 800;
  margin: 0 -8px; border: 1px solid #e5decb;
}
.mini-card:nth-child(1) { transform: rotate(-12deg) translateY(6px); color: var(--ink); }
.mini-card:nth-child(2) { transform: rotate(-4deg); color: var(--red); }
.mini-card:nth-child(3) { transform: rotate(4deg); color: #0f7a44; }
.mini-card:nth-child(4) { transform: rotate(12deg) translateY(6px); color: #7b4ea0; font-size: 17px; }

@media (max-width: 640px) {
  .header-inner { gap: 8px 12px; }
  nav.main { font-size: 12px; }
  main { padding-top: 24px; }
}
