
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif; margin: 0; background: #f8fafc; color: #0f172a; }
header { background: #0ea5e9; color: white; padding: 16px 20px; }
header h1 { margin: 0; font-size: 20px; }
main { padding: 20px; max-width: 1080px; margin: 0 auto; }
.card { background: white; border-radius: 12px; padding: 16px; margin-bottom: 16px; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; }
.badge { display: inline-block; background: #e2e8f0; color: #111827; font-size: 12px; padding: 2px 8px; border-radius: 999px; margin-left: 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.col { flex: 1 1 320px; }
small.muted { color: #64748b; }
.button { border: 1px solid #cbd5e1; background: #f8fafc; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.button:active { transform: translateY(1px); }
.details { background: #f1f5f9; border-radius: 10px; padding: 10px; margin-top: 8px; }
.end-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: center; }
.end { background: white; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 8px; text-align: center; }
.end-sum { font-weight: 700; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 8px; text-align: center; }
.total { font-weight: 700; }
.note { color: #475569; font-size: 12px; }
a { color: #0369a1; text-decoration: none; }
a:hover { text-decoration: underline; }
.footer { color: #64748b; font-size: 12px; text-align: center; padding: 20px; }
.warn { background:#fff7ed; border:1px solid #fed7aa; color:#7c2d12; padding:8px 10px; border-radius:8px; }


/* --- Tournament list cards on index --- */
.t-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.t-item { display: block; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; transition: box-shadow .15s ease, transform .05s ease; }
.t-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); text-decoration: none; }
.t-title { font-size: 16px; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.t-sub { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.t-sub .muted { color: #64748b; font-size: 13px; }
.t-sub .t-date { white-space: nowrap; }
@media (min-width: 720px){
  .t-list { grid-template-columns: 1fr 1fr; }
}


/* --- Tournament list layout (2-line) --- */
.t-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.t-item { display: block; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; transition: box-shadow .15s ease, transform .05s ease; }
.t-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); text-decoration: none; }
.t-title { font-size: 16px; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.t-sub2 { display: flex; justify-content: space-between; align-items: center; }
.t-sub2 .muted { color: #64748b; font-size: 13px; }
.t-sub2 .t-date { text-align: right; }


/* --- 3-line vertical list for tournaments --- */
.t-list--column { display: flex; flex-direction: column; gap: 10px; }
.t-item { display: block; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; transition: box-shadow .15s ease, transform .05s ease; }
.t-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); text-decoration: none; }
.t-title { font-size: 16px; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.t-line { line-height: 1.4; }
.t-line.muted { color: #64748b; font-size: 13px; }


/* === Compact UI patch (result compact mode) === */
:root{
  --gap-xxs: 4px;
  --gap-xs: 6px;
  --gap-s: 8px;
  --gap-m: 10px;
}

body { margin: 0; }
header { padding: 14px 16px; }
main { padding: 8px 10px; }
.card { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background:#fff; }
.note, .warn { margin: 6px 0; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; line-height: 1.25; }
.table th { font-size: 13px; color: #334155; background: #f8fafc; }
.table .total { font-weight: 700; }

.button { padding: 4px 10px; border-radius: 10px; border: 1px solid #cbd5e1; background: #f1f5f9; font-size: 13px; }

/* Tournament list compact */
.t-item { padding: 10px 12px; }
.t-title { margin-bottom: 2px; }
.t-line { margin: 0; }

/* Details area – tighter & grid cards */
.details { padding: 6px 0; }
.details .meta { font-size: 12px; color:#64748b; margin-bottom: 6px; }
.details .dist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap-s); }
.dist-card { border: 1px dashed #e2e8f0; border-radius: 10px; padding: 8px; background:#fafafa; }
.dhead { font-weight: 700; font-size: 13px; margin: 0 0 6px 0; color:#334155; }

.end-row { display:grid; grid-template-columns: repeat(7, minmax(28px, 1fr)); gap: var(--gap-xxs); align-items: center; }
.end, .end-sum { text-align: center; padding: 4px 6px; border:1px solid #cbd5e1; border-radius: 8px; background:#fff; font-variant-numeric: tabular-nums; }
.end { font-size: 13px; }
.end-sum { font-weight: 800; }

/* Reduce overall whitespace */
.card h2, .card h3 { margin: 4px 0 6px; }
.crumbs { margin-bottom: 8px; }
header h1 { margin: 0 0 4px; font-size: 18px; }
.muted { color:#64748b; }
.footer { padding: 8px 0; font-size: 12px; color:#94a3b8; text-align: center; }

.button{ cursor:pointer; }
