:root {
  color-scheme: dark;
  --ink: #071017;
  --surface: #0b1520;
  --surface-raised: #0f1e2a;
  --surface-soft: #132634;
  --line: rgba(218, 238, 242, 0.14);
  --line-strong: rgba(218, 238, 242, 0.27);
  --text: #ffffff;
  --text-soft: #eef5f7;
  --text-body: #c7d5db;
  --text-muted: #8ca0aa;
  --text-faint: #647984;
  --accent: oklch(86.5% 0.127 207.078);
  --accent-soft: oklch(91.7% 0.08 205.041);
  --accent-ink: oklch(12.9% 0.042 264.695);
  --cream: #fff0d4;
  --blue: #2853ad;
  --warning: #f2c46f;
  --danger: #f09a9a;
  --max-content: 1120px;
  --radius-sm: 6px;
  --radius-control: 8px;
  --radius-panel: 12px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 28px;
  --space-6: 36px;
  --space-7: 48px;
  --space-8: 64px;
  --focus: #67e8f9;
  font-family: "Pretendard Variable", Pretendard, "Noto Sans CJK KR", "Noto Sans Arabic", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  background: var(--ink);
  scrollbar-color: #52717e var(--ink);
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: clip;
}

body::-webkit-scrollbar { width: 10px; height: 10px; }
body::-webkit-scrollbar-track { background: var(--ink); }
body::-webkit-scrollbar-thumb { background: #52717e; border: 3px solid var(--ink); border-radius: 8px; }
body::-webkit-scrollbar-thumb:hover { background: #7799a5; }

a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
button:disabled { cursor: not-allowed; }

button:focus-visible,
a:focus-visible,
select:focus-visible,
h1:focus-visible,
h2:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, p { margin: 0; }
h1, h2, strong { letter-spacing: -0.025em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; font-weight: 750; }
h2 { font-size: 1.15rem; line-height: 1.2; font-weight: 720; }
p { color: var(--text-body); }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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; }
.skip-link { position: fixed; z-index: 30; top: 12px; left: 16px; transform: translateY(-180%); padding: 10px 14px; border: 1px solid var(--accent); border-radius: var(--radius-control); background: var(--surface); color: var(--text); font-weight: 700; transition: transform 160ms ease-out; }
.skip-link:focus { transform: translateY(0); }

.account-app { min-height: 100dvh; }

/* Auth surface */
.auth-shell { display: grid; grid-template-columns: minmax(320px, 0.84fr) minmax(480px, 1.16fr); min-height: 100dvh; }
.auth-aside { display: flex; flex-direction: column; min-height: 100dvh; padding: clamp(28px, 5vw, 68px) clamp(24px, 5vw, 80px); border-right: 1px solid var(--line); background: var(--surface); }
.brand-lockup, .sidebar-brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; }
.brand-mark img { width: 48px; height: 48px; object-fit: contain; }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand-wordmark strong { font-size: 1.25rem; letter-spacing: -0.04em; }
.brand-wordmark small, .sidebar-brand small { margin-top: 6px; color: var(--accent-soft); font-size: 0.59rem; font-weight: 750; letter-spacing: 0.2em; }
.auth-aside-copy { max-width: 31rem; margin-top: auto; margin-bottom: clamp(40px, 8vw, 104px); }
.auth-aside-copy h1 { max-width: 10ch; font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.055em; }
.auth-aside-copy p { max-width: 34ch; margin-top: 24px; font-size: 1.05rem; line-height: 1.7; }
.aside-note { max-width: 31rem; padding: 20px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.note-heading { display: flex; align-items: center; gap: 9px; color: var(--cream); }
.note-heading .icon { color: var(--accent); }
.aside-note p { margin-top: 8px; font-size: 0.9rem; line-height: 1.65; }
.auth-aside-bottom { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.quiet-link, .text-link, .back-link, .back-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-soft); font-weight: 700; }
.quiet-link { width: fit-content; }
.quiet-link:hover, .text-link:hover, .back-link:hover, .back-inline:hover { color: var(--accent); }
.quiet-link .icon, .text-link .icon { width: 16px; height: 16px; }
.boundary-line { display: flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 0.76rem; }
.boundary-mark { display: inline-block; width: 7px; height: 7px; border: 1px solid var(--accent); background: transparent; }
.auth-main { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; background: var(--ink); }
.auth-topbar, .app-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 16px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.back-link { color: var(--text-muted); font-size: 0.87rem; font-weight: 600; }
.back-link .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.locale-control { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: var(--text-muted); }
.locale-control > .icon { width: 16px; height: 16px; }
.locale-control select { appearance: none; min-width: 108px; padding: 8px 24px 8px 0; border: 0; background: transparent; color: var(--text-soft); font-size: 0.84rem; cursor: pointer; }
.locale-control select option { background: var(--surface); color: var(--text); }
.locale-chevron { position: absolute; right: 0; width: 14px !important; height: 14px !important; pointer-events: none; }
.auth-content { width: min(100% - 48px, 500px); margin: auto; padding: 64px 0 48px; }
.auth-intro h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -0.04em; }
.auth-intro p { margin-top: 12px; font-size: 1rem; }
.notice { display: flex; gap: 12px; margin-top: 32px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--surface); }
.notice > .icon { color: var(--accent); margin-top: 2px; }
.notice strong { display: block; color: var(--text-soft); font-size: 0.9rem; }
.notice p { margin-top: 4px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.55; }
.provider-stack { display: grid; gap: 10px; margin-top: 20px; }
.provider-button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 68px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--text-soft); text-align: left; opacity: 0.56; }
.provider-button:not(:disabled) { opacity: 1; cursor: pointer; transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out; }
.provider-button:not(:disabled):hover { border-color: var(--accent); background: #142b38; color: var(--text); transform: translateY(-1px); }
.provider-button:not(:disabled):active { background: var(--surface-soft); transform: translateY(0); }
.provider-button.provider-busy { opacity: 0.82; cursor: wait; }
.provider-icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; }
.provider-icon.google { color: #d9eef2; }
.provider-icon.apple { color: #ffffff; }
.provider-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.provider-copy strong { font-size: 0.95rem; }
.provider-copy small { color: var(--text-muted); font-size: 0.75rem; }
.provider-state { margin-left: auto; color: var(--text-faint); font-size: 0.72rem; white-space: nowrap; }
.button-primary, .button-secondary, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 11px 16px; border: 1px solid transparent; border-radius: var(--radius-control); font-size: 0.88rem; font-weight: 720; line-height: 1.2; cursor: pointer; transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-soft); transform: translateY(-1px); }
.button-secondary { border-color: var(--line-strong); background: var(--surface-raised); color: var(--text-soft); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent-soft); transform: translateY(-1px); }
.button-small { min-height: 38px; padding: 8px 12px; font-size: 0.79rem; }
.auth-support { margin-top: 22px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.auth-support a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.auth-retry { margin-top: 8px; padding: 0; color: var(--accent-soft); font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.auth-retry:hover { color: var(--accent); }
.auth-footer { display: flex; justify-content: space-between; gap: 16px; width: min(100% - 48px, 500px); margin: auto auto 28px; color: var(--text-faint); font-size: 0.72rem; }

/* App shell */
.app-shell { grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.app-shell:not([hidden]) { display: grid; }
.app-sidebar { display: flex; flex-direction: column; min-height: 100dvh; padding: 24px 18px 20px; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar-brand { padding: 3px 8px; }
.sidebar-brand-mark { display: grid; place-items: center; width: 35px; height: 35px; }
.sidebar-brand-mark img { width: 35px; height: 35px; object-fit: contain; }
.sidebar-brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.sidebar-brand strong { font-size: 1rem; letter-spacing: -0.04em; }
.sidebar-brand small { margin-top: 5px; font-size: 0.5rem; }
.profile-record { display: flex; align-items: center; gap: 10px; margin: 46px 8px 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255, 240, 212, 0.4); border-radius: 50%; background: var(--cream); color: #19212a; font-size: 0.7rem; font-weight: 800; letter-spacing: -0.02em; }
.avatar-large { width: 56px; height: 56px; font-size: 0.88rem; }
.avatar-muted { background: var(--surface-soft); color: var(--text-body); border-color: var(--line-strong); }
.profile-copy, .member-list li > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.profile-copy strong { overflow-wrap: anywhere; font-size: 0.82rem; }
.profile-copy small { margin-top: 2px; color: var(--text-faint); font-size: 0.7rem; }
.app-nav { display: grid; gap: 4px; }
.app-nav a, .sidebar-link { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-control); color: var(--text-muted); font-size: 0.84rem; font-weight: 650; transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out; }
.app-nav a:hover, .sidebar-link:hover { border-color: var(--line); background: var(--surface-raised); color: var(--text-soft); }
.app-nav a[aria-current="page"] { border-color: rgba(103, 232, 249, 0.22); background: rgba(103, 232, 249, 0.08); color: var(--accent-soft); }
.app-nav a[aria-current="page"] .icon { color: var(--accent); }
.app-nav .icon, .sidebar-link .icon { width: 17px; height: 17px; }
.sidebar-bottom { display: grid; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.sidebar-link { min-height: 38px; color: var(--text-faint); font-size: 0.78rem; }
.app-main { min-width: 0; min-height: 100dvh; background: var(--ink); }
.app-topbar { padding-inline: clamp(22px, 4vw, 64px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 0.79rem; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent-soft); }
.breadcrumbs span:last-child { color: var(--text-soft); }
.topbar-tools { display: flex; align-items: center; gap: 22px; }
.screen-content { width: min(100% - 48px, var(--max-content)); margin: 0 auto; padding: 54px 0 72px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.page-heading > div { min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; }
.page-heading p { max-width: 54ch; margin-top: 12px; font-size: 0.98rem; }
.page-heading .button-primary, .page-heading .button-secondary { flex: 0 0 auto; }
.identity-sheet, .workspace-sheet, .profile-sheet { margin-top: 28px; padding: 25px 26px 24px; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--cream); color: #17212a; }
.sheet-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.sheet-heading h2 { color: #17212a; }
.sheet-heading p { margin-top: 6px; color: #4b5a5c; font-size: 0.82rem; }
.state-tag { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 5px 8px; border: 1px solid currentColor; border-radius: var(--radius-sm); font-size: 0.68rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.state-tag .icon { width: 13px; height: 13px; }
.state-ready { color: #12545d; }
.identity-line { display: flex; align-items: center; gap: 15px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(23, 33, 42, 0.2); }
.identity-name { display: flex; flex-direction: column; min-width: 0; }
.identity-name strong { font-size: 1.02rem; }
.identity-name span { margin-top: 3px; color: #5c6868; font-size: 0.75rem; }
.identity-meta, .workspace-meta { display: flex; gap: 24px; margin: 0 0 0 auto; }
.identity-meta div, .workspace-meta div { display: flex; flex-direction: column; gap: 4px; }
.identity-meta dt, .workspace-meta dt, .profile-list dt { color: #5c6868; font-size: 0.68rem; font-weight: 650; }
.identity-meta dd, .workspace-meta dd, .profile-list dd { margin: 0; color: #17212a; font-size: 0.82rem; font-weight: 750; }
.register-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr); gap: 20px; margin-top: 20px; }
.register-panel, .activity-panel, .member-panel, .settings-panel { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 23px 24px 18px; }
.panel-heading p { margin-top: 6px; color: var(--text-muted); font-size: 0.79rem; }
.panel-heading-icon { color: var(--accent); }
.register-row { display: flex; align-items: center; gap: 13px; min-height: 78px; padding: 14px 24px; border-top: 1px solid var(--line); transition: background-color 160ms ease-out; }
.register-row:not(.row-static):hover { background: rgba(103, 232, 249, 0.06); }
.row-icon, .provider-row-icon, .summary-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--accent); }
.row-icon .icon { width: 17px; height: 17px; }
.row-copy { display: flex; flex-direction: column; min-width: 0; }
.row-copy strong { overflow-wrap: anywhere; font-size: 0.88rem; }
.row-copy small { margin-top: 3px; color: var(--text-muted); font-size: 0.74rem; line-height: 1.45; }
.row-end { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.row-end > .icon { color: var(--text-faint); width: 16px; height: 16px; }
.row-action { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.row-action:disabled { opacity: 0.72; }
.state-pending { color: var(--warning); }
.attention-panel { display: flex; flex-direction: column; align-items: flex-start; min-height: 100%; padding: 26px; border: 1px solid rgba(103, 232, 249, 0.25); border-radius: var(--radius-panel); background: var(--surface-raised); }
.attention-icon { width: 23px; height: 23px; margin-bottom: 28px; color: var(--accent); }
.attention-panel h2 { max-width: 16ch; font-size: 1.35rem; line-height: 1.2; }
.attention-panel p { margin-top: 12px; font-size: 0.84rem; line-height: 1.65; }
.attention-panel .text-link { margin-top: auto; padding-top: 34px; font-size: 0.8rem; }
.activity-panel { margin-top: 20px; }
.empty-state { display: flex; align-items: center; gap: 12px; min-height: 110px; padding: 20px 24px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.78rem; }
.empty-state strong { color: var(--text-soft); }
.empty-rule { width: 25px; height: 1px; background: var(--accent); }
.empty-state-small { min-height: 165px; align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 26px; }
.empty-state-small .empty-rule { margin-bottom: 14px; }
.app-footer { display: flex; justify-content: space-between; gap: 16px; width: min(100% - 48px, var(--max-content)); margin: 0 auto; padding: 18px 0 26px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 0.7rem; }
.app-footer a { color: var(--text-muted); }

/* Workspace and security */
.workspace-sheet { display: flex; align-items: center; gap: 15px; }
.workspace-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-control); background: var(--blue); color: var(--cream); font-size: 0.83rem; font-weight: 800; letter-spacing: 0.04em; }
.workspace-title { min-width: 0; }
.workspace-title h2 { color: #17212a; font-size: 1.3rem; }
.workspace-title p { margin-top: 5px; color: #4b5a5c; font-size: 0.8rem; }
.workspace-meta { margin-left: auto; }
.workspace-purpose { margin-top: 20px; padding: 22px 24px 24px; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--surface-raised); }
.purpose-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.purpose-heading h2 { color: var(--text-soft); }
.purpose-heading p { max-width: 50ch; color: var(--text-muted); font-size: 0.8rem; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 21px; }
.boundary-item { min-width: 0; padding-top: 15px; border-top: 1px solid var(--line-strong); }
.boundary-item-shared { border-top-color: rgba(103, 232, 249, 0.5); }
.boundary-label { display: block; color: var(--accent-soft); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.boundary-item strong { display: block; margin-top: 9px; color: var(--text-soft); font-size: 0.9rem; }
.boundary-item p { margin-top: 5px; font-size: 0.77rem; }
.two-column-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.member-list { margin: 0; padding: 0 24px 8px; list-style: none; }
.member-list li { display: flex; align-items: center; gap: 11px; min-height: 68px; border-top: 1px solid var(--line); }
.member-list li > span:nth-child(2) strong { overflow-wrap: anywhere; font-size: 0.82rem; }
.member-list li > span:nth-child(2) small { margin-top: 3px; color: var(--text-muted); font-size: 0.71rem; }
.member-state { margin-left: auto; color: var(--text-faint); font-size: 0.7rem; white-space: nowrap; }
.inline-status, .disabled-explanation { display: flex; align-items: flex-start; gap: 9px; margin: 18px 24px 20px; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--text-muted); font-size: 0.75rem; line-height: 1.5; }
.inline-status .icon, .disabled-explanation .icon { width: 16px; height: 16px; color: var(--warning); margin-top: 1px; }
.security-summary { display: flex; align-items: center; gap: 13px; margin: 28px 0 20px; padding: 20px 22px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.summary-icon { width: 42px; height: 42px; color: var(--warning); border-color: rgba(242, 196, 111, 0.4); }
.security-summary h2 { font-size: 1rem; }
.security-summary p { margin-top: 4px; font-size: 0.78rem; }
.security-summary > .state-tag { margin-left: auto; }
.provider-row-icon { color: var(--text-soft); }
.provider-row-icon .provider-icon { width: 18px; height: 18px; }
.provider-row-icon.google { color: #a9d9e1; }
.provider-row-icon.apple { color: #ffffff; }
.policy-panel { display: flex; align-items: flex-start; gap: 13px; margin-top: 20px; padding: 20px 22px; border: 1px solid rgba(103, 232, 249, 0.25); border-radius: var(--radius-panel); background: var(--surface-raised); }
.policy-panel > .icon { color: var(--accent); margin-top: 2px; }
.policy-panel p { margin-top: 7px; font-size: 0.8rem; }
.policy-panel span { display: block; margin-top: 8px; color: var(--text-faint); font-size: 0.74rem; }

/* Account and deletion */
.profile-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 26px 0 0; padding-top: 20px; border-top: 1px solid rgba(23, 33, 42, 0.2); }
.profile-list dd { margin-top: 4px; }
.settings-panel { margin-top: 20px; }
.settings-panel form { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 24px 22px; }
.settings-panel form > label { width: 100%; color: var(--text-soft); font-size: 0.8rem; font-weight: 700; }
.select-wrap { position: relative; flex: 1 1 240px; min-width: 0; }
.select-wrap select { width: 100%; min-height: 42px; appearance: none; padding: 9px 38px 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--text-soft); cursor: pointer; }
.select-wrap > .icon { position: absolute; top: 12px; right: 11px; color: var(--text-muted); pointer-events: none; }
.form-status { width: 100%; min-height: 20px; color: var(--accent-soft); font-size: 0.75rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 36px; padding: 22px 24px; border: 1px solid rgba(240, 154, 154, 0.4); border-radius: var(--radius-panel); background: rgba(240, 154, 154, 0.04); }
.danger-heading { display: flex; align-items: flex-start; gap: 12px; }
.danger-heading > .icon { color: var(--danger); margin-top: 2px; }
.danger-heading p { margin-top: 6px; font-size: 0.79rem; }
.danger-link { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--danger); font-size: 0.8rem; font-weight: 750; }
.danger-link:hover { color: #ffc1c1; }
.deletion-screen { max-width: 760px; }
.back-inline { margin-bottom: 34px; color: var(--text-muted); font-size: 0.8rem; }
.back-inline .icon { transform: rotate(180deg); width: 16px; height: 16px; }
.deletion-heading { display: flex; align-items: flex-start; gap: 15px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.danger-icon { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid rgba(240, 154, 154, 0.5); border-radius: var(--radius-control); color: var(--danger); }
.deletion-heading p { max-width: 48ch; margin-top: 11px; }
.deletion-panel { margin-top: 28px; padding: 24px; border: 1px solid rgba(240, 154, 154, 0.4); border-radius: var(--radius-panel); background: rgba(240, 154, 154, 0.04); }
.consequence-list { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.consequence-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-body); font-size: 0.85rem; }
.consequence-list li .icon { width: 16px; height: 16px; color: var(--danger); margin-top: 3px; }
.deletion-panel .inline-status { margin-inline: 0; margin-bottom: 0; }
.deletion-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.danger-button { border-color: rgba(240, 154, 154, 0.45); background: rgba(240, 154, 154, 0.09); color: var(--danger); }
.danger-button:disabled { opacity: 0.7; }
.deletion-actions p { flex: 1 1 240px; font-size: 0.76rem; }
.not-found-screen { display: flex; flex-direction: column; align-items: flex-start; max-width: 600px; }
.not-found-mark { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 24px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 1.4rem; font-weight: 700; }
.not-found-screen p { margin-top: 12px; }
.not-found-screen .button-primary { margin-top: 30px; }

html[dir="rtl"] .auth-aside { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .back-link .icon, html[dir="rtl"] .back-inline .icon { transform: none; }
html[dir="rtl"] .row-end, html[dir="rtl"] .identity-meta { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .locale-chevron { right: auto; left: 0; }
html[dir="rtl"] .locale-control select { padding-right: 0; padding-left: 24px; }
html[dir="rtl"] .profile-record { text-align: right; }

@media (max-width: 940px) {
  .auth-shell { grid-template-columns: minmax(280px, 0.72fr) minmax(430px, 1.28fr); }
  .auth-aside { padding-inline: 34px; }
  .register-columns { grid-template-columns: 1fr; }
  .attention-panel { min-height: auto; }
  .attention-panel .text-link { margin-top: 22px; padding-top: 0; }
}

@media (max-width: 800px) {
  .auth-shell { display: block; }
  .auth-aside { min-height: auto; padding: 26px 24px 30px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-aside-copy { margin: 52px 0 30px; }
  .auth-aside-copy h1 { max-width: 14ch; font-size: clamp(2.2rem, 9vw, 3.6rem); }
  .auth-aside-copy p { margin-top: 14px; }
  .aside-note { max-width: none; }
  .auth-aside-bottom { margin-top: 20px; }
  .auth-main { min-height: auto; }
  .auth-content { padding-top: 44px; }
  html[dir="rtl"] .auth-aside { border-left: 0; }
  .app-shell:not([hidden]) { display: block; }
  .app-sidebar { min-height: auto; padding: 16px 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-record { margin: 20px 8px 12px; padding-bottom: 16px; }
  .app-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
  .app-nav a { flex: 0 0 auto; min-height: 40px; }
  .sidebar-bottom { display: flex; justify-content: flex-end; gap: 4px; margin-top: 0; padding: 10px 0 13px; border-top: 1px solid var(--line); }
  .sidebar-link { min-height: 34px; }
  .app-topbar { min-height: 66px; padding-block: 12px; }
  .screen-content { padding-top: 42px; }
}

@media (max-width: 600px) {
  h1 { font-size: clamp(1.8rem, 9vw, 2.7rem); }
  .auth-topbar, .app-topbar { padding-inline: 20px; }
  .back-link { font-size: 0.78rem; }
  .auth-content, .auth-footer { width: min(100% - 40px, 500px); }
  .auth-content { padding-top: 36px; }
  .auth-footer { margin-bottom: 20px; }
  .app-topbar { align-items: center; flex-wrap: wrap; row-gap: 10px; }
  .app-topbar .topbar-tools { order: 1; width: 100%; justify-content: space-between; gap: 10px; }
  .app-topbar .breadcrumbs { order: 2; flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
  .topbar-tools { gap: 10px; }
  .locale-control select { min-width: 92px; font-size: 0.76rem; }
  .screen-content, .app-footer { width: min(100% - 40px, var(--max-content)); }
  .screen-content { padding-top: 36px; padding-bottom: 48px; }
  .page-heading { display: block; padding-bottom: 28px; }
  .page-heading .button-primary, .page-heading .button-secondary { margin-top: 22px; }
  .identity-sheet, .workspace-sheet, .profile-sheet { padding: 20px; }
  .sheet-heading { display: block; }
  .sheet-heading .state-tag { margin-top: 14px; }
  .identity-line, .workspace-sheet { align-items: flex-start; flex-wrap: wrap; }
  .identity-meta, .workspace-meta { width: 100%; margin: 4px 0 0; padding-top: 18px; border-top: 1px solid rgba(23, 33, 42, 0.2); }
  .workspace-title { flex: 1 1 calc(100% - 75px); }
  .workspace-meta { gap: 30px; }
  .workspace-purpose { padding-inline: 18px; }
  .purpose-heading { display: block; }
  .purpose-heading p { margin-top: 8px; }
  .boundary-grid { grid-template-columns: 1fr; gap: 17px; }
  .panel-heading { padding-inline: 18px; }
  .register-row { align-items: flex-start; padding: 15px 18px; }
  .row-copy { padding-top: 2px; }
  .row-end { flex-direction: column; align-items: flex-end; gap: 7px; }
  .row-end > .icon { display: none; }
  .row-action { min-height: 32px; }
  .inline-status, .disabled-explanation { margin-inline: 18px; }
  .two-column-sections { grid-template-columns: 1fr; }
  .security-summary { align-items: flex-start; flex-wrap: wrap; padding-inline: 0; border-left: 0; border-right: 0; }
  .security-summary > .state-tag { width: auto; margin-left: 55px; }
  .profile-list { grid-template-columns: 1fr; gap: 15px; }
  .settings-panel form { padding-inline: 18px; }
  .danger-zone { display: block; padding: 19px 18px; }
  .danger-link { margin-top: 18px; }
  .deletion-heading { display: block; }
  .deletion-heading .danger-icon { margin-bottom: 17px; }
  .deletion-panel { padding: 19px 18px; }
  .consequence-list li { font-size: 0.8rem; }
  .app-footer { display: block; }
  .app-footer a { display: block; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  *, *::before, *::after { border-color: CanvasText; }
  .button-primary, .button-secondary, .danger-button, .provider-button, .register-panel, .activity-panel, .member-panel, .settings-panel, .notice, .attention-panel, .policy-panel { forced-color-adjust: none; }
  .button-primary { background: Highlight; color: HighlightText; }
  .button-secondary, .danger-button { background: Canvas; color: CanvasText; }
}

@media print {
  .app-sidebar, .app-topbar, .app-footer, .auth-aside, .auth-topbar, .auth-footer { display: none !important; }
  .app-shell:not([hidden]) { display: block; }
  .app-main, body, html { background: #fff; color: #111; }
  .screen-content { width: 100%; color: #111; }
}
