:root {
    --ink: #17201d;
    --muted: #68726e;
    --paper: #f3f1eb;
    --surface: #fffefa;
    --line: #d9d7cf;
    --accent: #9c7743;
    --accent-dark: #75542c;
    --sage: #dce3dc;
    --danger: #a4443d;
    --success: #2e6d51;
    --shadow: 0 24px 70px rgba(23, 32, 29, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(156, 119, 67, .10), transparent 28rem),
        var(--paper);
    font-family: "Yu Gothic", "Hiragino Sans", system-ui, sans-serif;
    line-height: 1.65;
}
a { color: inherit; }
button, input { font: inherit; }
button, .button { touch-action: manipulation; }

.skip-link {
    position: fixed;
    top: -5rem;
    left: 1rem;
    z-index: 50;
    padding: .7rem 1rem;
    background: var(--ink);
    color: white;
}
.skip-link:focus { top: 1rem; }

.site-header {
    display: flex;
    align-items: center;
    min-height: 84px;
    padding: 0 clamp(1.25rem, 4vw, 4.5rem);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    text-decoration: none;
    letter-spacing: .12em;
}
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font: 600 .75rem Georgia, serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font: 600 .83rem Georgia, serif; }
.brand small { color: var(--muted); font-size: .58rem; letter-spacing: .26em; }

main { min-height: calc(100vh - 160px); }
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 4.5rem);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .75rem;
}

