:root{
  --bg:#fffaf3;
  --card:#ffffff;
  --text:#2b2b2b;
  --muted:#6b6b6b;
  --line:#eadcc7;
  --accent:#e8892f;
  --accent2:#f3b275;
  --chip:#fff1df;
  --shadow:0 6px 16px rgba(0,0,0,.08);
  --radius:14px;
  --max:1100px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background:linear-gradient(180deg, var(--bg), #ffffff);
  color:var(--text);
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
header{
  position:sticky; top:0; z-index:10;
  background:rgba(255,250,243,.9);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 16px;
  display:flex; gap:14px; align-items:center; justify-content:space-between;
}
.brand{
  display:flex; gap:10px; align-items:center;
}
.brand-icon{
  width:32px; height:32px;
  border-radius:10px;
  box-shadow:0 2px 10px rgba(0,0,0,.10);
}
.brand-text{
  display:flex; flex-direction:column; gap:2px;
}
.brand .title{
  font-size:18px; font-weight:800; letter-spacing:.2px;
}
.brand .sub{
  font-size:12px; color:var(--muted);
}
nav{
  display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end;
}

.nav{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}
.nav-group{
  display:flex;
  gap:10px;
  align-items:center;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  background:rgba(255,255,255,.55);
}
.nav-label{
  font-size:12px;
  color:var(--muted);
  font-weight:800;
  margin-right:4px;
}
nav a{
  display:inline-flex; align-items:center;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:999px;
  color:var(--text);
}
nav a.active{
  border-color:var(--line);
  background:var(--card);
  box-shadow:0 2px 10px rgba(0,0,0,.05);
}
main{max-width:var(--max); margin:0 auto; padding:18px 16px 40px}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}
.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
@media (min-width: 920px){
  .grid.two{grid-template-columns: 1.2fr .8fr;}
  .grid.three{grid-template-columns: 1fr 1fr 1fr;}
}
h1{font-size:22px; margin:4px 0 12px}
h2{font-size:16px; margin:0 0 10px}
p{margin:8px 0; color:var(--muted); line-height:1.6}
.list{margin:8px 0 0; padding-left:18px; color:var(--muted);}
.list li{margin:6px 0; line-height:1.6;}

.toolbar{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin:10px 0 0;
}
.input, select{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 10px;
  font-size:14px;
  width: min(520px, 100%);
}
select{width:auto}
.btn{
  display:inline-flex;
  gap:8px;
  align-items:center;
  border-radius:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
}
.home-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}
.btn-lg{
  padding:18px 16px;
  font-size:22px;
}
.btn-wide{
  grid-column: span 1;
}
.home-grid .btn:nth-child(3),
.home-grid .btn:nth-child(4),
.home-grid .btn:nth-child(5){
  padding:16px 14px;
  font-size:22px;
}
@media (max-width: 720px){
  .home-grid{ grid-template-columns: 1fr; }
  .btn-wide{ grid-column: auto; }
}

.btn:hover{border-color:var(--accent2)}
.kbd{
  font-family:var(--mono);
  font-size:12px;
  padding:2px 6px;
  border:1px solid var(--line);
  border-bottom-width:2px;
  border-radius:7px;
  background:#fff;
  color:var(--muted);
}
.table-wrap{overflow:auto; border-radius:12px; border:1px solid var(--line)}
table{width:100%; border-collapse:collapse; font-size:14px; background:#fff}
th,td{padding:10px 10px; border-bottom:1px solid var(--line); vertical-align:top}
th{position:sticky; top:0; background:#fff; text-align:left; font-weight:700}
tr:hover td{background:#fffdf9}
.small{font-size:12px; color:var(--muted)}
.chip{
  display:inline-flex; align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:var(--chip);
  border:1px solid var(--line);
  font-size:12px;
  color:var(--text);
}
footer{
  max-width:var(--max);
  margin:0 auto;
  padding:0 16px 24px;
  color:var(--muted);
  font-size:12px;
}
.warn{
  border:1px solid #f1c27a;
  background:#fff7ea;
  border-radius:12px;
  padding:10px;
  color:#6b4a12;
}
.mono{font-family:var(--mono)}

/* medals progress */
.progress{margin:10px 0 14px;}
.progress-row{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px;}
progress{width:100%; height:14px; border-radius:999px; overflow:hidden;}
progress::-webkit-progress-bar{background:rgba(0,0,0,.08); border-radius:999px;}
progress::-webkit-progress-value{background:rgba(232,137,47,.85); border-radius:999px;}
.chip.ok{border-color:rgba(34,139,34,.35); background:rgba(34,139,34,.10);}
