:root {
  font-family: "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  color: #172421;
  background: #f3f5f2;
  font-synthesis: none;
  --ink: #172421;
  --forest: #123e37;
  --forest-light: #1d5d52;
  --gold: #76541b;
  --line: #d8dfda;
  --muted: #66736f;
  --danger: #a13d37;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 0 0, #e4ece7 0, transparent 35%), #f5f6f3; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(29,93,82,.3); outline-offset: 3px; }
h1[tabindex="-1"]:focus { outline: 3px solid var(--forest-light); outline-offset: 6px; border-radius: 4px; }
h1[tabindex="-1"]:focus-visible { outline-width: 4px; }
h2[tabindex="-1"]:focus { outline: 3px solid var(--forest-light); outline-offset: 5px; border-radius: 4px; }
button:disabled { cursor: not-allowed; opacity: .55; }
.brandbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 64px); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--forest); text-decoration: none; font-weight: 800; letter-spacing: .03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--forest); border-radius: 10px 10px 14px 10px; font-family: serif; }
.environment { color: var(--muted); font-size: 13px; }
main { min-height: calc(100vh - 68px); }
.loading, .center-layout { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 24px; }
.split-layout { min-height: calc(100vh - 68px); display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px); gap: clamp(36px, 7vw, 110px); align-items: center; max-width: 1240px; margin: auto; padding: 60px 32px; }
.intro-panel h1 { max-width: 720px; margin: 8px 0 18px; font-family: "Yu Mincho", serif; font-size: clamp(36px, 5vw, 62px); line-height: 1.2; color: var(--forest); }
.lead { max-width: 620px; color: #4e5c58; font-size: 18px; line-height: 1.9; }
.eyebrow { margin: 0 0 6px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.steps { display: grid; gap: 18px; list-style: none; margin: 36px 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 14px; }
.steps li > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border: 1px solid #9eb2aa; border-radius: 50%; color: var(--forest); font-weight: 800; }
.steps strong, .steps small { display: block; }
.steps small { color: var(--muted); margin-top: 3px; }
.card { background: rgba(255,255,255,.96); border: 1px solid #dde4df; border-radius: 20px; box-shadow: 0 20px 60px rgba(18, 62, 55, .08); }
.form-card, .login-card { display: grid; gap: 18px; padding: clamp(24px, 4vw, 42px); }
.login-card { width: min(100%, 440px); text-align: center; }
.auth-card { display: grid; gap: 18px; width: min(100%, 560px); padding: clamp(24px, 5vw, 42px); }
.wide-auth-card { width: min(100%, 720px); }
.compact-auth-card { margin-top: 18px; }
.operations-card { width: min(100%, 620px); }
.service-context { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,280px) auto; gap: 14px 20px; align-items: center; margin: 0 0 20px; padding: 17px 20px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 12px 32px rgba(18,62,55,.06); }
.service-context h2 { margin: 2px 0 4px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: 21px; }
.service-context p { margin-bottom: 0; font-size: 12px; line-height: 1.55; }
.service-property-label { gap: 5px; }
.service-property-label select { min-height: 42px; }
.service-property-fixed { display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px; color: var(--forest); background: #eef4f0; border-radius: 10px; }
.service-menu-summary { max-width: 220px; padding: 8px 11px; color: #38584f; background: #edf4f0; border-radius: 9px; font-size: 12px; font-weight: 800; line-height: 1.45; }
.compact-service-context { grid-template-columns: minmax(0,1fr); margin: 2px 0 0; padding: 15px; box-shadow: none; }
.compact-service-context .service-menu-summary { max-width: none; }
.module-menu-section { display: grid; gap: 14px; margin: 0 0 22px; padding: 20px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 16px; }
.compact-module-menu { margin: 2px 0 0; padding: 0; background: transparent; border: 0; }
.module-menu-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.module-menu-heading h2 { margin: 3px 0 0; color: var(--forest); font-family: "Yu Mincho", serif; }
.module-menu-heading > p { margin: 0; font-size: 13px; }
.module-grid { display: grid; gap: 12px; }
.module-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 15px; background: #f8faf8; border: 1px solid #dfe7e2; border-radius: 13px; }
.module-card.is-ready { border-color: #b9d8c8; background: #f5fbf7; }
.module-card.is-notice { border-color: #dfcca3; background: #fffbf2; }
.module-card.is-blocked { border-color: #ded6d3; background: #f8f7f6; }
.module-card.is-error { border-color: #e0b9b5; background: #fff7f6; }
.module-card-mark { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--forest); border-radius: 12px; font-family: serif; font-size: 19px; }
.module-card.is-blocked .module-card-mark { background: #69736f; }
.module-card.is-error .module-card-mark { background: var(--danger); }
.module-card-copy { min-width: 0; }
.module-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.module-card-title h3 { margin: 0; color: var(--forest); font-size: 16px; }
.module-card-copy p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.module-card-copy .mail-connection-guide { color: #315d50; font-weight: 700; }
.module-card-facts { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.module-card-message { grid-column: 2 / -1; min-height: 0; margin: 0; }
.service-state { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.service-state.is-ready { color: #116345; background: #e6f4ec; }
.service-state.is-notice { color: #72531c; background: #fff0cf; }
.service-state.is-blocked { color: #5d6662; background: #e9ecea; }
.service-state.is-error { color: #873933; background: #ffe8e5; }
.module-launch-button { min-width: 86px; min-height: 44px; }
.module-loading, .module-empty { padding: 18px; color: var(--muted); background: #f8faf8; border: 1px dashed #cbd6d0; border-radius: 11px; text-align: center; font-size: 14px; }
.module-launch-message { margin: 0; }
.operations-stack { display: grid; gap: 18px; width: min(100%, 940px); }
.operations-stack .operations-card { justify-self: center; }
.stack-form { display: grid; gap: 17px; }
.card-heading h2, .dialog-heading h2 { margin: 4px 0 0; color: var(--forest); }
label { display: grid; gap: 7px; text-align: left; color: #35423e; font-size: 14px; font-weight: 700; }
input, select { width: 100%; min-height: 48px; padding: 10px 13px; color: var(--ink); background: #fff; border: 1px solid #bcc8c2; border-radius: 10px; outline: none; }
input:focus, select:focus { border-color: var(--forest-light); box-shadow: 0 0 0 3px rgba(29,93,82,.13); }
small { color: var(--muted); font-weight: 400; }
.subdomain-field { display: flex; align-items: center; background: #fff; border: 1px solid #bcc8c2; border-radius: 10px; overflow: hidden; }
.subdomain-field:focus-within { border-color: var(--forest-light); box-shadow: 0 0 0 3px rgba(29,93,82,.13); }
.subdomain-field input { min-width: 90px; border: 0; box-shadow: none; }
.subdomain-field span { flex: 0 0 auto; padding-right: 12px; color: var(--muted); font-size: 13px; }
.property-builder { display: grid; gap: 12px; padding: 17px; background: #f8faf8; border: 1px solid var(--line); border-radius: 13px; }
.property-builder-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.property-builder-heading h3 { margin: 2px 0 0; color: var(--forest); font-size: 17px; }
.compact-copy { margin: -3px 0 1px; font-size: 12px; line-height: 1.65; }
.property-rows { display: grid; gap: 10px; }
.property-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, 140px) auto; gap: 10px; align-items: end; padding: 13px; background: #fff; border: 1px solid #dfe6e2; border-radius: 11px; }
.property-row label { min-width: 0; font-size: 12px; }
.property-row input { width: 100%; min-width: 0; }
.remove-property { min-width: 76px; min-height: 48px; color: #8a3934; background: #fff0ee; }
.remove-property:disabled { visibility: hidden; }
.property-total { margin: 0; color: #38584f; font-size: 13px; font-weight: 800; text-align: right; }
.checkout-progress { margin: -4px 0 4px; }
.checkout-progress ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.checkout-progress li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; color: #7a8581; font-size: 11px; font-weight: 800; line-height: 1.35; }
.checkout-progress li > span { display: grid; place-items: center; width: 28px; height: 28px; color: #66736f; background: #edf1ee; border: 1px solid #d3dcd7; border-radius: 50%; }
.checkout-progress li.is-current { color: var(--forest); }
.checkout-progress li.is-current > span { color: #fff; background: var(--forest); border-color: var(--forest); }
.checkout-progress li.is-complete { color: #315d50; }
.checkout-progress li.is-complete > span { color: #116345; background: #e0f2e7; border-color: #b7d8c5; }
.checkout-step { display: grid; gap: 18px; }
.checkout-step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 3px; }
.checkout-step-actions-end { justify-content: flex-end; }
.step-message:empty { display: none; }
.payment-fields { display: grid; gap: 15px; padding: 18px; background: #f8faf8; border: 1px solid var(--line); border-radius: 13px; }
.price-preview { margin: -7px 0 2px; padding: 11px 13px; color: #38584f; background: #edf4f0; border-radius: 10px; font-size: 13px; font-weight: 700; }
.coupon-entry { display: block; overflow: hidden; background: #f8faf8; border: 1px solid var(--line); border-radius: 11px; }
.coupon-entry > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: #38584f; font-size: 13px; font-weight: 800; list-style: none; }
.coupon-entry > summary::-webkit-details-marker { display: none; }
.coupon-entry > summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; color: var(--forest); background: #e9efec; border-radius: 50%; font-size: 17px; line-height: 1; }
.coupon-entry[open] > summary { border-bottom: 1px solid var(--line); }
.coupon-entry[open] > summary::after { content: "−"; }
.coupon-entry-body { display: grid; gap: 13px; padding: 15px 16px 16px; }
.coupon-field-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.coupon-field-row .secondary { min-width: 126px; }
.coupon-preview { display: grid; gap: 12px; padding: 15px; color: #214a3d; background: #f3faf6; border: 2px solid #a9cfba; border-radius: 11px; }
.coupon-preview:focus { outline: 3px solid rgba(29,93,82,.25); outline-offset: 2px; }
.coupon-preview-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.coupon-preview-title strong { color: var(--forest); font-size: 16px; }
.coupon-preview-title span { padding: 5px 8px; color: #116345; background: #e0f2e7; border-radius: 999px; font-size: 11px; font-weight: 800; }
.coupon-pricing { display: grid; gap: 0; margin: 0; background: #fff; border: 1px solid #cce0d3; border-radius: 9px; overflow: hidden; }
.coupon-pricing > div { display: grid; grid-template-columns: minmax(110px,35%) 1fr; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #e2eee6; }
.coupon-pricing > div:last-child { border-bottom: 0; }
.coupon-pricing dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.coupon-pricing dd { margin: 0; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.coupon-no-renewal { margin: 0; padding: 12px; color: #2e5147; background: #e9f5ed; border-left: 4px solid #3f8268; border-radius: 6px; font-size: 13px; line-height: 1.7; }
.coupon-preview .link-button { justify-self: start; min-height: 36px; padding: 0; }
.payment-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.payment-heading h3 { margin: 2px 0 0; color: var(--forest); font-size: 17px; }
.payment-lock { padding: 6px 9px; color: #38584f; background: #e5efea; border-radius: 999px; font-size: 11px; font-weight: 800; }
.payment-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payjp-element { min-height: 48px; padding: 13px; background: #fff; border: 1px solid #bcc8c2; border-radius: 10px; }
.payjp-element:focus-within { border-color: var(--forest-light); box-shadow: 0 0 0 3px rgba(29,93,82,.13); }
.checkout-confirmation { display: grid; gap: 15px; padding: 18px; background: #fffaf0; border: 2px solid #d8bc83; border-radius: 13px; }
.checkout-confirmation h3 { margin: 2px 0 0; color: var(--forest); font-size: 18px; }
.checkout-summary { display: grid; gap: 0; margin: 0; border: 1px solid #e2d4b7; border-radius: 10px; overflow: hidden; }
.checkout-summary > div { display: grid; grid-template-columns: minmax(105px, 34%) 1fr; gap: 12px; padding: 11px 12px; background: #fff; border-bottom: 1px solid #eee3cd; }
.checkout-summary > div:last-child { border-bottom: 0; }
.checkout-summary dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.checkout-summary dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 800; }
.checkout-success { display: grid; gap: 13px; padding: 20px; color: #26483e; background: #f3faf6; border: 2px solid #a9cfba; border-radius: 13px; }
.checkout-success:focus { outline: 3px solid rgba(29,93,82,.25); outline-offset: 2px; }
.checkout-success h3 { margin: 0; color: var(--forest); font-size: 20px; }
.checkout-success p { margin: 0; line-height: 1.7; }
.checkout-success ul { display: grid; gap: 6px; margin: 0; padding-left: 22px; }
.checkout-success .action-link { justify-self: start; }
.legal-document-links { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; }
.legal-document-links a { color: var(--forest-light); font-weight: 700; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.consent input { width: 18px; min-height: 18px; margin-top: 2px; }
.primary, .secondary, .link-button, .icon-button { border: 0; border-radius: 10px; }
.primary { min-height: 50px; padding: 0 20px; color: #fff; background: var(--forest); font-weight: 800; }
.primary:hover { background: var(--forest-light); }
.primary:disabled { cursor: not-allowed; opacity: .5; }
.primary.compact { min-height: 44px; }
.secondary { min-height: 46px; padding: 0 18px; color: var(--forest); background: #e9efec; font-weight: 700; }
.link-button { color: var(--forest-light); background: transparent; text-decoration: underline; }
.action-link { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.full-width { width: 100%; }
.field-status, .form-message { min-height: 20px; margin: -8px 0 0; font-size: 13px; }
.is-ok { color: #16724e; }
.is-error { color: var(--danger); }
.tenant-avatar { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 4px; color: #fff; background: var(--forest); border-radius: 18px; font-family: serif; font-size: 26px; }
.muted { color: var(--muted); }
.success-lead { margin: 0; color: #16724e; font-size: 18px; font-weight: 800; text-align: center; }
.success-panel { display: grid; gap: 14px; padding: 18px; background: #f2f8f4; border: 1px solid #cfe2d5; border-radius: 12px; }
.success-panel h2, .success-panel p { margin: 0; }
.recovery-actions { display: grid; gap: 10px; }
.account-details { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.account-details > div { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 14px; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.account-details > div:last-child { border-bottom: 0; }
.account-details dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.account-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.compact-details > div { grid-template-columns: minmax(100px, 28%) 1fr; }
.method-switch { display: flex; gap: 8px; }
.method-switch button { flex: 1; min-height: 42px; padding: 8px 12px; color: var(--forest); background: #eef2ef; border: 1px solid transparent; border-radius: 9px; font-weight: 700; }
.method-switch button[aria-pressed="true"] { background: #fff; border-color: var(--forest-light); box-shadow: 0 0 0 2px rgba(29,93,82,.1); }
.backup-code-panel { padding: 16px; background: #fff9ed; border: 1px solid #ead8b4; border-radius: 12px; }
.backup-code-panel h2, .backup-code-panel p { margin-top: 0; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.backup-codes li { padding: 8px 10px; background: #fff; border: 1px solid #e5d2ac; border-radius: 7px; font-family: ui-monospace, "Cascadia Mono", monospace; text-align: center; }
.secret-value { display: block; padding: 7px 9px; overflow-wrap: anywhere; color: var(--ink); background: #f0f3f1; border-radius: 6px; font-size: 13px; user-select: all; }
.workspace { width: 100%; max-width: 1240px; min-width: 0; margin: auto; padding: 52px 28px 80px; }
.workspace > * { min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 4px 0 6px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: 38px; }
.page-heading p { margin-bottom: 0; }
.role-summary { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.marketing-panel { display: grid; gap: 16px; padding: 22px; margin-bottom: 20px; box-shadow: 0 14px 42px rgba(18, 62, 55, .07); }
.marketing-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.marketing-heading h2 { margin: 8px 0 4px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: clamp(20px, 2.5vw, 28px); }
.marketing-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.marketing-kicker { display: flex; align-items: center; gap: 9px; color: var(--forest-light); font-size: 12px; font-weight: 800; }
.marketing-property-label { flex: 0 0 min(260px, 36%); gap: 5px; }
.marketing-property-label select { min-height: 42px; }
.marketing-state { min-height: 42px; padding: 11px 13px; margin: 0; color: #4e5c58; background: #f3f6f4; border-radius: 9px; font-size: 13px; line-height: 1.55; }
.marketing-state.is-ok { color: #146044; background: #edf7f0; }
.marketing-state.is-notice { color: #70521b; background: #fff8e9; }
.marketing-state.is-error { color: var(--danger); background: #fff1ef; }
.marketing-metrics { display: grid; grid-template-columns: repeat(5, minmax(105px, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.marketing-metrics > div { min-width: 0; padding: 15px; background: #fff; border-right: 1px solid var(--line); }
.marketing-metrics > div:last-child { border-right: 0; }
.marketing-metrics span, .marketing-metrics small { display: block; color: var(--muted); font-size: 11px; }
.marketing-metrics strong { display: block; margin: 5px 0 3px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: clamp(22px, 2.5vw, 30px); line-height: 1; }
.marketing-footer { display: flex; align-items: center; justify-content: space-between; min-height: 34px; color: var(--muted); font-size: 12px; }
.ai-usage-panel { display: grid; gap: 14px; padding: 22px; margin-bottom: 20px; box-shadow: 0 14px 42px rgba(18, 62, 55, .07); }
.ai-usage-heading, .ai-usage-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ai-usage-heading h2 { margin: 8px 0 4px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: clamp(20px, 2.5vw, 28px); }
.ai-usage-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.ai-usage-heading label { min-width: 168px; }
.ai-usage-heading input { margin-top: 6px; }
.ai-usage-state { margin: 0; color: var(--muted); }
.ai-usage-state.is-ok { color: var(--success, #176b4d); }
.ai-usage-state.is-error { color: var(--danger, #a32d2d); }
.ai-usage-state.is-notice { color: var(--warning, #825d00); }
.ai-usage-footer { align-items: center; color: var(--muted); font-size: 12px; }
.usage-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #eef2f5; color: #4c5964; font-size: 12px; font-weight: 700; white-space: nowrap; }
.usage-status.is-ok { background: #e5f5ee; color: #176b4d; }
.usage-status.is-over { background: #fae7e7; color: #a32d2d; }
.marketing-retry { min-height: 34px; padding: 0 13px; font-size: 12px; }
.billing-panel { display: grid; gap: 16px; margin: 0 0 24px; padding: clamp(20px, 3vw, 28px); }
.billing-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.billing-panel-heading h2 { margin: 4px 0 0; color: var(--forest); font-family: "Yu Mincho", serif; font-size: 26px; }
.billing-summary { border-color: var(--line); }
.billing-summary > div { border-bottom-color: var(--line); }
.billing-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 16px; }
.billing-actions .link-button { min-height: 42px; padding: 0; }
.billing-panel.is-scheduled { border-color: #d8bc83; background: #fffdf8; }
.billing-panel.is-effective { border-color: #d7dedd; background: #f7f8f8; }
.summary-card { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.summary-card strong { display: block; color: var(--forest); font-size: 26px; }
.summary-card span { color: var(--muted); font-size: 13px; }
.table-card { overflow: hidden; }
.table-toolbar { display: flex; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.table-toolbar input { max-width: 360px; }
.table-toolbar select { max-width: 200px; }
.table-scroll { position: relative; max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; text-align: left; white-space: nowrap; border-bottom: 1px solid #edf0ee; font-size: 14px; }
th { color: var(--muted); background: #fafbf9; font-size: 12px; letter-spacing: .05em; }
.person strong, .person small { display: block; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #e7efeb; color: var(--forest); font-size: 12px; font-weight: 800; }
.badge.inactive { background: #eee; color: #69706d; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.row-actions button { padding: 7px 10px; color: var(--forest); background: #eef2ef; border: 0; border-radius: 8px; }
.member-message { margin: 0 0 14px; }
.empty-state { padding: 34px 18px; color: var(--muted); text-align: center; }
dialog { width: min(92vw, 520px); max-height: min(90vh, 820px); padding: 0; overflow-y: auto; border: 0; border-radius: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.22); }
dialog::backdrop { background: rgba(9, 24, 21, .52); backdrop-filter: blur(3px); }
.dialog-card { display: grid; gap: 17px; padding: 28px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.icon-button { width: 36px; height: 36px; color: var(--muted); background: #f0f2f0; font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.security-note { padding: 13px; margin: 0; color: #4c5a56; background: #f2f6f3; border-left: 3px solid var(--gold); border-radius: 5px; font-size: 13px; line-height: 1.7; }
.security-note p { margin: 5px 0 10px; }
.property-fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.property-fieldset legend { padding: 0 5px; color: #35423e; font-size: 14px; font-weight: 800; }
.property-options { display: grid; gap: 8px; margin-top: 12px; max-height: 210px; overflow-y: auto; }
.property-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px; background: #f8faf8; border: 1px solid #e4e9e6; border-radius: 8px; cursor: pointer; }
.property-option input { flex: 0 0 18px; width: 18px; min-height: 18px; margin-top: 2px; }
.property-option strong, .property-option small { display: block; }
.property-option span { min-width: 0; }
.onboarding-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 720px); gap: clamp(28px, 5vw, 72px); align-items: start; width: min(1180px, 100%); min-height: calc(100vh - 68px); margin: auto; padding: clamp(28px, 6vh, 64px) 28px 72px; }
.onboarding-guide { position: sticky; top: 28px; display: grid; gap: 28px; padding: 8px 0; }
.onboarding-guide h2 { margin: 6px 0 14px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.3; }
.onboarding-guide p { margin: 0; color: #52605c; line-height: 1.8; }
.onboarding-progress-summary { display: grid; gap: 10px; }
.onboarding-progress-summary strong { color: var(--forest); font-size: 15px; }
.onboarding-progress-summary progress { width: 100%; height: 9px; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: #dce5e0; }
.onboarding-progress-summary progress::-webkit-progress-bar { background: #dce5e0; border-radius: 999px; }
.onboarding-progress-summary progress::-webkit-progress-value { background: var(--forest-light); border-radius: 999px; }
.onboarding-progress-summary progress::-moz-progress-bar { background: var(--forest-light); border-radius: 999px; }
.onboarding-step-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: setup-step; }
.onboarding-step-list li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 48px; padding: 6px 8px; color: var(--muted); border-radius: 10px; counter-increment: setup-step; }
.onboarding-step-list li::before { content: counter(setup-step); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #b8c7c0; border-radius: 50%; background: rgba(255,255,255,.7); font-size: 12px; font-weight: 800; }
.onboarding-step-list li.is-current { color: var(--forest); background: rgba(255,255,255,.7); font-weight: 800; }
.onboarding-step-list li.is-current::before { color: #fff; background: var(--forest); border-color: var(--forest); }
.onboarding-step-list li.is-complete::before { content: "✓"; color: #fff; background: #23735e; border-color: #23735e; }
.onboarding-step-list li.is-skipped::before { content: "–"; color: #765b24; background: #fff6e2; border-color: #d7bd83; }
.onboarding-resume-note { padding: 14px; background: rgba(255,255,255,.72); border-left: 3px solid var(--gold); border-radius: 6px; font-size: 12px; }
.onboarding-card { display: grid; gap: 22px; min-height: 590px; padding: clamp(24px, 5vw, 46px); }
.onboarding-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 28px; }
.onboarding-step-number { color: var(--forest); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.autosave-state { color: var(--muted); font-size: 12px; text-align: right; }
.autosave-state.is-saving { color: #765b24; }
.autosave-state.is-saved { color: #16724e; }
.autosave-state.is-error { color: var(--danger); }
.onboarding-step { display: grid; gap: 22px; animation: onboarding-enter .22s ease-out; }
@keyframes onboarding-enter { from { opacity: .25; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.onboarding-step-heading { display: grid; gap: 8px; }
.onboarding-step-heading h1 { margin: 0; color: var(--forest); font-family: "Yu Mincho", serif; font-size: clamp(28px, 4vw, 39px); line-height: 1.35; }
.onboarding-step-heading p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.8; }
.onboarding-checklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.onboarding-checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 13px; background: #f6f9f7; border: 1px solid #e1e7e3; border-radius: 10px; line-height: 1.6; }
.onboarding-checklist li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; color: #fff; background: #23735e; border-radius: 50%; font-size: 12px; font-weight: 900; }
.onboarding-checklist strong, .onboarding-checklist small { display: block; }
.choice-fieldset { display: grid; gap: 11px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 11px; color: #35423e; font-size: 14px; font-weight: 800; }
.choice-card { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 15px; background: #fff; border: 1px solid #cbd5d0; border-radius: 12px; cursor: pointer; }
.choice-card:hover { border-color: #78968b; background: #fbfdfc; }
.choice-card:focus-within { outline: 3px solid rgba(29,93,82,.2); outline-offset: 2px; }
.choice-card input { width: 19px; min-height: 19px; margin-top: 2px; accent-color: var(--forest-light); }
.choice-card:has(input:checked) { background: #edf6f1; border-color: var(--forest-light); box-shadow: inset 0 0 0 1px var(--forest-light); }
.choice-card:has(input:disabled) { cursor: not-allowed; opacity: .68; }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 4px; line-height: 1.6; }
.choice-card-status { display: inline-flex; width: fit-content; margin-top: 7px; padding: 4px 7px; color: #765b24; background: #fff4da; border-radius: 999px; font-size: 11px; font-weight: 800; }
.choice-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-card-status.is-recommended { color: #fff; background: var(--forest-light); }
.choice-card-status.is-time { color: #38584f; background: #e7efeb; }
.confirmation-panel { display: grid; gap: 14px; padding: 18px; background: #f7faf8; border: 1px solid var(--line); border-radius: 13px; }
.confirmation-panel h2 { margin: 0; color: var(--forest); font-size: 17px; }
.confirmation-list { display: grid; gap: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.confirmation-list > div { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 12px; padding: 11px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.confirmation-list > div:last-child { border-bottom: 0; }
.confirmation-list dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.confirmation-list dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.onboarding-actions { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: auto -12px -12px; padding: 16px 12px 12px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -12px 24px rgba(18,62,55,.05); }
.onboarding-secondary-actions { display: flex; align-items: center; gap: 8px; }
.onboarding-primary-actions { display: flex; gap: 10px; margin-left: auto; }
.onboarding-primary-actions button { min-width: 112px; }
.onboarding-message { margin: -8px 0 0; }
.onboarding-retry { min-height: 40px; padding: 0 13px; font-size: 12px; }
.correction-guide { padding: 13px 15px; background: #fffaf0; border: 1px solid #e0cfae; border-radius: 10px; }
.correction-guide summary { color: var(--forest); cursor: pointer; font-size: 13px; font-weight: 800; }
.correction-guide p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.today-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 22px; padding: clamp(20px, 3vw, 30px); color: #fff; background: linear-gradient(135deg, #123e37, #1d5d52); border-radius: 18px; box-shadow: 0 18px 42px rgba(18,62,55,.16); }
.today-action .eyebrow { color: #f0cf88; }
.today-action h2 { margin: 3px 0 8px; color: #fff; font-family: "Yu Mincho", serif; font-size: clamp(23px, 3vw, 32px); }
.today-action p { margin: 0; color: rgba(255,255,255,.84); line-height: 1.7; }
.today-action-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.today-action-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 12px; }
.today-action-facts span { display: flex; gap: 6px; color: rgba(255,255,255,.82); }
.today-action-facts strong { color: #fff; }
.today-action-cta { display: grid; gap: 8px; width: min(230px, 100%); }
.today-action-cta .primary, .today-action > .primary { min-width: 190px; color: var(--forest); background: #fff; }
.today-action-cta .form-message { margin: 0; color: #fff; }
.setup-center { display: grid; gap: 16px; margin-bottom: 22px; padding: 22px; background: linear-gradient(135deg, #fff 0%, #f5f9f6 100%); border: 1px solid var(--line); border-radius: 16px; }
.setup-center-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.setup-center-heading h2 { margin: 4px 0 0; color: var(--forest); font-family: "Yu Mincho", serif; font-size: 26px; }
.setup-center-heading > p { max-width: 500px; margin: 0; font-size: 13px; line-height: 1.65; }
.module-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-setup-card { display: grid; gap: 11px; padding: 16px; background: #fff; border: 1px solid #dbe3de; border-radius: 13px; }
.module-setup-card.is-priority { border: 2px solid var(--forest-light); box-shadow: 0 10px 24px rgba(18,62,55,.08); }
.module-setup-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.module-setup-card h3 { margin: 0; color: var(--forest); font-size: 16px; }
.module-setup-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.module-setup-card details { border-top: 1px solid #edf0ee; padding-top: 9px; }
.module-setup-card summary { color: var(--forest-light); cursor: pointer; font-size: 12px; font-weight: 800; }
.module-setup-card ul { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 19px; color: #4e5c58; font-size: 12px; line-height: 1.55; }
.priority-label { display: block; margin-bottom: 5px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.module-setup-facts { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 11px; }
.module-setup-action { width: 100%; min-height: 42px; }
.setup-status { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.setup-status.is-active { color: #116345; background: #e6f4ec; }
.setup-status.is-external { color: #72531c; background: #fff3d8; }
.setup-status.is-contract { color: #8a3934; background: #fff0ee; }
.setup-status.is-development { color: #666d6a; background: #eceeed; }
.setup-status.is-pending, .setup-status.is-available { color: #28594d; background: #e7efeb; }
.account-management-heading { margin-top: 34px; margin-bottom: 18px; padding-top: 28px; border-top: 1px solid var(--line); }
.account-management-heading h2 { margin: 4px 0 6px; color: var(--forest); font-family: "Yu Mincho", serif; font-size: 30px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 801px) and (max-height: 900px) {
  .onboarding-layout { padding-top: 28px; padding-bottom: 28px; }
  .onboarding-card {
    min-height: min(590px, calc(100vh - 124px));
    max-height: calc(100vh - 124px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 800px) {
  .environment { display: none; }
  .split-layout { grid-template-columns: 1fr; padding: 36px 18px; }
  .intro-panel h1 { font-size: 38px; }
  .steps { margin-bottom: 12px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading h1 { font-size: 34px; line-height: 1.28; word-break: keep-all; overflow-wrap: normal; }
  .role-summary { grid-template-columns: 1fr; }
  .module-menu-heading { align-items: flex-start; flex-direction: column; }
  .service-context { grid-template-columns: 1fr; align-items: stretch; padding: 16px; }
  .service-property-label, .service-property-fixed, .service-menu-summary { width: 100%; max-width: none; }
  .module-card { grid-template-columns: auto minmax(0,1fr); }
  .module-launch-button { grid-column: 1 / -1; width: 100%; }
  .module-card-message { grid-column: 1 / -1; }
  .marketing-heading { flex-direction: column; }
  .ai-usage-heading, .ai-usage-footer { align-items: stretch; flex-direction: column; }
  .ai-usage-heading label { min-width: 0; }
  .billing-panel-heading, .billing-actions { align-items: stretch; flex-direction: column; }
  .billing-actions button, .billing-actions a { width: 100%; }
  .marketing-property-label { width: 100%; }
  .marketing-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketing-metrics > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .marketing-metrics > div:nth-child(2n) { border-right: 0; }
  .marketing-metrics > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .marketing-metrics > div:nth-last-child(2) { border-bottom: 0; }
  .table-toolbar { flex-direction: column; }
  .table-toolbar input, .table-toolbar select { max-width: none; }
  .account-details > div { grid-template-columns: 1fr; gap: 4px; }
  .payment-row { grid-template-columns: 1fr; }
  .checkout-progress li { grid-template-columns: 1fr; justify-items: center; gap: 5px; text-align: center; }
  .checkout-progress li > span { width: 26px; height: 26px; }
  .checkout-step-actions { align-items: stretch; flex-direction: column; }
  .checkout-step-actions button { width: 100%; }
  .coupon-field-row { grid-template-columns: 1fr; }
  .coupon-field-row .secondary { width: 100%; }
  .coupon-pricing > div { grid-template-columns: 1fr; gap: 3px; }
  .checkout-success .action-link { width: 100%; }
  .property-builder-heading { align-items: stretch; flex-direction: column; }
  .property-builder-heading .secondary { width: 100%; }
  .property-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .remove-property { grid-column: 1 / -1; width: 100%; min-height: 42px; }
  .remove-property:disabled { display: none; }
  .backup-codes { grid-template-columns: 1fr; }
  .dialog-card { padding: 22px 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .onboarding-layout { grid-template-columns: 1fr; padding: 26px 18px 190px; }
  .onboarding-guide { position: static; gap: 18px; }
  .onboarding-guide h2 { font-size: 31px; }
  .onboarding-guide > div:first-child > p:last-child, .onboarding-resume-note { display: none; }
  .onboarding-step-list { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .onboarding-step-list li { display: grid; grid-template-columns: 1fr; justify-items: center; min-height: 38px; padding: 2px; font-size: 0; background: transparent; }
  .onboarding-step-list li::before { width: 30px; height: 30px; font-size: 12px; }
  .onboarding-card { min-height: 0; padding: 24px 18px; }
  .onboarding-card-topline { align-items: flex-start; }
  .onboarding-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    align-items: stretch;
    flex-direction: column-reverse;
    margin: 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }
  .onboarding-secondary-actions { width: 100%; flex-direction: column; }
  .onboarding-secondary-actions button { width: 100%; }
  .onboarding-primary-actions { width: 100%; margin-left: 0; }
  .onboarding-primary-actions button { flex: 1; min-width: 0; }
  .onboarding-skip { min-height: 42px; }
  .confirmation-list > div { grid-template-columns: 1fr; gap: 4px; }
  .setup-center-heading { align-items: flex-start; flex-direction: column; }
  .module-setup-grid { grid-template-columns: 1fr; }
  .today-action { grid-template-columns: 1fr; gap: 18px; }
  .today-action-cta, .today-action-cta .primary, .today-action > .primary { width: 100%; min-width: 0; }
  .workspace { padding: 32px 16px 60px; }
  .table-card { width: 100%; max-width: 100%; }
  .module-card, .module-setup-card { min-width: 0; overflow-wrap: anywhere; }
  .account-management-heading .primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-step { animation: none; }
}