.welcome-shell, .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .7fr);
    gap: clamp(2rem, 7vw, 8rem);
    align-items: center;
    width: min(1180px, calc(100% - 2.5rem));
    min-height: calc(100vh - 180px);
    margin: 0 auto;
    padding: 3rem 0 6rem;
}
.eyebrow {
    margin: 0 0 1rem;
    color: var(--accent-dark);
    font: 700 .69rem/1.4 system-ui, sans-serif;
    letter-spacing: .2em;
}
.welcome-copy h1, .auth-copy h1 {
    max-width: 760px;
    margin: 0;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
    font-size: clamp(2.5rem, 5.7vw, 5.75rem);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.12;
}
.welcome-copy .lead, .auth-copy > p:last-child {
    max-width: 620px;
    margin: 2rem 0 0;
    color: var(--muted);
    font-size: 1rem;
}
.welcome-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.4rem; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: .75rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}
.button-primary { border-color: var(--ink); background: var(--ink); color: white; }
.button-primary:hover { background: #29332f; }
.button-secondary { border-color: var(--ink); background: transparent; }
.button-full { width: 100%; }

.welcome-panel, .auth-card {
    border: 1px solid rgba(23, 32, 29, .12);
    background: rgba(255, 254, 250, .84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.welcome-panel { padding: clamp(1.6rem, 4vw, 3.2rem); }
.panel-number { color: var(--accent); font: italic 2rem Georgia, serif; }
.welcome-panel h2 { margin: 2.5rem 0 .6rem; font: 500 1.45rem "Yu Mincho", serif; }
.welcome-panel > p { color: var(--muted); }
.mini-spec { margin: 2.5rem 0 0; }
.mini-spec div { display: flex; justify-content: space-between; padding: .85rem 0; border-top: 1px solid var(--line); }
.mini-spec dt { color: var(--muted); }
.mini-spec dd { margin: 0; font-weight: 700; }

.auth-shell { grid-template-columns: minmax(0, .9fr) minmax(340px, 480px); }
.auth-card { padding: clamp(1.5rem, 4vw, 3.2rem); }
.auth-heading { margin-bottom: 1.8rem; }
.section-index { color: var(--accent); font: 700 .65rem system-ui; letter-spacing: .18em; }
.auth-heading h2 { margin: .5rem 0; font: 500 1.8rem "Yu Mincho", serif; }
.auth-heading p { margin: 0; color: var(--muted); font-size: .87rem; }
.stack-form { display: grid; gap: 1.15rem; }
.stack-form label > span { display: block; margin-bottom: .42rem; font-size: .79rem; font-weight: 700; }
.stack-form input[type="text"], .stack-form input[type="password"] {
    width: 100%;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    padding: 0 .9rem;
    outline: none;
}
.stack-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(156, 119, 67, .14); }
.check-field { display: flex; align-items: center; gap: .55rem; color: var(--muted); }
.check-field span { margin: 0 !important; font-weight: 500 !important; }
.check-field input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-error, .flash, .status-banner {
    margin-bottom: 1rem;
    border-left: 3px solid var(--danger);
    background: #f7e8e5;
    padding: .8rem 1rem;
    color: #77322d;
    font-size: .84rem;
}
.form-note { margin: 1rem 0; color: var(--muted); font-size: .75rem; }
.text-link { display: inline-block; margin-top: .5rem; color: var(--muted); font-size: .8rem; }

.dashboard, .member-page { width: min(1480px, calc(100% - 2.5rem)); margin: 0 auto; padding: 1rem 0 5rem; }
.dashboard-topbar, .member-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dashboard-topbar h1, .member-topbar h1 { margin: 0; font: 500 clamp(2rem, 4vw, 3.4rem) "Yu Mincho", serif; }
.account-chip { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 1rem; }
.account-chip > span { font-weight: 700; }
.account-chip small { color: var(--muted); }
.account-chip form { grid-column: 2; }
.account-chip button, .text-button { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .72rem; text-decoration: underline; }
.dashboard-tabs { display: flex; gap: 1.6rem; overflow-x: auto; border-bottom: 1px solid var(--line); }
.dashboard-tabs a, .dashboard-tabs span { flex: 0 0 auto; padding: .8rem 0; color: var(--muted); text-decoration: none; font-size: .82rem; }
.dashboard-tabs .is-active { border-bottom: 2px solid var(--ink); color: var(--ink); font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1rem; margin-top: 1rem; }
.calendar-placeholder { min-height: 540px; border: 1px solid var(--line); background: var(--surface); }
.calendar-toolbar { display: flex; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: var(--success); }
.calendar-toolbar time { color: var(--muted); font-size: .83rem; }
.calendar-empty { display: grid; min-height: 470px; place-content: center; justify-items: center; padding: 2rem; text-align: center; }
.calendar-glyph { display: grid; width: 74px; height: 74px; place-items: center; border: 1px solid var(--line); font: 500 1.7rem Georgia, serif; }
.calendar-empty h2 { margin: 1.5rem 0 .4rem; font: 500 1.35rem "Yu Mincho", serif; }
.calendar-empty p { max-width: 510px; margin: 0; color: var(--muted); font-size: .86rem; }
.dashboard-aside { display: grid; align-content: start; gap: 1rem; }
.dashboard-aside article { border: 1px solid var(--line); background: var(--surface); padding: 1.2rem; }
.dashboard-aside span { display: block; color: var(--muted); font-size: .7rem; }
.dashboard-aside strong { display: block; margin: .25rem 0; font: 500 1.3rem "Yu Mincho", serif; }
.dashboard-aside p { margin: 0; color: var(--muted); font-size: .76rem; }

.member-number { margin: .2rem 0 0; color: var(--muted); letter-spacing: .08em; }
.status-banner { border-color: var(--accent); background: #f4ecdd; color: #6b502b; }
.member-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 2rem; background: var(--line); border: 1px solid var(--line); }
.member-summary article { min-height: 150px; background: var(--surface); padding: 1.3rem; }
.member-summary span, .member-summary small { display: block; color: var(--muted); font-size: .75rem; }
.member-summary strong { display: block; margin: .5rem 0; font: 500 2.1rem Georgia, serif; }
.empty-bookings { margin-top: 1rem; min-height: 300px; border: 1px solid var(--line); background: var(--surface); padding: clamp(1.5rem, 5vw, 4rem); }
.empty-bookings h2 { margin: 0; font: 500 1.5rem "Yu Mincho", serif; }
.empty-bookings > p:last-child { color: var(--muted); }
.message-page { width: min(700px, calc(100% - 2.5rem)); margin: 12vh auto; text-align: center; }
.message-page h1 { font: 500 2.5rem "Yu Mincho", serif; }

@media (max-width: 820px) {
    .site-header { min-height: 68px; }
    .welcome-shell, .auth-shell { grid-template-columns: 1fr; min-height: auto; padding: 3rem 0 4rem; }
    .welcome-copy h1, .auth-copy h1 { font-size: clamp(2.55rem, 13vw, 4.5rem); }
    .auth-copy { padding: 1rem 0; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-aside { grid-template-columns: repeat(3, 1fr); }
    .member-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .site-footer { display: none; }
    .brand strong { font-size: .75rem; }
    .welcome-actions { display: grid; }
    .welcome-actions .button { width: 100%; }
    .welcome-panel, .auth-card { margin-inline: -.25rem; }
    .dashboard, .member-page { width: min(100% - 1.5rem, 1480px); }
    .dashboard-topbar, .member-topbar { align-items: flex-start; }
    .account-chip { text-align: right; }
    .dashboard-aside { grid-template-columns: 1fr; }
    .calendar-toolbar { align-items: flex-start; gap: .5rem; flex-direction: column; }
    .member-summary { grid-template-columns: 1fr 1fr; }
    .member-summary article { min-height: 130px; padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Phase 2 master settings */
.master-page { padding-bottom: 8rem; }
.master-page input,
.master-page select,
.master-page textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    padding: .55rem .7rem;
    outline: none;
}
.master-page textarea { min-height: 86px; resize: vertical; }
.master-page input:focus,
.master-page select:focus,
.master-page textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(156, 119, 67, .13);
}
.master-page label > span {
    display: block;
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}
.master-page .check-field { min-height: 44px; }
.master-page .check-field input { width: 18px; min-height: 18px; }
.master-page .check-field > span { display: inline; margin: 0; }
.back-link { display: inline-block; margin-bottom: .8rem; color: var(--muted); font-size: .78rem; }
.count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0 1rem;
    background: var(--surface);
    color: var(--muted);
    font-size: .78rem;
}
.master-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: 2.8rem 0 1.5rem;
}
.master-intro h2 { margin: 0; font: 500 1.55rem "Yu Mincho", serif; }
.master-intro p { margin: .4rem 0 0; color: var(--muted); font-size: .85rem; }
.store-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.store-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 1rem;
    min-height: 210px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 1.25rem;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease;
}
.store-card:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(23, 32, 29, .08); }
.store-card.is-disabled { opacity: .62; }
.store-card-code {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font: 500 1.05rem Georgia, serif;
}
.store-card h3 { margin: .5rem 0 .2rem; font: 500 1.35rem "Yu Mincho", serif; }
.store-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.store-card dl { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; margin: auto 0 0; border-top: 1px solid var(--line); }
.store-card dl div { display: flex; justify-content: space-between; padding-top: .8rem; }
.store-card dt { color: var(--muted); font-size: .68rem; }
.store-card dd { margin: 0; font-size: .74rem; font-weight: 700; }
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 99px;
    background: #e6e4de;
    padding: 0 .65rem;
    color: var(--muted);
    font-size: .65rem;
    font-weight: 700;
}
.status-pill.status-active { background: #dfece4; color: var(--success); }
.master-section {
    margin-top: 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: clamp(1.3rem, 3.2vw, 2.4rem);
    scroll-margin-top: 1rem;
}
.master-section > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.master-section > header h2 { margin: 0; font: 500 1.45rem "Yu Mincho", serif; }
.master-section > header p:last-child { max-width: 560px; margin: 0; color: var(--muted); font-size: .78rem; }
.compact-section { margin-top: 2rem; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; margin-top: .4rem; }
.read-only-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); }
.read-only-grid > div { background: var(--paper); padding: 1rem; }
.read-only-grid dt { color: var(--muted); font-size: .7rem; }
.read-only-grid dd { margin: .3rem 0 0; font-weight: 700; }
.anchor-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid var(--line);
    background: rgba(243, 241, 235, .94);
    padding: .7rem 1rem;
    backdrop-filter: blur(10px);
}
.anchor-nav a { flex: 0 0 auto; color: var(--muted); font-size: .72rem; text-decoration: none; }
.media-settings { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, .6fr); gap: 1.5rem; align-items: center; }
.seat-map-preview {
    display: grid;
    min-height: 260px;
    place-items: center;
    border: 1px dashed var(--line);
    background: var(--paper);
    color: var(--muted);
    font-size: .8rem;
    overflow: hidden;
}
.seat-map-preview img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.editable-list { display: grid; gap: .65rem; }
.inline-edit-row,
.price-row,
.override-row,
.rule-edit-row {
    display: flex;
    align-items: end;
    gap: .65rem;
    border: 1px solid var(--line);
    background: #fbfaf6;
    padding: .8rem;
}
.inline-edit-row label { min-width: 100px; }
.inline-edit-row .row-grow,
.price-row .row-grow { flex: 1; min-width: 180px; }
.inline-edit-row .button,
.price-row .button,
.override-row .button,
.rule-edit-row .button { flex: 0 0 auto; min-height: 44px; }
.is-new { border-style: dashed; background: #f5f2e9; }
.hours-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hours-row {
    display: grid;
    grid-template-columns: 70px repeat(2, minmax(110px, .7fr)) repeat(2, minmax(120px, .7fr));
    gap: .8rem;
    align-items: center;
    background: #fff;
    padding: .75rem 1rem;
}
.hours-row strong { font-family: "Yu Mincho", serif; }
.holiday-row { flex-wrap: wrap; }
.rule-edit-row { display: grid; grid-template-columns: 110px 90px 145px 105px 105px 90px 110px 76px 90px auto; align-items: center; }
.rule-edit-row .check-field { min-width: 76px; }
.date-filter { display: flex; gap: .65rem; max-width: 360px; margin-bottom: 1rem; }
.presence-list { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.presence-list > div { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; background: #fff; padding: .9rem 1rem; }
.presence-list time { font: 500 1.15rem Georgia, serif; }
.presence-list span, .presence-list small { color: var(--muted); font-size: .74rem; }
.empty-master { grid-column: 1 / -1; min-height: 130px; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--muted); font-size: .8rem; }
.plan-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.master-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.master-table th, .master-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .78rem; }
.master-table th { background: #ece9e1; color: var(--muted); font-size: .68rem; }
.master-table td strong, .master-table td small { display: block; }
.master-table td small { color: var(--muted); font-size: .64rem; }
.master-table tr:last-child td { border-bottom: 0; }
.master-table tr.is-muted { opacity: .58; }
.price-row { display: grid; grid-template-columns: minmax(130px, .75fr) repeat(3, 110px) minmax(180px, 1fr) 90px auto; }
.price-row > strong,
.override-row > strong { align-self: center; font-family: "Yu Mincho", serif; }
.price-row > strong small,
.override-row > strong small { display: block; color: var(--muted); font: 600 .62rem system-ui; letter-spacing: .12em; }
.override-row { display: grid; grid-template-columns: minmax(130px, .7fr) repeat(2, 95px) repeat(2, 105px) 120px 80px 90px 90px auto; }

@media (max-width: 1080px) {
    .store-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inline-edit-row,
    .price-row,
    .override-row,
    .rule-edit-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
    .inline-edit-row .row-grow,
    .price-row .row-grow { min-width: 0; }
    .inline-edit-row .button,
    .price-row .button,
    .override-row .button,
    .rule-edit-row .button { width: 100%; }
}

@media (max-width: 700px) {
    .master-section > header { align-items: flex-start; flex-direction: column; }
    .store-card-grid,
    .form-grid,
    .form-grid-4,
    .read-only-grid,
    .media-settings { grid-template-columns: 1fr; }
    .hours-row { grid-template-columns: 54px 1fr 1fr; }
    .hours-row .check-field { grid-column: auto; }
    .inline-edit-row,
    .price-row,
    .override-row,
    .rule-edit-row { grid-template-columns: 1fr; }
    .presence-list > div { grid-template-columns: 1fr; gap: .2rem; }
    .anchor-nav { margin-inline: -.75rem; }
}

/* Minimal monochrome interface */
:root {
    --ink: #111;
    --muted: #666;
    --paper: #fff;
    --surface: #fff;
    --line: #d8d8d8;
    --accent: #111;
    --accent-dark: #111;
    --sage: #f2f2f2;
    --danger: #111;
    --success: #111;
    --shadow: none;
}

html, body { background: #fff; }
body {
    background-image: none;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", "Hiragino Sans", sans-serif;
    line-height: 1.5;
}

.site-header {
    min-height: 56px;
    border-bottom: 1px solid #ddd;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.brand { gap: .65rem; letter-spacing: 0; }
.brand strong { font: 700 .95rem/1 system-ui, sans-serif; }
.brand > span { border-left: 1px solid #ccc; padding-left: .65rem; color: #666; font-size: .72rem; }
.brand-mark, .brand small { display: none; }
.site-logo { display: block; width: 170px; height: 42px; object-fit: contain; }
.site-footer { justify-content: flex-start; padding: 1rem clamp(1rem, 3vw, 2.5rem); font-size: .7rem; }

.eyebrow, .section-index { display: none; }
h1, h2, h3,
.dashboard-topbar h1, .member-topbar h1,
.calendar-day-summary h2, .calendar-selection-panel h2, .calendar-side-section h2,
.empty-bookings h2, .message-page h1 {
    font-family: inherit;
    letter-spacing: 0;
}
.dashboard-topbar h1, .member-topbar h1 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; }

.welcome-shell, .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
    align-content: center;
    gap: 1.5rem;
    width: min(100% - 2rem, 520px);
    min-height: calc(100vh - 120px);
    padding: 3rem 0;
}
.welcome-shell {
    grid-template-columns: 1fr;
    width: min(1080px, calc(100% - 2rem));
    min-height: calc(100vh - 120px);
    gap: 2rem;
}
.home-logo {
    display: block;
    width: min(520px, 78vw);
    height: auto;
    margin: 0 auto;
}
.reservation-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.reservation-choice-card {
    display: grid;
    min-height: 220px;
    place-items: center;
    border: 1px solid #bbb;
    background: #fff;
    padding: 2rem;
    color: #111;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.reservation-choice-card:hover,
.reservation-choice-card:focus-visible { border-color: #111; background: #f5f5f5; }
.reservation-choice-card strong { font-size: clamp(1rem, 1.8vw, 1.25rem); line-height: 1.7; }
.welcome-shell > .staff-entry { justify-self: center; }
.welcome-copy h1 { margin: 0 0 2rem; font: 700 2rem/1.2 inherit; }
.welcome-actions { display: grid; margin: 0; }
.welcome-actions .button, .welcome-actions .text-button { width: 100%; min-height: 48px; }
.staff-entry { color: #666; font-size: .75rem; text-align: center; }
.auth-card, .welcome-panel {
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
}
.auth-card { padding: clamp(1.5rem, 5vw, 2.5rem); }
.auth-heading { margin-bottom: 1.5rem; }
.auth-heading h1 { margin: 0; font-size: 1.35rem; }
.auth-heading p { margin-top: .6rem; }

.button { min-height: 44px; border-radius: 0; box-shadow: none; }
.button-primary { border-color: #111; background: #111; color: #fff; }
.button-primary:hover { background: #333; }
.button-secondary { border-color: #aaa; background: #fff; color: #111; }
input, select, textarea,
.stack-form input[type="text"], .stack-form input[type="password"] {
    border-color: #bbb;
    border-radius: 0;
    background: #fff;
}
input:focus, select:focus, textarea:focus, .stack-form input:focus {
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
}

.dashboard, .member-page { width: min(1600px, calc(100% - 2rem)); padding-top: 1.5rem; }
.dashboard-tabs { gap: 0; border-color: #ccc; }
.dashboard-tabs a, .dashboard-tabs span { padding: .75rem 1rem; }
.dashboard-tabs .is-active { border-bottom-color: #111; background: #f5f5f5; }
.calendar-toolbar, .master-section, .calendar-day-summary, .calendar-selection-panel,
.calendar-side-section, .audit-filter, .manual-booking-form, .member-timeline-section,
.member-seat-map, .member-booking-section, .empty-bookings {
    border-color: #ccc;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.admin-calendar-grid { background: #d5d5d5; }
.admin-calendar-corner, .admin-calendar-time, .admin-calendar-seat { background: #f3f3f3; color: #555; }
.admin-calendar-cell { background: #fff; }
.admin-calendar-cell.is-busy { background: #eee; }
.admin-calendar-cell.is-selected, .admin-calendar-cell.is-drop-target {
    background: #ddd;
    box-shadow: inset 0 0 0 2px #111;
}
.admin-booking-card,
.admin-booking-card.is-first,
.admin-booking-card.is-day_use,
.admin-booking-card.is-pending,
.admin-booking-card.is-checked-in {
    border: 1px solid #111;
    border-left-width: 3px;
    border-radius: 0;
    background: #fff;
    color: #111;
    box-shadow: none;
}
.admin-booking-card.is-pending { background: #eee; border-style: dashed; }
.admin-booking-card.is-checked-in { background: #111; color: #fff; }
.admin-booking-card.is-block { background: repeating-linear-gradient(135deg, #222 0 4px, #fff 4px 8px); color: #111; text-shadow: 0 0 2px #fff; }
.admin-booking-card.is-completed { opacity: .42; }
.unchecked-alert, .status-banner, .form-error, .flash, .flash-success, .flash-error {
    border-color: #111;
    background: #f3f3f3;
    color: #111;
}
.status-pill, .staff-hour-chips span, .count-badge { border-color: #aaa; background: #fff; color: #111; }
.summary-stat-grid, .member-summary { background: #ccc; }
.summary-stat-grid div, .member-summary article { background: #fff; }
.color-settings { display: none; }

@media (max-width: 700px) {
    .site-header { min-height: 52px; }
    .dashboard, .member-page { width: min(100% - 1rem, 1600px); }
    .dashboard-tabs a, .dashboard-tabs span { padding-inline: .75rem; }
    .site-logo { width: 135px; height: 36px; }
    .welcome-shell { align-content: start; gap: 1.25rem; padding-top: 2rem; }
    .home-logo { width: min(420px, 92vw); }
    .reservation-choice-grid { grid-template-columns: 1fr; gap: .8rem; }
    .reservation-choice-card { min-height: 118px; padding: 1.25rem; }
}

/* Phase 7: staff calendar and audit log */
.calendar-page { max-width: none; padding-inline: clamp(.75rem, 2vw, 1.5rem); }
.calendar-topbar { align-items: end; }
.calendar-top-actions { display: flex; gap: .6rem; }
.calendar-toolbar { display: flex; align-items: end; gap: 1rem; margin: 1rem 0; border: 1px solid var(--line); background: var(--surface); padding: .8rem; }
.calendar-toolbar > label { min-width: 220px; }
.date-stepper { display: flex; align-items: end; gap: .35rem; }
.date-stepper > a { display: grid; width: 38px; height: 42px; place-items: center; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.admin-calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1rem; align-items: start; }
.admin-calendar-main { min-width: 0; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.calendar-legend span { padding: .35rem .55rem; border-radius: 999px; color: #fff; font-size: .6rem; }
.legend-member { background: var(--calendar-member); }.legend-first { background: var(--calendar-first); }.legend-day { background: var(--calendar-day-use); }.legend-pending { background: var(--calendar-pending); }.legend-checkin { background: var(--calendar-checked-in); }.legend-block { background: var(--calendar-block); }
.admin-calendar-scroll { overflow: auto; max-height: calc(100vh - 250px); min-height: 500px; border: 1px solid var(--line); background: #fff; overscroll-behavior: contain; }
.admin-calendar-grid { display: grid; grid-template-columns: 88px repeat(48, 44px); grid-template-rows: 38px repeat(var(--seat-count), 54px); width: max-content; min-width: 100%; position: relative; background: var(--line); gap: 1px; user-select: none; }
.admin-calendar-corner, .admin-calendar-time, .admin-calendar-seat { position: sticky; z-index: 20; display: grid; place-items: center; background: #e9e6de; color: var(--muted); font-size: .6rem; }
.admin-calendar-corner { grid-row: 1; grid-column: 1; top: 0; left: 0; z-index: 30; }
.admin-calendar-time { grid-row: 1; grid-column: var(--column); top: 0; }
.admin-calendar-time.is-hour { color: var(--ink); font-weight: 800; }
.admin-calendar-seat { grid-row: var(--row); grid-column: 1; left: 0; color: var(--ink); font-weight: 800; }
.admin-calendar-cell { grid-row: var(--row); grid-column: var(--column); z-index: 1; border: 0; background: #fff; padding: 0; cursor: crosshair; touch-action: pan-x pan-y; }
.admin-calendar-cell.is-hour { box-shadow: inset 1px 0 rgba(30, 40, 36, .08); }
.admin-calendar-cell.is-busy { background: #f2f0eb; cursor: not-allowed; }
.admin-calendar-cell.is-selected { background: #dbeadf; box-shadow: inset 0 0 0 2px var(--accent); }
.admin-calendar-cell.is-drop-target { background: #cce3d4; box-shadow: inset 0 0 0 3px var(--accent); }
.admin-booking-card { grid-row: var(--row); grid-column: var(--column) / span var(--span); z-index: 5; align-self: stretch; overflow: hidden; border: 0; border-left: 3px solid rgba(255,255,255,.75); border-radius: 3px; background: var(--calendar-member); padding: .3rem .35rem; color: #fff; text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(20, 30, 26, .14); }
.admin-booking-card strong, .admin-booking-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-booking-card strong { font-size: .64rem; }.admin-booking-card span { margin-top: .15rem; font-size: .52rem; opacity: .84; }
.admin-booking-card.is-first { background: var(--calendar-first); }.admin-booking-card.is-day_use { background: var(--calendar-day-use); }.admin-booking-card.is-pending { background: var(--calendar-pending); }.admin-booking-card.is-checked-in { background: var(--calendar-checked-in); }.admin-booking-card.is-block { background: var(--calendar-block); }.admin-booking-card.is-completed { opacity: .48; }.admin-booking-card.is-dragging { opacity: .35; }
.color-settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; border: 1px solid var(--line); padding: 1rem; }.color-settings legend { padding: 0 .35rem; color: var(--muted); font-size: .68rem; }.color-settings label { display: grid; grid-template-columns: 1fr 54px; align-items: center; }.color-settings input { width: 54px; height: 36px; padding: 2px; }
.calendar-help { margin: .55rem 0 0; color: var(--muted); font-size: .62rem; }
.calendar-side-panel { position: sticky; top: 1rem; display: grid; gap: .75rem; max-height: calc(100vh - 2rem); overflow: auto; }
.calendar-day-summary, .calendar-selection-panel, .calendar-side-section { border: 1px solid var(--line); background: var(--surface); padding: 1rem; }
.calendar-day-summary header { display: flex; justify-content: space-between; align-items: end; margin-bottom: .8rem; }.calendar-day-summary h2, .calendar-selection-panel h2, .calendar-side-section h2 { margin: 0; font: 500 1.15rem "Yu Mincho", serif; }
.summary-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }.summary-stat-grid div { display: grid; gap: .1rem; background: var(--surface); padding: .65rem; }.summary-stat-grid span { color: var(--muted); font-size: .58rem; }.summary-stat-grid strong { font-size: 1.2rem; }
.unchecked-alert { margin-top: .7rem; background: #fff0c2; padding: .55rem; color: #76520a; font-size: .68rem; font-weight: 800; }
.calendar-selection-panel { border-top: 3px solid var(--ink); }.calendar-selection-panel.has-selection { border-top-color: var(--accent); }.calendar-selection-panel > p { color: var(--muted); font-size: .66rem; }.calendar-selection-panel dl { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .8rem 0; }.calendar-selection-panel dt { color: var(--muted); font-size: .56rem; }.calendar-selection-panel dd { margin: .1rem 0 0; font-size: .7rem; font-weight: 800; }
.calendar-side-section header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }.calendar-side-section header span { color: var(--muted); font-size: .62rem; }
.calendar-today-list { display: grid; }.calendar-today-list a { display: grid; grid-template-columns: 42px 1fr auto; gap: .5rem; border-top: 1px solid var(--line); padding: .55rem 0; color: inherit; text-decoration: none; }.calendar-today-list time, .calendar-today-list em { color: var(--muted); font-size: .58rem; font-style: normal; }.calendar-today-list span { overflow: hidden; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.staff-hour-chips { display: flex; flex-wrap: wrap; gap: .35rem; }.staff-hour-chips span { border: 1px solid var(--line); padding: .35rem .5rem; font-size: .62rem; }
.audit-filter { display: flex; align-items: end; gap: .75rem; margin: 1rem 0; border: 1px solid var(--line); background: var(--surface); padding: 1rem; }.audit-filter label { min-width: 180px; }
.audit-log-list details { border-top: 1px solid var(--line); }.audit-log-list summary { display: grid; grid-template-columns: 150px minmax(180px,1fr) 140px 50px; gap: .75rem; align-items: center; padding: .8rem 0; cursor: pointer; }.audit-log-list time, .audit-log-list span, .audit-log-list em { color: var(--muted); font-size: .65rem; font-style: normal; }.audit-log-list dl { margin: 0 0 1rem; background: #f4f2ec; padding: .8rem; }.audit-log-list dt { color: var(--muted); font-size: .6rem; }.audit-log-list dd { margin: .2rem 0 .65rem; overflow-wrap: anywhere; font-size: .68rem; }.audit-log-list pre { overflow: auto; white-space: pre-wrap; }.audit-pagination { display: flex; justify-content: space-between; margin-top: 1rem; }

@media (max-width: 980px) {
    .admin-calendar-layout { grid-template-columns: 1fr; }
    .calendar-side-panel { position: static; grid-template-columns: repeat(2, 1fr); max-height: none; overflow: visible; }
}
@media (max-width: 700px) {
    .calendar-topbar, .calendar-toolbar { align-items: stretch; flex-direction: column; }
    .calendar-top-actions { flex-direction: column; }.calendar-top-actions .button { width: 100%; }
    .calendar-toolbar > label { min-width: 0; }.date-stepper label { flex: 1; }
    .admin-calendar-scroll { max-height: 62vh; min-height: 420px; }
    .calendar-side-panel { grid-template-columns: 1fr; }
    .audit-filter { align-items: stretch; flex-direction: column; }.audit-filter label { min-width: 0; }
    .audit-log-list summary { grid-template-columns: 1fr auto; }.audit-log-list summary time, .audit-log-list summary span { grid-column: 1; }
}

.template-help { margin: 1rem 0; border: 1px solid var(--line); background: #f4f2ec; padding: 1rem; color: var(--muted); font-size: .68rem; line-height: 2; }
.template-help code { white-space: nowrap; color: var(--ink); }
.mail-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.mail-template-grid h2 { margin: 0; font: 500 1.25rem "Yu Mincho", serif; }
.mail-template-grid textarea { min-height: 260px; font-family: inherit; line-height: 1.6; }
.copy-reference { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .58rem; text-decoration: underline; }
.booking-note-form { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: end; }.booking-note-form textarea { min-height: 80px; }.booking-note-list { display: grid; gap: .5rem; margin-top: 1rem; }.booking-note-list article { border-left: 3px solid var(--line); background: #f4f2ec; padding: .75rem 1rem; }.booking-note-list p { margin: 0; font-size: .72rem; line-height: 1.7; }.booking-note-list footer, .empty-note { margin-top: .4rem; color: var(--muted); font-size: .6rem; }
.calendar-block-creator { margin-top: 1rem; }.calendar-block-creator > summary { cursor: pointer; font-weight: 800; }.block-admin-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(240px,1fr); gap: 1rem; margin-top: 1rem; }.active-block-list { border-left: 1px solid var(--line); padding-left: 1rem; }.active-block-list h3 { margin-top: 0; font: 500 1rem "Yu Mincho", serif; }.active-block-list article { display: flex; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); padding: .65rem 0; }.active-block-list article div { display: grid; }.active-block-list span { color: var(--muted); font-size: .62rem; }
.booking-block-page .active-block-list { border-left: 0; padding-left: 0; }.booking-block-page .active-block-list article div { gap: .2rem; }.booking-block-page .active-block-list small { color: var(--muted); font-size: .66rem; }
.booking-block-page .booking-block-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.25rem; border: 0; padding: 0; }.booking-block-page .booking-block-context > label { display: grid; gap: .4rem; min-width: 0; }.booking-block-page .booking-block-context > label > span { font-size: .68rem; font-weight: 800; }
.create-kind-switch { display: flex; align-items: center; gap: .5rem; margin: 1rem 0; border: 1px solid var(--line); background: var(--surface); padding: .75rem 1rem; font-size: .68rem; }.create-kind-switch span, .create-kind-switch a { border: 1px solid var(--line); padding: .4rem .65rem; color: inherit; text-decoration: none; }.create-kind-switch span { background: var(--ink); color: #fff; }
.account-list { display: grid; }.account-list a { display: grid; grid-template-columns: minmax(180px,1fr) 150px 60px; gap: 1rem; align-items: center; border-top: 1px solid var(--line); padding: .8rem 0; color: inherit; text-decoration: none; }.account-list a div { display: grid; }.account-list span, .account-list em { color: var(--muted); font-size: .66rem; font-style: normal; }
@media (max-width: 700px) { .mail-template-grid, .color-settings { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .booking-note-form { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .block-admin-grid { grid-template-columns: 1fr; }.active-block-list { border-left: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; } }

/* Phase 6: public guest applications and staff approval */
.staff-entry { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: 1.2rem; color: var(--muted); font-size: .68rem; }
.guest-shell { width: min(1040px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 0; }
.guest-hero { max-width: 760px; margin-bottom: 1.5rem; }
.guest-hero h1, .guest-complete h1 { margin: .35rem 0 .8rem; font: 500 clamp(2rem, 5vw, 4rem)/1.08 "Yu Mincho", serif; letter-spacing: -.04em; }
.guest-hero > p:last-child, .guest-complete .lead { color: var(--muted); line-height: 1.9; }
.guest-notice { display: grid; gap: .35rem; border-left: 4px solid var(--accent); background: #f0eee8; padding: 1rem 1.2rem; }
.guest-notice strong { font-size: .8rem; }
.guest-notice p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.8; }
.guest-store-picker { display: flex; align-items: end; gap: .75rem; margin: 1.5rem 0 1rem; border: 1px solid var(--line); background: var(--surface); padding: 1rem; }
.guest-store-picker.is-joined { margin-bottom: 0; border-bottom: 0; }
.guest-store-picker.is-joined + .guest-application-form > .guest-form-section:first-child { border-top: 0; }
.guest-store-picker label { min-width: min(100%, 360px); }
.guest-application-form { display: grid; gap: 1rem; }
.guest-form-section { border: 1px solid var(--line); background: var(--surface); padding: clamp(1rem, 3vw, 2rem); }
.guest-form-section > header { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.4rem; }
.guest-form-section > header > span { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: .68rem; }
.guest-form-section h2 { margin: 0; font: 500 1.35rem "Yu Mincho", serif; }
.guest-form-section header p { margin: .2rem 0 0; color: var(--muted); font-size: .7rem; }
.guest-plan-choice { max-width: 560px; }
.guest-price-total { margin: .8rem 0 0; color: var(--accent); font-weight: 800; font-size: .78rem; }
.guest-price-list article { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; border-top: 1px solid var(--line); padding: .9rem 0; }
.guest-price-list article small { grid-column: 1 / -1; color: var(--muted); }
.guest-submit-box { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; border: 1px solid var(--ink); background: var(--ink); padding: clamp(1rem, 3vw, 1.5rem); color: #fff; }
.guest-submit-box p { max-width: 660px; margin: 0; color: #d8ddd9; font-size: .7rem; line-height: 1.8; }
.guest-submit-box .button { flex: 0 0 auto; background: #fff; color: var(--ink); }
.guest-complete { max-width: 720px; text-align: center; }
.guest-complete-mark { display: grid; width: 4rem; height: 4rem; margin: 0 auto 1.5rem; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 2rem; }
.guest-reference { margin: 2rem 0; border: 1px solid var(--line); background: var(--surface); padding: 1.5rem; }
.guest-reference dt { color: var(--muted); font-size: .68rem; }
.guest-reference dd { margin: .35rem 0 0; font: 600 1.5rem monospace; letter-spacing: .06em; }
.guest-complete .guest-notice { margin-bottom: 1.5rem; text-align: left; }
.count-badge { display: grid; min-width: 2.2rem; height: 2.2rem; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: .72rem; }
.guest-admin-list { display: grid; }
.guest-admin-row { display: grid; grid-template-columns: 130px minmax(220px, 1fr) 70px 90px; gap: 1rem; align-items: center; border-top: 1px solid var(--line); padding: .9rem 0; color: inherit; text-decoration: none; }
.guest-admin-row:hover { background: #f4f2ec; }
.guest-admin-row.has-warning { border-left: 3px solid #b7791f; padding-left: .8rem; }
.guest-admin-row time, .guest-admin-row span, .guest-admin-row em { color: var(--muted); font-size: .68rem; font-style: normal; }
.guest-admin-row div { display: grid; gap: .15rem; }
.guest-admin-row em { justify-self: end; }
.warning-banner { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; border: 1px solid #d9b96e; background: #fff8df; padding: 1rem; font-size: .72rem; }
.warning-banner span { color: var(--muted); }
.guest-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.guest-contact div { background: var(--surface); padding: 1rem; }
.guest-contact dt { color: var(--muted); font-size: .66rem; }
.guest-contact dd { margin: .25rem 0 0; overflow-wrap: anywhere; font-weight: 700; }
.guest-decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.guest-decision-grid h2 { margin-top: 0; font: 500 1.35rem "Yu Mincho", serif; }
.status-warning { background: #fff0c2; color: #76520a; }

@media (max-width: 700px) {
    .staff-entry { position: static; display: block; margin-top: 1.5rem; }
    .guest-store-picker, .guest-submit-box { align-items: stretch; flex-direction: column; }
    .guest-submit-box .button { width: 100%; }
    .guest-admin-row { grid-template-columns: 1fr auto; gap: .3rem 1rem; }
    .guest-admin-row time { grid-column: 1; }
    .guest-admin-row div { grid-column: 1; }
    .guest-admin-row > span { grid-column: 2; grid-row: 1; }
    .guest-admin-row em { grid-column: 2; grid-row: 2; }
    .guest-contact, .guest-decision-grid { grid-template-columns: 1fr; }
    .warning-banner { align-items: flex-start; flex-direction: column; }
}

/* Phase 3 members */
.narrow-master { max-width: 980px; }
.member-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0 1rem;
}
.segmented-tabs {
    display: inline-flex;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 3px;
}
.segmented-tabs a {
    min-width: 110px;
    padding: .55rem .9rem;
    color: var(--muted);
    font-size: .76rem;
    text-align: center;
    text-decoration: none;
}
.segmented-tabs a.is-active { background: var(--ink); color: #fff; }
.member-search { display: flex; gap: .5rem; width: min(100%, 470px); }
.member-search input { flex: 1; }
.member-table th a { color: inherit; text-decoration: none; }
.member-table td { height: 64px; }
.member-table td > a { text-decoration: none; }
.member-table tbody tr:hover { background: #f6f3ea; }
.table-note { margin: .7rem 0; color: var(--muted); font-size: .7rem; }
.credential-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
    margin-top: 1rem;
    border: 2px solid var(--accent);
    background: #fff9ea;
    padding: clamp(1.2rem, 3vw, 2rem);
}
.credential-card h2 { margin: 0; font: 500 1.5rem "Yu Mincho", serif; }
.credential-card p:last-child { margin: .4rem 0 0; color: var(--muted); font-size: .75rem; }
.credential-card label span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .68rem; }
.credential-card input { width: 100%; min-height: 48px; border: 1px solid var(--accent); background: #fff; padding: .6rem; font: 600 .95rem ui-monospace, monospace; }
.member-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.renew-form {
    display: flex;
    align-items: end;
    gap: .7rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}
.renew-form label { width: 150px; }
.current-plan {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    border-left: 3px solid var(--accent);
    background: var(--paper);
    padding: 1rem 1.2rem;
}
.current-plan span, .current-plan small { color: var(--muted); font-size: .72rem; }
.current-plan strong { font: 500 1.2rem "Yu Mincho", serif; }
.history-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.history-columns h3 { margin: 0 0 .7rem; font: 500 1rem "Yu Mincho", serif; }
.history-columns > div { border: 1px solid var(--line); }
.history-columns p { display: grid; gap: .12rem; margin: 0; border-bottom: 1px solid var(--line); padding: .85rem 1rem; }
.history-columns p:last-child { border-bottom: 0; }
.history-columns p strong { font-size: .78rem; }
.history-columns p span, .history-columns p small { color: var(--muted); font-size: .68rem; }
.history-columns .empty-line { color: var(--muted); font-size: .76rem; }
.danger-section { border-color: #d8aaa6; }
.button-danger { border-color: var(--danger); background: var(--danger); color: #fff; }

.operations-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.operation-card { min-width: 0; }
.operation-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.operation-heading h2 { margin: .2rem 0 0; font: 500 1.25rem "Yu Mincho", serif; }
.operation-settings-form { display: flex; align-items: end; gap: .6rem; margin-bottom: 1rem; }
.operation-settings-form label { max-width: 180px; }
.operation-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.operation-table { width: 100%; border-collapse: collapse; min-width: 760px; background: var(--surface); }
.operation-table th, .operation-table td { padding: .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .68rem; }
.operation-table th { color: var(--muted); font-size: .58rem; letter-spacing: .08em; }
.operation-table small { color: var(--muted); overflow-wrap: anywhere; }
.operation-table .operation-error { color: var(--danger); }
.restore-form { display: flex; gap: .35rem; align-items: center; }
.restore-form input { width: 7.5rem; min-height: 42px; }
.operation-note { color: var(--muted); font-size: .65rem; }
.member-guide-editor textarea { width: 100%; min-height: 32rem; line-height: 1.8; }
.member-guide-editor .operation-heading p { margin: .25rem 0 0; color: var(--muted); }

@media (max-width: 720px) {
    .operation-heading { align-items: stretch; flex-direction: column; }
    .operation-heading .button, .operation-settings-form .button { width: 100%; }
    .operation-settings-form { align-items: stretch; flex-direction: column; }
    .operation-settings-form label { max-width: none; }
}

@media (max-width: 820px) {
    .member-list-toolbar { align-items: stretch; flex-direction: column; }
    .member-search { width: 100%; }
    .credential-card { grid-template-columns: 1fr; }
    .member-detail-grid, .history-columns { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .segmented-tabs { width: 100%; }
    .segmented-tabs a { flex: 1; min-width: 0; }
    .member-search { display: grid; }
    .renew-form { align-items: stretch; flex-direction: column; }
    .renew-form label, .renew-form .button { width: 100%; }
}

/* Phase 4 booking engine */
.booking-filter { display: flex; align-items: end; gap: .8rem; margin: 1.5rem 0 1rem; }
.booking-filter label { min-width: 210px; }
.booking-day-board { border: 1px solid var(--line); background: var(--surface); padding: clamp(1.2rem, 3vw, 2rem); }
.booking-day-board > header { display: flex; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.booking-day-board h2 { margin: 0; font: 500 1.5rem "Yu Mincho", serif; }
.booking-day-board > header > p { max-width: 520px; color: var(--muted); font-size: .74rem; }
.booking-records { display: grid; }
.booking-record { display: grid; grid-template-columns: 110px minmax(220px, 1fr) minmax(160px, .45fr) auto; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: 1rem .4rem; }
.booking-record > time { font: 500 1.05rem Georgia, serif; }
.booking-record h3 { margin: .1rem 0; font: 500 1rem "Yu Mincho", serif; }
.booking-record h3 a { color: inherit; text-decoration: none; }
.booking-record p { margin: 0; color: var(--muted); font-size: .7rem; }
.booking-record .record-reference { font: 600 .62rem ui-monospace, monospace; letter-spacing: .08em; }
.booking-record.is-block { border-left: 4px solid #9a7144; background: #f3eadf; padding-left: 1rem; }
.record-meta { display: grid; justify-items: start; gap: .35rem; font-size: .72rem; }
.text-button { border: 0; background: transparent; color: var(--danger); cursor: pointer; text-decoration: underline; }
.seat-choice { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; border: 1px solid var(--line); padding: 1rem; }
.seat-choice legend { padding: 0 .4rem; color: var(--muted); font-size: .7rem; }
.booking-member-search { width: 100%; }
.force-box { display: grid; gap: .8rem; border: 1px solid #d6b876; background: #fff8e8; padding: 1rem; }
.force-box p { margin: 0; color: var(--muted); font-size: .7rem; }
.booking-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 1rem 0; background: var(--line); }
.booking-summary div { background: var(--surface); padding: 1rem; }
.booking-summary dt { color: var(--muted); font-size: .68rem; }
.booking-summary dd { margin: .25rem 0 0; font-weight: 700; }
.booking-actions-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1rem; }
.stacked-actions, .stacked-form { display: grid; gap: .8rem; }
.stacked-actions .button, .stacked-form .button { width: 100%; }

@media (max-width: 760px) {
    .booking-filter, .booking-day-board > header { align-items: stretch; flex-direction: column; }
    .booking-filter label { min-width: 0; }
    .booking-record { grid-template-columns: 1fr; gap: .35rem; }
    .booking-summary, .booking-actions-grid { grid-template-columns: 1fr; }
}

/* Phase 5 member portal */
.member-nav { display: flex; gap: .3rem; overflow-x: auto; margin: 1rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.member-nav a { flex: 0 0 auto; border-bottom: 2px solid transparent; padding: .75rem 1rem; color: var(--muted); font-size: .76rem; text-decoration: none; }
.member-nav a.is-active { border-color: var(--accent); color: var(--ink); font-weight: 700; }
.member-guide-welcome { margin-bottom: 1rem; border: 1px solid var(--ink); border-left-width: 6px; background: #f7f7f5; padding: 1.15rem 1.25rem; }
.member-guide-welcome strong { font-size: 1.15rem; }
.member-guide-welcome p { margin: .35rem 0 0; color: var(--muted); }
.member-guide-intro { margin-bottom: 1rem; }
.member-guide-intro h1 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 600; }
.member-guide-intro p { max-width: 920px; margin: 0; color: var(--muted); line-height: 1.8; }
.member-guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.member-guide-list article { border: 1px solid var(--line); background: var(--surface); padding: clamp(1.1rem, 2vw, 1.6rem); }
.member-guide-list h2 { margin: 0 0 .7rem; font-size: 1.15rem; font-weight: 600; }
.member-guide-list p { margin: 0; color: var(--muted); line-height: 1.85; }
.member-guide-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.25rem; }
.member-summary strong small { display: inline; margin-left: .12rem; font-size: .68rem; }
.member-primary-action { display: flex; justify-content: flex-end; margin: 1rem 0; }
.member-booking-section { margin-top: 1rem; border: 1px solid var(--line); background: var(--surface); padding: clamp(1.1rem, 3vw, 2rem); }
.member-booking-section > header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
.member-booking-section h2 { margin: 0; font: 500 1.35rem "Yu Mincho", serif; }
.member-booking-section > header > p { max-width: 480px; margin: 0; color: var(--muted); font-size: .72rem; }
.member-booking-list, .member-history-list { display: grid; }
.member-booking-list > a { display: grid; grid-template-columns: 70px 1fr auto; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: .9rem .3rem; color: inherit; text-decoration: none; }
.member-booking-list > a:last-child, .member-history-list > a:last-child { border-bottom: 0; }
.member-booking-list time { display: grid; font: 500 1.2rem Georgia, serif; }
.member-booking-list time small, .member-booking-list div span { color: var(--muted); font-size: .7rem; }
.member-booking-list div { display: grid; gap: .2rem; }
.member-history-list > a { display: grid; grid-template-columns: 130px 1fr auto; gap: 1rem; border-bottom: 1px solid var(--line); padding: .8rem .3rem; color: inherit; font-size: .74rem; text-decoration: none; }
.member-history-list time, .member-history-list strong { font-size: .7rem; }
.narrow-member-page { max-width: 980px; }
.member-reserve-filter { display: flex; align-items: end; gap: .8rem; margin: 1rem 0; border: 1px solid var(--line); background: var(--surface); padding: 1rem; }
.member-reserve-filter label { min-width: 210px; }
.member-seat-map { border: 1px solid var(--line); background: var(--surface); padding: clamp(1rem, 3vw, 2rem); }
.member-seat-map > header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.member-seat-map h2 { margin: 0; font: 500 1.35rem "Yu Mincho", serif; }
.member-seat-map > header > p { color: var(--muted); font-size: .72rem; }
.member-seat-map img { display: block; width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--line); background: var(--paper); }
.seat-map-missing { display: grid; min-height: 180px; place-items: center; border: 1px dashed var(--line); color: var(--muted); font-size: .76rem; }
.member-day-info { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 1rem; background: var(--line); }
.member-day-info > div { display: grid; gap: .3rem; background: var(--surface); padding: 1rem; }
.member-day-info span { color: var(--muted); font-size: .66rem; }
.member-day-info strong { font-size: .78rem; }
.member-timeline-section { margin-top: 1rem; border: 1px solid var(--line); background: var(--surface); padding: 1rem; }
.member-timeline-section > header { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.member-timeline-section h2 { margin: 0; font: 500 1.3rem "Yu Mincho", serif; }
.timeline-instruction { color: var(--muted); font-size: .72rem; }
.timeline-jumps { display: flex; gap: .4rem; overflow-x: auto; margin: .8rem 0; }
.timeline-jumps button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--paper); padding: .45rem .7rem; color: var(--muted); cursor: pointer; font-size: .68rem; }
.member-timeline { overflow: auto; max-height: 620px; border: 1px solid var(--line); overscroll-behavior: contain; }
.timeline-grid { display: grid; grid-template-columns: 72px repeat(var(--slot-count), 58px); width: max-content; background: var(--line); gap: 1px; user-select: none; }
.timeline-corner, .timeline-time, .timeline-seat { position: sticky; z-index: 3; display: grid; place-items: center; background: #ece9e1; color: var(--muted); font-size: .62rem; }
.timeline-corner { top: 0; left: 0; z-index: 5; min-height: 38px; }
.timeline-time { top: 0; min-height: 38px; writing-mode: vertical-rl; }
.timeline-seat { left: 0; min-height: 46px; color: var(--ink); font-weight: 700; }
.timeline-slot { min-height: 46px; overflow: hidden; border: 0; background: #fff; padding: 2px; color: #fff; cursor: pointer; font-size: .5rem; line-height: 1.1; touch-action: pan-x pan-y; }
.timeline-slot.is-required:not(.is-busy):not(.is-mine):not(.is-blocked) { background: #fff8df; box-shadow: inset 0 3px #d8af4b; }
.timeline-slot.is-busy { background: #858b87; }
.timeline-slot.is-mine { background: #356e59; }
.timeline-slot.is-blocked { background: repeating-linear-gradient(135deg, #8c6847 0 6px, #9e7955 6px 12px); }
.timeline-slot.is-selected { background: var(--accent) !important; box-shadow: inset 0 0 0 2px #fff !important; }
.timeline-slot:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.timeline-confirm { position: sticky; bottom: .5rem; z-index: 6; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; margin-top: 1rem; border: 1px solid var(--ink); background: rgba(255, 255, 255, .96); padding: 1rem; box-shadow: 0 12px 30px rgba(20, 28, 25, .12); backdrop-filter: blur(8px); }
.timeline-confirm div { display: grid; gap: .18rem; }
.timeline-confirm span, .timeline-confirm small { color: var(--muted); font-size: .66rem; }
.manual-booking-form { margin-top: 1rem; border: 1px solid var(--line); background: var(--surface); padding: 1rem; }
.manual-booking-form summary { cursor: pointer; color: var(--muted); font-size: .74rem; font-weight: 700; }
.manual-booking-form form { margin-top: 1rem; }
.member-booking-detail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 1rem 0; background: var(--line); }
.member-booking-detail div { background: var(--surface); padding: 1rem; }
.member-booking-detail dt { color: var(--muted); font-size: .66rem; }
.member-booking-detail dd { margin: .25rem 0 0; font-weight: 700; }
.member-booking-actions { display: grid; grid-template-columns: .5fr 1fr; gap: 1rem; margin-top: 1rem; }
.member-booking-actions form { display: flex; gap: .6rem; }
.member-booking-actions .button { min-height: 48px; }
.cancel-inline input { flex: 1; }

@media (max-width: 700px) {
    .member-guide-list { grid-template-columns: 1fr; }
    .member-guide-actions { display: grid; }
    .member-booking-section > header, .member-seat-map > header, .member-timeline-section > header { align-items: flex-start; flex-direction: column; }
    .member-reserve-filter { align-items: stretch; flex-direction: column; }
    .member-reserve-filter label { min-width: 0; }
    .member-day-info, .member-booking-detail, .member-booking-actions { grid-template-columns: 1fr; }
    .member-booking-list > a { grid-template-columns: 58px 1fr; }
    .member-booking-list .status-pill { grid-column: 2; }
    .member-history-list > a { grid-template-columns: 1fr; gap: .25rem; }
    .timeline-confirm { position: static; grid-template-columns: 1fr; }
    .timeline-confirm .button { width: 100%; }
    .member-booking-actions form { flex-direction: column; }
}

/* Home reservation chooser v2 */
.site-logo {
    width: 126px;
    height: 30px;
}
.reservation-home {
    display: grid;
    min-height: calc(100vh - 112px);
    place-items: center;
    padding: 3rem 1.25rem 5rem;
    background: #f7f7f6;
}
.reservation-home-inner {
    display: grid;
    width: min(920px, 100%);
    gap: 1.5rem;
}
.reservation-home-prompt {
    margin: 0;
    color: #555;
    font-size: .82rem;
    letter-spacing: .04em;
    text-align: center;
}
.reservation-home .reservation-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.reservation-home .reservation-choice-card {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 168px;
    border: 1px solid #d4d4d4;
    background: #fff;
    padding: 1.4rem;
    color: #111;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.reservation-home .reservation-choice-card > span:first-child {
    align-self: center;
    font-size: clamp(.95rem, 1.5vw, 1.08rem);
    font-weight: 650;
    line-height: 1.6;
    text-align: center;
}
.reservation-home .choice-arrow {
    justify-self: end;
    color: #777;
    font-size: 1rem;
}
.reservation-home .reservation-choice-card:hover,
.reservation-home .reservation-choice-card:focus-visible {
    border-color: #111;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
    transform: translateY(-2px);
}
.reservation-home .reservation-choice-card:hover .choice-arrow,
.reservation-home .reservation-choice-card:focus-visible .choice-arrow { color: #111; }
.reservation-home .staff-entry {
    justify-self: center;
    margin-top: .25rem;
    color: #777;
    font-size: .72rem;
    text-decoration: none;
}
.reservation-home .staff-entry:hover { color: #111; text-decoration: underline; }

@media (max-width: 700px) {
    .site-logo { width: 108px; height: 27px; }
    .reservation-home { min-height: calc(100vh - 104px); place-items: start center; padding: 2.25rem 1rem 4rem; }
    .reservation-home-inner { gap: 1.1rem; }
    .reservation-home-prompt { margin-bottom: .25rem; }
    .reservation-home .reservation-choice-grid { grid-template-columns: 1fr; gap: .7rem; }
    .reservation-home .reservation-choice-card {
        grid-template-columns: 1fr auto;
        grid-template-rows: 1fr;
        min-height: 94px;
        align-items: center;
        padding: 1.1rem 1.2rem;
    }
    .reservation-home .reservation-choice-card > span:first-child { text-align: left; }
    .reservation-home .choice-arrow { align-self: center; }
}
