    * { box-sizing: border-box; }
    body { margin: 0; min-height: 100dvh; padding: 24px 16px 64px; background: #f7f8fb; color: #16213e; font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif; line-height: 1.6; }
    main { max-width: 720px; margin: 0 auto; }
    .back { color: #9a3412; font-weight: 700; text-decoration: none; }
    .card { margin-top: 18px; padding: clamp(20px, 5vw, 36px); border: 1px solid #d7dce4; border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(22, 33, 62, .06); }
    h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 4vw, 2rem); }
    h2 { margin: 28px 0 8px; font-size: 1.15rem; }
    p { margin: 8px 0 16px; }
    ul { margin: 8px 0 18px; padding-left: 1.5rem; }
    li + li { margin-top: 7px; }
    .muted { color: #596679; }
    .notice { padding: 14px 16px; border: 1px solid #e6c9ad; border-radius: 12px; background: #fff8f2; }
    [hidden] { display: none !important; }
    #accountEmail { overflow-wrap: anywhere; }
    .settings-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 9px; background: #c2410c; color: #fff; text-decoration: none; font-weight: 700; }
    .deletion-entry { margin-top: 32px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
    .deletion-entry p { margin-bottom: 4px; font-size: .9rem; }
    .text-button { padding: 8px 0; background: transparent; color: #9a3412; text-align: left; text-decoration: underline; font-weight: 500; }
    :focus-visible { outline: 3px solid #c2410c; outline-offset: 3px; }
    .notice p:last-child { margin-bottom: 0; }
    .warning { border-left: 4px solid #c2410c; padding: 10px 15px; background: #fff7ed; }
    label { display: block; font-weight: 700; }
    .confirm { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-weight: 500; }
    .confirm input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; }
    #termsConsentNotice .confirm { margin-bottom: 0; }
    button { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 9px; background: #a42c16; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
    button:disabled { opacity: .55; cursor: not-allowed; }
    a { color: #9a3412; }
    #result { min-height: 1.6em; margin: 12px 0 0; font-weight: 700; }
    #result.error { color: #9d1c1c; }
    #result.success { color: #17633f; }
    @media (max-width: 480px) { .card { border-radius: 14px; } button { width: 100%; } }

main { max-width: 820px; }
.card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.account-heading { display: flex; gap: 14px; align-items: center; margin: 24px 0; }
.account-heading img { width: 44px; height: 44px; }
.account-heading h1 { margin: 0; }
.settings-section { padding: clamp(18px, 4vw, 28px); margin: 16px 0; background: white; border: 1px solid #e0e5ec; border-radius: 16px; }
.settings-section h2 { margin: 0 0 18px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#accountEmail { margin: 0 0 16px; font-size: 1.05rem; }
.plan-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.plan-status .badge { flex-shrink: 0; }
#planName { font-size: 1.9rem; }
.badge { padding: 4px 10px; border-radius: 99px; background: #fff0e5; color: #9a3412; font-size: .85rem; }
.plan-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.plan-option { padding: 14px; border: 1px solid #d7dce4; border-radius: 12px; min-width: 0; }
.plan-option.is-current { border-color: #c2410c; background: #fff9f4; }
.settings-section .plan-option h3 { margin: 0 0 5px; font-size: 1rem; }
.plan-option p { font-size: .82rem; margin-bottom: 10px; }
.plan-option a, .plan-option button { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 44px; padding: 8px; border: 1px solid #c2410c; border-radius: 8px; background: white; color: #9a3412; text-decoration: none; font-size: .85rem; }
.plan-option button:disabled { border-color: #d7dce4; color: #596679; background: #f1f5f9; opacity: 1; }
.usage-item + .usage-item { margin-top: 22px; }
.usage-row { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; }
.usage-track { height: 10px; border-radius: 9px; background: #e8edf3; overflow: hidden; }
.usage-fill { height:100%; background:#c2410c; border-radius:inherit; }
.usage-track.segmented { display:flex; gap:4px; background:transparent; }
.usage-track.segmented span { flex:1; border-radius:4px; background:#e8edf3; }
.usage-track.segmented span.remaining { background:#c2410c; }
#sessionList { padding:0; list-style:none; }
#sessionList li { padding:14px 0; border-bottom:1px solid #e5e7eb; }
#sessionList .badge { display:inline-block; margin-left:8px; }
#sessionList p { margin:5px 0 0; font-size:.85rem; }
.outline-button { color:#9a3412; background:white; border:1px solid #c2410c; }
#deleteAccountPanel { background:white; padding:24px; border:1px solid #e0e5ec; border-radius:16px; }
.deletion-entry { margin:24px 0 0; padding:12px clamp(18px, 4vw, 28px); }
.error { color:#9d1c1c; }
@media(max-width:560px) { .plan-options { grid-template-columns:1fr; } .settings-link { width:100%; } }

/* Unified account and subscription settings. */
main { max-width: 960px; }
.account-heading { align-items: center; }
.account-heading h1 { overflow-wrap: anywhere; }
.account-intro { margin-bottom: 20px; }
.settings-section { scroll-margin-top: 20px; }
.settings-section > h2 { margin-top: 0; }
.settings-section h3 { font-size: 1rem; margin: 20px 0 8px; }
#billingVerification h3 { margin-top: 0; }
#billingVerification { margin-bottom: 20px; }
#manageBillingBtn { margin-bottom: 8px; }
#billingFeedback:empty, #verificationFeedback:empty { display: none; }
.billing-policy { font-size: .85rem; margin-bottom: 0; }
.plan-option { display: flex; flex-direction: column; min-width: 0; }
.plan-option button { margin-top: auto; }
.account-support .support-address { color: #c2410c; font-weight: 700; overflow-wrap: anywhere; }
.account-support .action-link { border-color: #c2410c; color: #9a3412; }
.settings-link { font: inherit; font-weight: 700; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
@media (max-width: 600px) { .account-heading { gap: 10px; } }

.account-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.account-menu { position:relative; }
.account-menu summary { display:grid; place-items:center; width:44px; height:44px; list-style:none; cursor:pointer; border:1px solid #d7dce4; border-radius:9px; background:white; font-size:20px; line-height:1; }
.account-menu summary::-webkit-details-marker { display:none; }
.account-menu-panel { position:absolute; z-index:10; right:0; top:calc(100% + 6px); min-width:190px; padding:8px; border:1px solid #d7dce4; border-radius:10px; background:white; box-shadow:0 8px 24px rgba(20,33,62,.15); }
.account-menu-panel a, .account-menu-panel button { display:block; width:100%; min-height:44px; padding:10px 12px; border:0; border-radius:6px; background:transparent; color:#25344b; font-size:.9rem; font-weight:600; line-height:1.6; text-align:left; text-decoration:none; white-space:nowrap; }
.account-menu-panel a:hover, .account-menu-panel button:hover { background:#f3f5f8; }
.account-menu-panel button { border-top:1px solid #e5e9ef; border-radius:0; color:#9a3412; }
.account-menu-status { margin:4px 12px; color:#9d1c1c; font-size:.85rem; }
.account-menu-status:empty { display:none; }

.vault-deadline { margin: 0 0 16px; }
.vault-deadline h3 { margin: 0 0 4px; }
.vault-deadline .settings-link { margin-top: 4px; }
.team-end-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; border: 1px solid #d7dce4; border-radius: 16px; padding: 24px; color: #16213e; }
.team-end-dialog::backdrop { background: rgba(18,28,45,.5); }
.team-end-dialog h2 { margin: 0 0 12px; font-size: 1.15rem; }
.team-end-dialog dl { margin: 0 0 12px; }
.team-end-dialog dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.team-end-dialog dt { flex: none; color: #596679; }
.team-end-dialog dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 480px) { .team-end-dialog dl div { flex-direction: column; gap: 2px; } .team-end-dialog dd { text-align: left; } .dialog-actions { flex-direction: column-reverse; } }
