:root {
  --coral: #f54343;
  --coral-dark: #d9343b;
  --burgundy: #8a1f2d;
  --pink: #ffe7e7;
  --charcoal: #22252a;
  --sand: #f2e7d8;
  --cream: #fbf7f2;
  --white: #fff;
  --muted: #666b73;
  --border: #e8ddd4;
  --green: #176b52;
  --shadow: 0 24px 64px rgba(34, 37, 42, .12);
  --font: Inter, "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--charcoal); background: var(--cream); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--burgundy); text-underline-offset: 3px; }
button, input, select { font: inherit; }
.shell { width: min(calc(100% - 40px), 1160px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 9px 13px; color: #fff; background: var(--charcoal); transform: translateY(-140%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid rgba(138, 31, 45, .1); background: rgba(251, 247, 242, .94); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--charcoal); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 8px 20px rgba(245, 67, 67, .2); }
.brand span { display: grid; line-height: 1.15; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .76rem; }
nav { display: flex; align-items: center; gap: 18px; }
nav form { margin: 0; }
.user-name { max-width: 220px; overflow: hidden; font-size: .84rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.link-button { padding: 0; color: var(--burgundy); border: 0; background: none; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.main { min-height: calc(100vh - 170px); padding-block: 70px 96px; }
h1, h2, h3 { margin-top: 0; line-height: 1.06; letter-spacing: -.04em; }
h1 { margin-bottom: 22px; font-size: clamp(2.7rem, 6vw, 5rem); }
h2 { margin-bottom: 20px; font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { margin-bottom: 14px; font-size: 1.55rem; }
p { color: var(--muted); }
.eyebrow { margin: 0 0 14px; color: var(--coral); font-size: .76rem; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; color: #fff; border: 0; border-radius: 999px; background: var(--coral); box-shadow: 0 12px 26px rgba(245, 67, 67, .2); font-weight: 900; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--coral-dark); }
.button-small { min-height: 42px; padding-inline: 17px; font-size: .84rem; }
.button-secondary { color: var(--charcoal); border: 1px solid var(--border); background: #fff; box-shadow: none; }
.button-secondary:hover { color: #fff; background: var(--charcoal); }
.button-danger { background: var(--burgundy); box-shadow: none; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .75fr); align-items: center; gap: 84px; min-height: 620px; }
.auth-intro { position: relative; }
.auth-intro::before { content: "静"; position: absolute; z-index: -1; top: -180px; left: -70px; color: rgba(245, 67, 67, .06); font-size: 24rem; font-weight: 900; line-height: 1; }
.auth-intro p:not(.eyebrow) { max-width: 620px; font-size: 1.12rem; }
.auth-card, .panel, .empty-state { padding: 34px; border: 1px solid var(--border); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.auth-card-centered { max-width: 650px; margin: 50px auto; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > span { font-size: .84rem; font-weight: 850; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 13px; color: var(--charcoal); border: 1px solid #d8cec6; border-radius: 12px; background: #fff; }
.field input:focus, .field select:focus { outline: 3px solid rgba(245, 67, 67, .18); border-color: var(--coral); }
.field small { color: var(--muted); font-size: .72rem; }
.password-control { display: flex; gap: 8px; align-items: stretch; }
.password-control input { min-width: 0; flex: 1; }
.password-toggle { flex: 0 0 auto; min-height: 48px; padding: 0 14px; color: var(--charcoal); border: 1px solid #d8cec6; border-radius: 12px; background: #fff; font-weight: 800; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { border-color: var(--coral); outline: 3px solid rgba(245, 67, 67, .18); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 8px 0 22px; color: var(--muted); font-size: .78rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--coral); }
.auth-card .button { width: 100%; }
.form-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 22px; font-size: .8rem; font-weight: 800; }
.stack { display: grid; }
.alert { margin: 0 0 24px; padding: 14px 17px; border-radius: 13px; font-size: .87rem; }
.alert strong { display: block; }
.alert-error { color: #7e1b2a; border: 1px solid #efb9c1; background: #fff0f2; }
.alert-success { color: #145b46; border: 1px solid #a7d7c8; background: #edfaf5; }
.alert-info { color: #54421b; border: 1px solid #dbc99f; background: #fff9e9; }
.alert-detail { margin-top: 8px; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: .76rem; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 76px; }
.dashboard-heading h1 { margin-bottom: 12px; }
.dashboard-heading p { max-width: 720px; margin-bottom: 0; }
.account-chip { min-width: 280px; display: grid; gap: 5px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 17px; background: #fff; }
.account-chip span { color: var(--green); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.account-chip strong { overflow-wrap: anywhere; font-size: .84rem; }
.section-heading { margin-bottom: 26px; }
.section-heading h2 { margin-bottom: 0; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.product-card { position: relative; min-height: 360px; padding: 34px; overflow: hidden; border-radius: 28px; color: #fff; background: var(--charcoal); box-shadow: var(--shadow); }
.product-card h3 { position: relative; z-index: 1; color: #fff; font-size: 2rem; }
.product-card > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 480px; color: rgba(255, 255, 255, .68); }
.product-card .button { position: absolute; z-index: 1; bottom: 34px; left: 34px; }
.product-mark { position: absolute; right: 20px; bottom: -40px; color: rgba(245, 67, 67, .13); font-size: 14rem; font-weight: 950; line-height: 1; }
.product-mark span { position: absolute; right: 8px; bottom: 24px; font-size: 1.1rem; }
.empty-state { box-shadow: none; }
.empty-state strong { font-size: 1.12rem; }
.empty-state p { max-width: 760px; }
.back-link { display: inline-block; margin-bottom: 40px; font-weight: 850; }
.product-hero { max-width: 920px; margin-bottom: 72px; }
.product-hero p:not(.eyebrow) { max-width: 740px; font-size: 1.12rem; }
.resource-list { display: grid; gap: 13px; }
.resource-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 22px 24px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.resource-card p { margin: 5px 0; }
.resource-card small { color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 24px; }
.panel { box-shadow: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.table-panel { margin-top: 24px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: .84rem; }
td strong, td small { display: block; }
td small { margin-top: 5px; color: var(--muted); }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--sand); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.status-active { color: var(--green); background: #e5f7f0; }
.status-suspended { color: var(--burgundy); background: var(--pink); }
.status-paid { color: var(--green); background: #e5f7f0; }
.status-pending, .status-partially_refunded { color: #7a5200; background: #fff3cd; }
.status-refunded, .status-disputed, .status-failed { color: var(--burgundy); background: var(--pink); }
.site-footer { padding: 28px 0; color: rgba(255, 255, 255, .7); background: #17191d; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; font-size: .78rem; }
.footer-inner a { color: #fff; }
@media (max-width: 850px) {
  .auth-layout { grid-template-columns: 1fr; gap: 44px; }
  .auth-intro::before { font-size: 17rem; }
  .product-grid, .admin-grid { grid-template-columns: 1fr; }
  .dashboard-heading { align-items: start; flex-direction: column; gap: 24px; }
  .account-chip { width: 100%; min-width: 0; }
}
@media (max-width: 600px) {
  .shell { width: min(calc(100% - 28px), 1160px); }
  .header-inner { min-height: 70px; }
  .brand strong { font-size: .8rem; }
  .brand small, .user-name, nav > a { display: none; }
  .main { padding-block: 48px 72px; }
  .auth-card, .panel, .empty-state, .product-card { padding: 25px 21px; border-radius: 22px; }
  .product-card .button { left: 21px; bottom: 25px; }
  .resource-card { align-items: stretch; flex-direction: column; }
  .resource-card .button { width: 100%; }
}
