/* Shared account surfaces and server-priced token controls. */
:root { --account-glass: color-mix(in srgb, var(--panel-solid) 78%, transparent); }
.token-symbol { color: var(--accent); line-height: 1; }
.token-eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
html body.app-page :is(.account-options, .account-menu) {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 50%), var(--account-glass);
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    box-shadow: 0 24px 80px #00000018, inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
html body.app-page .account-menu-tabs { background: color-mix(in srgb, var(--panel-solid) 40%, transparent); }
html body.app-page .account-menu { width: min(840px, 94vw); height: min(590px, 88dvh); }
.account-panel[data-account-panel="account"]:not([hidden]) { width: min(100%, 480px); gap: .7rem; }
.account-options-content .account-panel[data-account-panel="account"]:not([hidden]) { width: min(100%, 480px); }
html body.app-page :is(.account-options, .account-menu) .account-tab { font-size: 14px; }
.account-panel h3 { font-size: 21px; }
.account-options h1 { font-size: 28px; }
.account-panel :is(label, button), .account-panel .compact-modal-form label { font-size: 14px; }
.account-panel :is(input, textarea) { font-size: 16px; }
.account-panel .muted, .account-panel .offer-actions a { font-size: 14px; }
.account-identity-card { display: flex; align-items: center; gap: 1rem; padding: .6rem 0 1.4rem; min-width: 0; }
.account-monogram { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 17%, transparent), color-mix(in srgb, var(--accent-2) 12%, transparent)); color: var(--accent); font-size: 30px; }
.account-identity-card > div { min-width: 0; }
.account-identity-card strong { font-size: 21px; }
.account-identity-card p { margin: .2rem 0; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.account-identity-card small { color: var(--muted); font-size: 13px; }
.account-wallet { position: relative; overflow: hidden; padding: 1.3rem 1.4rem 1rem; border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line)); border-radius: 18px; background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent-2) 15%, transparent), transparent 65%), linear-gradient(120deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent); }
.account-wallet-amount { display: flex; align-items: baseline; gap: .5rem; margin: .8rem 0 1.3rem; color: var(--text); font-size: clamp(36px, 7vw, 48px); line-height: 1; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.account-wallet-amount .token-symbol { font-size: .65em; align-self: center; margin-right: .1rem; }
.account-wallet-amount small { color: var(--muted); font-size: 17px; font-weight: 400; letter-spacing: 0; }
.account-wallet-footer { display: flex; justify-content: space-between; gap: 1rem; font-size: 14px; color: var(--muted); }
.account-wallet-footer a { white-space: nowrap; color: var(--text); }
.account-wallet-footer a span { margin-left: .3rem; color: var(--accent); }
.account-wallet-unavailable { font-size: 19px; margin: 1rem 0; }
.account-token-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-top: 1rem; }
.account-token-rates > span { padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--muted); }
.account-token-rates strong { float: right; color: var(--text); font-weight: 600; }
.account-rates-caption { color: var(--muted); text-align: right; font-size: 12px; margin: .3rem 0 1.4rem; }
.sidebar-account-identity { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.sidebar-account-identity > strong { overflow: hidden; text-overflow: ellipsis; }
.sidebar-token-balance { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: 3px; padding: 3px 6px; border: 1px solid transparent; border-radius: 20px; background: linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box, repeating-linear-gradient(115deg, #a67937 0 2px, #ead19b 2px 4px, #b68b48 4px 6px) border-box; font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; box-shadow: inset 0 1px 2px #d8b16a14; }
.sidebar-account span.sidebar-token-balance { display: inline-flex; padding: 3px 6px; }
.sidebar-account span.token-symbol { display: inline; padding: 0; }
.sidebar-account-identity > strong { font-size: 14px; }
.subscription-nav-symbol { width: 24px; text-align: center; color: var(--accent); font-size: 25px; }
html body.app-page .account-tab:disabled,
html body.app-page a[aria-disabled="true"] {
    color: var(--muted); opacity: .55; cursor: not-allowed;
    background: transparent; border-color: transparent; box-shadow: none;
}
a[aria-disabled="true"] .subscription-nav-symbol { color: inherit; }
.subscription-unavailable { max-width: 480px; margin: 2rem auto; text-align: center; color: var(--muted); }
.subscription-unavailable h2 { color: var(--text); }
.mobile-token-link { display: none; text-decoration: none; }
.token-plans-emblem { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 19px; background: linear-gradient(135deg, #ed80633b, #aa86dc30); color: var(--accent); font-size: 34px; border: 1px solid var(--line); box-shadow: 0 8px 24px #bd65421a; }
.token-plan-badge { position: absolute; top: -12px; right: 18px; padding: 6px 12px; border-radius: 999px; background: var(--plan-accent); color: #201b2d; font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px #0002; }
.registration-token-gift { color: var(--text); font-size: 15px; }
.registration-token-gift .token-symbol { margin-right: .3rem; }

/* The native dialog contains keyboard focus; the decoration never catches input. */
.token-gift-dialog { width: min(420px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 2.2rem 2rem 1.2rem; overflow-y: auto; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 24px; background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--panel-solid); color: var(--text); text-align: center; box-shadow: 0 30px 100px #0005; }
.token-gift-dialog::backdrop { background: #11131d70; backdrop-filter: blur(8px); }
.token-gift-dialog h2 { margin: .7rem 0; font-size: 33px; line-height: 1.15; letter-spacing: -.04em; }
.token-gift-dialog > p:not(.token-gift-amount) { font-size: 16px; line-height: 1.6; color: var(--muted); }
.token-gift-amount { margin: 1.3rem 0 .8rem; font-size: 56px; font-weight: 650; letter-spacing: -.04em; }
.token-gift-amount .token-symbol { display: inline-block; margin-right: .3rem; font-size: .6em; vertical-align: middle; }
.token-gift-amount small { font-size: 17px; font-weight: 400; letter-spacing: 0; }
.token-gift-dialog .button { width: 100%; margin-top: .7rem; min-height: 44px; }
.token-gift-burst { position: relative; display: grid; place-items: center; width: 110px; height: 110px; margin: -.5rem auto .8rem; pointer-events: none; }
.token-gift-box { width: 88px; height: 88px; overflow: visible; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--accent) 20%, transparent)); }
.token-gift-box-body { fill: color-mix(in srgb, var(--accent) 14%, var(--panel-solid)); }
.token-gift-lid { transform-origin: 40px 30px; }
.token-gift-dialog[open] .token-gift-lid { animation: token-gift-open .8s ease-out both; }
@keyframes token-gift-open { from { transform: translateY(0) rotate(0); } to { transform: translateY(-8px) rotate(-9deg); } }
.token-gift-burst i { position: absolute; left: 50%; top: 50%; width: 4px; height: 8px; border-radius: 3px; background: var(--accent); opacity: 0; transform: rotate(calc(var(--burst-index) * 30deg)) translateY(-25px); }
.token-gift-dialog[open] .token-gift-burst i { animation: token-gift-burst 1.1s ease-out calc(var(--burst-index) * 18ms) both; }
.token-gift-burst i:nth-child(even) { background: var(--accent-2); }
@keyframes token-gift-burst { 15% { opacity: .9; } 100% { opacity: 0; transform: rotate(calc(var(--burst-index) * 30deg + 12deg)) translateY(-65px); } }
.token-action-status { min-height: 1.2em; margin: .6rem 0 0; }

.subscriptions-page .content-frame > .page-shell { min-width: 0; grid-template-columns: minmax(0, 1fr); align-items: start; }
.token-plans { width: min(1280px, 100%); min-width: 0; max-width: 100%; margin: auto; padding: 24px 18px; box-sizing: border-box; background: transparent; }
.token-plan-accessible-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.token-plan-card.token-plan-gold { --plan-accent: #d7b568; }
.token-plan-card.is-current { border-color: var(--plan-accent); transform: translateY(-5px) scale(1.025); box-shadow: 0 0 0 1px #d7b56850, 0 14px 36px #0003; }
.token-plan-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--plan-angle), transparent 10%, var(--plan-accent), #f5d29b, #a798e1, var(--plan-accent), transparent 90%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
@property --plan-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes plan-outline-orbit { to { --plan-angle: 360deg; } }
.token-plan-card:is(.is-selected, :focus-within)::before { opacity: 1; }
@media (hover: hover) {
    .token-plan-card:hover { border-color: var(--plan-accent); transform: translateY(-6px); box-shadow: 0 12px 36px color-mix(in srgb, var(--plan-accent) 24%, transparent); }
    .token-plan-card:hover::before { opacity: 1; animation: plan-outline-orbit 4s linear infinite; }
    .token-plan-card:hover .token-plan-icon { transform: translateY(-2px) rotate(-5deg); }
}
.token-plan-icon { transition: transform 180ms ease; }
.token-plan-card.is-current:hover { transform: translateY(-6px) scale(1.025); }
.account-options-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.account-panel[data-account-panel="subscription"]:not([hidden]) { width: min(100%, 480px); gap: 10px; }
.account-panel[data-account-panel="subscription"] .account-wallet { width: 100%; }
.account-panel[data-account-panel="subscription"] .account-wallet-amount { margin: 5px 0; }
.account-panel[data-account-panel="subscription"] .account-token-rates { width: 100%; }
.token-plans-header { text-align: center; margin-bottom: 2rem; }
.token-plans-header h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.05em; margin: .7rem 0; }
.token-plans-header > p { font-size: 17px; color: var(--muted); margin: 0 0 1rem; }
.token-plans-balance { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; font-size: 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--account-glass); }
.token-plan-grid { display: grid; min-width: 0; max-width: 100%; box-sizing: border-box; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 1rem; }
.token-plan-card { --plan-accent: #e4a17b; position: relative; display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid color-mix(in srgb, var(--plan-accent) 45%, var(--line)); border-radius: 22px; background: radial-gradient(ellipse at 10% 0, color-mix(in srgb, var(--plan-accent) 23%, transparent), transparent 75%), color-mix(in srgb, var(--panel-solid) 72%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 12px 35px #00000012, inset 0 1px 0 #ffffff0a; transition: border-color .2s, transform .2s, box-shadow .2s; }
.token-plan-violet { --plan-accent: #aaa1df; }
.token-plan-aqua { --plan-accent: #83bdb4; }
.token-plan-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: var(--plan-accent); background: color-mix(in srgb, var(--plan-accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--plan-accent) 25%, transparent); }
.token-plan-icon svg { width: 36px; height: 36px; }
.token-plan-card h2 { font-size: 21px; font-weight: 500; margin: .7rem 0 1.7rem; }
.token-plan-amount { margin: 0 0 .6rem; font-size: clamp(32px, 3vw, 40px); font-weight: 650; letter-spacing: -.04em; }
.token-plan-amount small { display: block; margin-top: .3rem; font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.token-plan-pages { font-size: 15px; line-height: 1.6; min-height: 3em; margin: .8rem 0; }
.token-plan-pages strong { color: var(--plan-accent); }
.token-plan-card ul { margin: .8rem 0 1.5rem; padding: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 14px; line-height: 2.3; }
.token-plan-card li::before { content: '✓'; color: var(--plan-accent); margin-right: .5rem; }
html body.app-page .token-plan-select { width: 100%; margin-top: auto; min-height: 44px; font-size: 15px; background: color-mix(in srgb, var(--plan-accent) 11%, transparent); border: 1px solid color-mix(in srgb, var(--plan-accent) 35%, transparent); color: var(--text); box-shadow: none; }
.token-plan-card.is-selected { border-color: var(--plan-accent); transform: translateY(-3px); }
.token-plan-preview-status, .token-plans-notice { text-align: center; font-size: 15px; color: var(--muted); margin: 1.3rem 0 .8rem; }
.token-plans-notice { color: var(--accent); }
.token-plans-back { display: block; width: max-content; margin: auto; font-size: 15px; }
.upload-mode-price { display: block; margin: 0; color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 400; }
.has-upload-pages .mangayaku-upload-options { align-self: center; width: 100%; max-height: 100%; padding: 24px; gap: 18px; border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: 26px; background: var(--account-glass); box-shadow: 0 18px 48px #00000024, inset 0 1px 0 #ffffff45; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.has-upload-pages .mangayaku-upload-options > * { flex-shrink: 0; }
.has-upload-pages .mangayaku-upload-actions { position: static; margin-top: 6px; background: transparent; border-top: 1px solid color-mix(in srgb, var(--text) 25%, transparent); padding-top: 14px; gap: 14px; }
.registration-token-count { color: var(--accent-ink, var(--accent)); font-size: 12px; font-weight: 500; white-space: nowrap; }
.mangayaku-upload .mangayaku-profile-options { width: 100%; max-width: 560px; margin-inline: auto; gap: 10px; }
.has-upload-pages .mangayaku-profile-options legend { display: flex; align-items: center; gap: 14px; width: 100%; text-align: center; text-transform: none; letter-spacing: normal; padding-bottom: 16px; font-size: 18px; color: var(--text); font-weight: 600; }
.has-upload-pages .mangayaku-profile-options legend::before, .has-upload-pages .mangayaku-profile-options legend::after { content: ''; height: 1px; flex: 1; background: color-mix(in srgb, var(--text) 25%, transparent); }
html body.app-page .mangayaku-upload .mangayaku-profile-options .phase5g-profile-card > span { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 122px; min-height: 122px; padding: 12px 5px; border: 1px solid color-mix(in srgb, var(--text) 20%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--panel-solid) 86%, transparent); color: var(--text); box-shadow: inset 0 1px 0 #ffffff30, 0 4px 10px #00000005; }
html body.app-page .mangayaku-upload .mangayaku-profile-options .phase5g-profile-card input:checked + span { border-color: var(--accent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 4%, var(--panel-solid)), color-mix(in srgb, var(--accent) 12%, var(--panel-solid))); color: var(--accent-ink, var(--accent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent); }
html body.app-page .mangayaku-upload .mangayaku-profile-options .phase5g-profile-card input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mangayaku-upload .mangayaku-profile-options .phase5g-profile-card strong { font-size: 16px; font-weight: 600; line-height: 22px; }
.upload-mode-icon { width: 48px; height: 38px; color: var(--muted); flex-shrink: 0; }
.phase5g-profile-card input:checked + span .upload-mode-icon, .phase5g-profile-card input:checked + span .upload-mode-price { color: inherit; }
.upload-mode-check { position: absolute; top: -7px; right: -4px; display: none; width: 26px; height: 26px; padding: 4px; border: 1px solid #fff9; border-radius: 50%; background: linear-gradient(135deg, #ff8e76, #c83829); color: #fff; box-shadow: inset 0 1px 1px #fff7, 0 3px 8px #d04a3420; }
.phase5g-profile-card input:checked + span .upload-mode-check { display: block; }
.mangayaku-upload .mangayaku-translation-scope { width: 100%; max-width: 560px; margin-inline: auto; min-height: 66px; padding: 14px; gap: 14px; border: 1px solid color-mix(in srgb, var(--line) 32%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--panel-solid) 25%, transparent); }
.mangayaku-upload .mangayaku-translation-scope input { width: 22px; height: 22px; }
.mangayaku-upload .mangayaku-translation-scope strong { font-size: 15px; font-weight: 600; line-height: 22px; color: var(--text); }
.mangayaku-upload .mangayaku-translation-scope small { font-size: 13px; font-weight: 400; line-height: 20px; color: var(--muted); }
.has-upload-pages .mangayaku-upload .mangayaku-reference-drop { display: flex; flex-direction: column; justify-content: center; min-height: 140px; padding: 16px 12px; gap: 5px; margin: 0; border: 1px dashed color-mix(in srgb, var(--accent) 36%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--panel-solid) 24%, transparent); box-shadow: 0 5px 16px #00000004; text-align: center; }
.upload-reference-icon { width: 48px; height: 45px; margin-bottom: 3px; color: var(--muted); }
.upload-reference-plus { fill: #d74e3b; stroke: #fff8f0; stroke-width: 2px; }
.mangayaku-upload .mangayaku-reference-drop strong { font-size: 16px; font-weight: 600; }
.mangayaku-upload .mangayaku-reference-drop .upload-reference-help { font-size: 14px; line-height: 20px; font-weight: 400; }
.mangayaku-references .phase5g-file-order:empty { display: none; }
.mangayaku-upload-actions [data-upload-summary] { font-size: 14px; color: var(--muted); }
.has-upload-pages .mangayaku-upload-actions > .upload-start-row:has(.upload-token-total) { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; }
.has-upload-pages .upload-start-row:has(.upload-token-total) > [data-submit-job] { width: auto; min-width: 130px; margin-left: auto; }
.upload-token-total { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; row-gap: 3px; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.upload-token-icon { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 38px; height: 42px; padding: 7px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 5%, transparent); color: var(--text); }
.upload-token-total > :not(svg) { grid-column: 2; }
.upload-token-total small { font-weight: 400; font-size: 14px; }
html body.app-page.has-upload-pages .mangayaku-upload .button[data-submit-job] { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 150px; min-height: 52px; padding: 12px 24px; border: 1px solid #ffb49b; border-radius: 999px; background: linear-gradient(120deg, #f16d58, #b93628); color: #fffaf5; box-shadow: inset 0 2px 1px #ffffff55, 0 10px 22px #cf4a2926; font-size: 19px; font-weight: 700; }
.mangayaku-upload [data-submit-job] svg { flex: 0 0 20px; width: 20px; height: 20px; }
.has-upload-pages .upload-token-total > button { width: max-content; min-height: 28px; padding: .2rem 0; border: 0; background: transparent; box-shadow: none; color: var(--accent); font-size: 14px; }
.upload-token-total > button[hidden] { display: none; }
.mangayaku-saved-source { padding: .7rem 0; }
.mangayaku-saved-source strong, .mangayaku-saved-source small { display: block; font-size: 16px; }
.mangayaku-saved-source small { margin-top: .25rem; color: var(--muted); font-size: 14px; }
html[data-theme="light"] { --account-glass: #fff4e8f5; }
html[data-theme="light"] .has-upload-pages .mangayaku-upload-options { background: linear-gradient(140deg, #fffaf5f0, #fff4eaf0); border-color: #fffaf2; outline: 1px solid #a8958470; box-shadow: 0 18px 48px #3b211c33, inset 0 1px 0 #fff; }
html[data-theme="light"] body.app-page :is(.account-options, .account-menu) { border-color: #b9876259; box-shadow: 0 20px 60px #70412114, inset 0 1px 0 #fff9; }
html[data-theme="light"] .account-wallet { background: radial-gradient(ellipse at 100% 0, #e1d1f169, transparent 70%), linear-gradient(120deg, #f8dcc8b3, #ffedd380); border-color: #b9876266; }
html[data-theme="light"] .account-token-rates > span { background: #fff7ef80; border-color: #b9876240; }
html[data-theme="light"] .token-plan-pages strong { color: color-mix(in srgb, var(--plan-accent) 40%, #35251c); }
html[data-theme="light"] .token-plan-card { background: linear-gradient(135deg, #ffecdac9, #fff6edb8); border-color: color-mix(in srgb, var(--plan-accent) 60%, #947b6b); }
html[data-theme="light"] .token-plan-violet { background: linear-gradient(135deg, #efe6f5c9, #fbf3f0b8); }
html[data-theme="light"] .token-plan-aqua { background: linear-gradient(135deg, #e7f1eac9, #f7f5eab8); }
html[data-theme="light"] .token-plan-card :is(ul, .token-plan-amount small) { color: #655044; }
html[data-theme="light"] :is(.token-eyebrow, .token-plans-notice, .account-wallet-footer a span) { color: var(--accent-ink, #8b4931); }
html[data-theme="light"] .token-gift-dialog { background: radial-gradient(ellipse at 50% 0, #f7d9bc, transparent 65%), #fff5e9; border-color: #b9876266; }
@media (min-width: 1025px) {
    html body.app-page .account-options { display: grid; grid-template-columns: 170px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 20px; row-gap: 18px; }
    .account-options h1 { grid-column: 1 / -1; }
    .account-options-tabs { grid-template-columns: minmax(0, 1fr); align-self: start; }
    .app-page.has-upload-pages .mangayaku-upload { height: auto; max-height: min(640px, calc(100dvh - 64px)); align-self: center; }
    .app-page.has-upload-pages .mangayaku-upload .phase5g-form { height: auto; max-height: inherit; }
    .has-upload-pages .mangayaku-upload-options { max-height: min(640px, calc(100dvh - 64px)); gap: 18px; padding: 24px; }
    .has-upload-pages .mangayaku-upload-actions { margin-top: 4px; }
}
@media (max-width: 1024px) {
    .mobile-token-link { position: absolute; top: 44px; right: 0; display: inline-flex; min-height: 28px; padding: 2px 10px; font-size: 16px; }
    .subscription-top-link { display: none; }
    html body.app-page .account-options { width: 100%; min-height: 0; padding: 1rem; border-radius: 20px; }
    .token-plans { padding-top: 1rem; }
}
@media (max-width: 700px) {
    .account-options-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .has-upload-pages .mangayaku-upload-options { padding: 18px 16px; gap: 14px; }
    .has-upload-pages .mangayaku-profile-options legend { font-size: 16px; gap: 10px; padding-bottom: 14px; }
    html body.app-page .mangayaku-upload .mangayaku-profile-options .phase5g-profile-card > span { height: 98px; min-height: 98px; gap: 4px; padding: 10px 3px; border-radius: 12px; }
    .mangayaku-upload .mangayaku-profile-options .phase5g-profile-card strong { font-size: 14px; line-height: 20px; }
    .upload-mode-icon { width: 38px; height: 30px; }
    .upload-mode-check { width: 22px; height: 22px; padding: 3px; right: -3px; }
    .mangayaku-upload .mangayaku-translation-scope { padding: 12px; gap: 10px; }
    .mangayaku-upload .mangayaku-translation-scope strong { font-size: 14px; line-height: 20px; }
    .mangayaku-upload .mangayaku-translation-scope small { font-size: 12px; line-height: 18px; }
    .has-upload-pages .mangayaku-upload .mangayaku-reference-drop { min-height: 120px; padding: 12px 8px; }
    .mangayaku-upload .mangayaku-reference-drop strong { font-size: 15px; }
    .mangayaku-upload .mangayaku-reference-drop .upload-reference-help { font-size: 12px; line-height: 18px; }
    .upload-token-total { grid-template-columns: 30px minmax(0, 1fr); column-gap: 6px; font-size: 20px; }
    .upload-token-icon { width: 30px; height: 36px; padding: 5px; }
    html body.app-page.has-upload-pages .mangayaku-upload .button[data-submit-job] { min-width: 106px; min-height: 48px; padding: 10px 16px; gap: 7px; font-size: 17px; }
    .upload-start-row .upload-token-total small { font-size: 12px; line-height: 18px; }
    .account-identity-card p, .account-identity-card small, .account-wallet-footer, .account-token-rates > span, .account-rates-caption, .registration-token-gift, .token-eyebrow, .upload-token-total small { font-size: 14px; }
    .account-identity-card { gap: .7rem; padding-bottom: 1rem; }
    .account-wallet { padding: 1rem; }
    .account-wallet-footer { gap: .5rem; }
    .account-token-rates > span { padding: .55rem .5rem; }
    .token-plan-grid { grid-auto-columns: minmax(255px, 82%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px .1rem 1rem; overscroll-behavior-x: contain; scrollbar-width: thin; }
    .token-plan-card { scroll-snap-align: center; padding: 1.4rem; }
    .token-plans-header { margin-bottom: 1.2rem; }
    .token-plan-card h2 { margin-bottom: 1rem; }
    .token-plan-card ul { margin-top: .2rem; }
    .token-plans-notice { margin-top: .5rem; }
    .has-upload-pages .upload-start-row:has(.upload-token-total) > [data-submit-job] { min-width: 100px; }
}
@media (max-width: 360px) {
    html body.app-page .account-options { padding: .7rem; }
    .account-monogram { flex-basis: 42px; width: 42px; height: 42px; border-radius: 13px; }
    .account-wallet-footer > span { max-width: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
    .token-gift-dialog[open] .token-gift-burst i { animation: none; }
    .token-gift-dialog[open] .token-gift-lid { animation: none; transform: translateY(-8px) rotate(-9deg); }
    .token-plan-card, .token-plan-icon { transition: none; }
    .token-plan-card::before { animation: none !important; }
}
