:root {
  color-scheme: light;
  --ink: #142236;
  --subdued: #526174;
  --ink-blue: #213b65;
  --navy: #101e34;
  --paper: #fff;
  --canvas: #f3f5f8;
  --rule: #dce3ed;
  --focus: #235bc2;
  font: 16px/1.6 "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.35; }
h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.025em; }
h2 { font-size: 1.12rem; }
a { color: #245293; text-underline-offset: .2em; }
a:hover { color: #123673; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font: 600 1.02rem/1.25 system-ui, sans-serif;
  color: inherit;
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: inherit; }
.brand b { font-weight: 400; color: inherit; opacity: .75; }
.brand small {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .11em;
  border-left: 1px solid currentColor;
  margin-left: .1rem;
  padding-left: .65rem;
}
.mark {
  background: currentColor;
  display: inline-block;
  width: 1.55rem;
  height: 1.03rem;
  clip-path: polygon(0 100%, 43% 5%, 58% 5%, 100% 100%, 67% 61%, 59% 48%, 51% 63%, 42% 48%, 33% 61%);
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 1.1fr) minmax(27rem, 1fr);
  min-height: 100svh;
  background: var(--paper);
}
.auth-aside {
  color: #f6f8fc;
  position: relative;
  background-color: var(--navy);
  background-image: linear-gradient(180deg, #0b1728a6, #0b172803 38%, #0b17284a), url("/assets/fuji.webp");
  background-size: cover;
  background-position: center;
}
.aside-brand { padding: clamp(1.8rem, 4vw, 3.5rem); }
.auth-side { display: grid; place-items: center; padding: 2.5rem; }
.auth-content { width: min(100%, 25rem); }
.auth-content h1 { margin-bottom: .95rem; }
.auth-content form { margin-top: 1.6rem; }
.auth-content form button { width: 100%; margin-top: .3rem; }
.auth-link { font-size: .9rem; margin-top: 1.5rem; color: var(--subdued); }
form { display: grid; align-content: start; gap: .95rem; margin: 0; }
form[hidden], [hidden] { display: none; }
label { display: grid; gap: .38rem; color: var(--ink); font-weight: 650; font-size: .9rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #bdc9da;
  border-radius: .45rem;
  padding: .56rem .72rem;
  color: var(--ink);
  background-color: var(--paper);
  font-size: 1rem;
  font-weight: 400;
}
input[readonly] { background: #f8faff; }
textarea { resize: vertical; }
select { cursor: pointer; }
button {
  justify-self: start;
  min-height: 2.65rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  padding: .48rem 1.05rem;
  background: var(--ink-blue);
  color: white;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
button:hover { background: #182e54; }
button.secondary { background: white; color: var(--ink-blue); border-color: #c3cede; }
button.secondary:hover { background: #edf2f9; }
button.compact { min-height: 2rem; padding: .35rem .65rem; font-size: .82rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.hint { margin-top: -.7rem; color: var(--subdued); font-size: .82rem; }
.intro { color: var(--subdued); margin: .35rem 0 .9rem; font-size: .92rem; }
.short { max-width: 11rem; }
.site-header { background: var(--navy); color: white; }
.header-inner, .nav-inner, .workspace { width: min(calc(100% - 3rem), 75rem); margin: 0 auto; }
.header-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header .secondary { color: #e5ecf8; background: transparent; border-color: #677891; }
.site-header .secondary:hover { background: #243753; }
.site-header nav { border-top: 1px solid #35445a; }
.nav-inner { display: flex; flex-wrap: wrap; column-gap: 1.6rem; }
.nav-inner a { padding: .72rem .05rem .62rem; color: #d2dceb; font-size: .9rem; text-decoration: none; border-bottom: 3px solid transparent; }
.nav-inner a:hover, .nav-inner a[aria-current] { color: white; border-color: #91b6f3; }
.workspace { padding: 2.5rem 0 4rem; }
.page-heading { margin-bottom: 1.3rem; }
.page-heading p { margin-top: .5rem; color: var(--subdued); }
.panel, .table-frame, .empty {
  border: 1px solid var(--rule);
  border-radius: .7rem;
  background: var(--paper);
}
.panel { padding: clamp(1rem, 2.5vw, 1.6rem); margin-bottom: 1rem; min-width: 0; }
.panel h2 { margin-bottom: .8rem; }
.panel .table-frame { border-radius: .5rem; }
.panel .empty { background: var(--canvas); border: 0; }
.editor { max-width: 46rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; }
.inline-form input { min-width: min(14rem, 100%); }
.inline-form label { min-width: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.35rem 0; }
.notice { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid #bfdacc; border-radius: .48rem; background: #eaf6ef; color: #124b2d; overflow-wrap: anywhere; }
.notice p { margin-top: .55rem; }
.notice.warning { background: #fff4e7; border-color: #ecd0ac; color: #733c07; }
.table-frame { max-width: 100%; overflow: auto; }
table { width: 100%; border-spacing: 0; text-align: left; font-size: .9rem; }
th, td { padding: .75rem .9rem; border-bottom: 1px solid var(--rule); }
thead th { background: #edf1f7; white-space: nowrap; color: #3f506a; font-weight: 700; }
tbody th { background: var(--paper); font-weight: 650; }
tbody tr:last-child > * { border-bottom: 0; }
td, th[scope="row"], dd { overflow-wrap: anywhere; }
.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.payout-table th:first-child { position: sticky; left: 0; min-width: 9rem; max-width: 14rem; border-right: 1px solid var(--rule); }
.payout-table td { white-space: nowrap; }
.empty { padding: 1rem; color: var(--subdued); }
.table-frame + .empty { margin-top: .75rem; }
.filters, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .8rem 0; }
.filters a, .pagination a { text-decoration: none; border: 1px solid var(--rule); background: white; border-radius: .44rem; padding: .4rem .68rem; font-size: .9rem; }
.filters a[aria-current] { background: var(--ink-blue); color: white; border-color: var(--ink-blue); }
.filters span { margin-left: .25rem; }
.badge { display: inline-block; white-space: nowrap; padding: .15rem .55rem; border-radius: 1rem; font-size: .79rem; font-weight: 700; color: #254b70; background: #e8f0f9; }
.badge.pending { background: #fff0d9; color: #734500; }
.badge.active { background: #e4f4e9; color: #1c6038; }
.badge.gold { background: #f7ecd3; color: #694c0f; }
.badge.vip { background: #ede7fb; color: #4c3476; }
.back { display: inline-block; margin-bottom: .8rem; }
.detail-grid, .member-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; align-items: start; }
.details { margin: 0; }
.details div { padding: .52rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(8rem, 30%) minmax(0, 1fr); gap: .45rem; }
.details div:last-child { border-bottom: 0; }
dt { font-size: .85rem; color: var(--subdued); }
dd { margin: 0; }
.member-banner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.4rem;
  margin-bottom: 1rem;
  min-height: 13rem;
  color: white;
  border-radius: .75rem;
  padding: clamp(1.2rem, 4vw, 2.5rem);
  background: linear-gradient(90deg, #0b1b33f5, #15294597), var(--navy) url("/assets/fuji.webp") center 45% / cover;
}
.member-banner h1 { margin: .6rem 0 0; overflow-wrap: anywhere; }
.pending-banner p { margin-top: .8rem; }
.latest { text-align: right; white-space: nowrap; }
.latest span { display: block; font-size: .88rem; }
.latest strong { font: 650 clamp(1.65rem, 4vw, 2.6rem)/1.3 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.latest small { margin-left: .35rem; }
.benefits { margin: 0; padding-left: 1.2rem; }
.benefits li { padding: .28rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .auth-layout { display: block; }
  .auth-aside { min-height: 9.5rem; background-position: center 42%; }
  .aside-brand { padding: 1.2rem 1.5rem; }
  .auth-side { padding: 1.5rem 1.25rem 2.5rem; }
  .workspace, .header-inner, .nav-inner { width: calc(100% - 2rem); }
  .workspace { padding-top: 1.5rem; }
  .header-inner { min-height: 3.7rem; }
  .nav-inner { gap: 0 .9rem; }
  .nav-inner a { font-size: .82rem; }
  .detail-grid, .member-grid { grid-template-columns: minmax(0, 1fr); }
  .member-banner { align-items: start; flex-direction: column; }
  .latest { text-align: left; }
}
