:root{
  /* Light + Gold palette */
  --bg:#fff8ef;
  --panel:rgba(255,255,255,.82);
  --panel2:#ffffff;
  --text:#111827;          /* near-black */
  --muted:#5b6473;         /* gray */
  --line:#ead9b6;          /* warm gold-beige line */
  --a:#b8860b;             /* link gold (darker) */
  --b:#d4af37;             /* primary gold */
  --c:#f59e0b;             /* accent amber */
  --danger:#dc2626;
  --warn:#b45309;
  --ok:#059669;
  --shadow:0 18px 60px rgba(17,24,39,.10)
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Hiragino Kaku Gothic ProN","Noto Sans JP",Meiryo,sans-serif;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(212,175,55,.28), transparent 55%),
    radial-gradient(900px 600px at 80% 30%, rgba(245,158,11,.18), transparent 55%),
    radial-gradient(900px 600px at 60% 95%, rgba(180,134,11,.14), transparent 60%),
    linear-gradient(180deg, #fffdf9 0%, #fff8ef 55%, #fff2dd 100%);
  color:var(--text);
}

a{color:var(--a);text-decoration:none}
a:hover{text-decoration:underline}

img{max-width:100%;height:auto}

.container{width:min(1120px,92vw);margin:0 auto}

/* Top bar */
.topbar{
  position:sticky;top:0;z-index:30;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(234,217,182,.95)
}
.topbar .inner{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:12px 0}

.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.2px}
.brand .logo{
  width:34px;height:34px;border-radius:12px;
  background:linear-gradient(135deg, rgba(212,175,55,.95), rgba(245,158,11,.85));
  box-shadow:0 10px 40px rgba(212,175,55,.18)
}

.nav{display:flex;gap:14px;flex-wrap:wrap}
.nav a{color:var(--text);opacity:.92;font-weight:700;font-size:14px;padding:8px 10px;border-radius:12px}
.nav a:hover{background:rgba(212,175,55,.14)}

/* Hero */
.hero{padding:54px 0 18px}
.hero-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:22px;align-items:stretch}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
  border:1px solid rgba(234,217,182,.95);
  border-radius:20px;
  box-shadow:var(--shadow)
}
.card.pad{padding:22px}

.kicker{display:inline-flex;gap:10px;align-items:center;color:var(--muted);font-weight:800;font-size:13px}
.kicker .dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--b);
  box-shadow:0 0 18px rgba(212,175,55,.45)
}

.h1{margin:10px 0 10px;font-size:32px;line-height:1.16;letter-spacing:.2px}
.sub{margin:0;color:var(--muted);line-height:1.8}

.badges{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.badge{
  font-size:12px;font-weight:900;letter-spacing:.3px;
  color:#1f2937;
  background:linear-gradient(90deg, rgba(245,158,11,.92), rgba(212,175,55,.92));
  padding:8px 10px;border-radius:999px;
  border:1px solid rgba(234,217,182,.9)
}
.badge.alt{
  background:linear-gradient(90deg, rgba(212,175,55,.92), rgba(255,236,179,.95));
  color:#111827
}

.stat{display:flex;gap:14px;align-items:center}
.stat strong{font-size:18px}
.stat span{color:var(--muted);font-size:12px}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}

/* Sections */
.section{padding:26px 0}
.section h2{font-size:20px;margin:0 0 10px}
.section p{color:var(--muted);line-height:1.9}

/* Ranking table */
.tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin:10px 0 12px}

.search{
  flex:1;min-width:240px;
  display:flex;gap:10px;align-items:center;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(234,217,182,.95);
  border-radius:16px;
  padding:10px 12px
}
.search input{flex:1;border:none;outline:none;background:transparent;color:var(--text);font-size:14px}
.search small{color:var(--muted)}

.btn{
  border:none;cursor:pointer;border-radius:14px;
  padding:10px 12px;font-weight:900;
  color:#111827;
  background:linear-gradient(90deg, rgba(245,158,11,.95), rgba(212,175,55,.95));
  box-shadow:0 10px 30px rgba(212,175,55,.18);
  border:1px solid rgba(234,217,182,.95)
}
.btn:active{transform:translateY(1px)}

.table-wrap{
  overflow:auto;border-radius:20px;
  border:1px solid rgba(234,217,182,.95);
  background:rgba(255,255,255,.62)
}
table{border-collapse:collapse;width:100%;min-width:920px}

th,td{
  padding:12px 12px;
  border-bottom:1px solid rgba(234,217,182,.75);
  vertical-align:top
}
th{
  position:sticky;top:0;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(10px);
  text-align:left;font-size:12px;
  color:rgba(91,100,115,.95);
  letter-spacing:.2px
}
tr:hover td{background:rgba(212,175,55,.08)}

.rank{font-weight:900;font-size:14px}
.name{display:flex;gap:10px;align-items:center}
.name img{
  width:52px;height:52px;border-radius:14px;
  border:1px solid rgba(234,217,182,.95);
  background:rgba(255,255,255,.70);
  object-fit:contain;
}

/* table内で縦に潰れないよう微調整 */
#ranking-table td{vertical-align:middle}
#ranking-table .name{align-items:center}

/* フッター内の旧テーマ由来インライン色を上書き（HTMLを触らない場合の保険） */
.footer [style*="color:#e8ecff"],
.footer [style*="color: #e8ecff"]{color:var(--text) !important}

.tag{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12px;font-weight:900;color:var(--text);
  background:rgba(212,175,55,.12);
  border:1px solid rgba(234,217,182,.95);
  padding:6px 8px;border-radius:999px;
  margin-right:6px;margin-top:6px
}
.tag.green{background:rgba(5,150,105,.10);border-color:rgba(5,150,105,.22)}
.tag.cyan{background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.22)}

.muted{color:var(--muted)}

/* Article */
.article{padding:18px 0 44px}
.breadcrumb{color:var(--muted);font-size:12px;margin:10px 0}
.article h1{font-size:28px;margin:6px 0 10px}
.article h2{font-size:18px;margin:22px 0 10px}
.article h3{font-size:15px;margin:16px 0 8px;color:var(--text)}
.article p,.article li{color:#374151;line-height:1.95}

.article .heroimg{
  border-radius:18px;
  border:1px solid rgba(234,217,182,.95);
  background:rgba(255,255,255,.75);
  box-shadow:var(--shadow)
}

.kv{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kv .box{
  padding:14px;border-radius:18px;
  border:1px solid rgba(234,217,182,.95);
  background:rgba(255,255,255,.68)
}
.kv .box strong{display:block;margin-bottom:6px}

.note{
  border-left:3px solid rgba(212,175,55,.95);
  padding:10px 12px;
  background:rgba(212,175,55,.10);
  border-radius:12px
}
.warn{
  border-left:3px solid rgba(245,158,11,.95);
  padding:10px 12px;
  background:rgba(245,158,11,.10);
  border-radius:12px
}

/* Footer */
.footer{
  border-top:1px solid rgba(234,217,182,.95);
  padding:22px 0 34px;
  color:var(--muted);
  font-size:13px
}
.footer a{color:var(--muted)}
.footer .grid{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between}

@media (max-width:860px){
  .hero-grid{grid-template-columns:1fr}
  .h1{font-size:28px}
  .kv{grid-template-columns:1fr}
  .name img{width:44px;height:44px}
}