:root {
  --navy-950: #14203a;
  --navy-900: #1f2d4f;
  --navy-800: #2b3c63;
  --sand-600: #a88d64;
  --sand-500: #b79c73;
  --sand-200: #e8ddcc;
  --cream-100: #f8f6f1;
  --cream-200: #f1eee7;
  --white: #fff;
  --ink: #1f2937;
  --muted: #667085;
  --line: #e5e7eb;
  --success: #16794e;
  --success-bg: #e9f7f0;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --warning: #a15c00;
  --warning-bg: #fff7e6;
  --shadow-sm: 0 1px 2px rgba(20, 32, 58, .05), 0 4px 14px rgba(20, 32, 58, .05);
  --shadow-lg: 0 20px 50px rgba(20, 32, 58, .16);
  --radius-sm: 10px;
  --radius: 18px;
  --sidebar-width: 282px;
  --sans: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream-100); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--cream-100); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #d49a2f; outline-offset: 3px; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 24px 18px 18px; background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); color: #fff; box-shadow: 8px 0 30px rgba(20, 32, 58, .12); }
.brand { display: flex; min-height: 67px; align-items: center; padding: 0 9px 23px; border-bottom: 1px solid rgba(255,255,255,.11); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 19px; letter-spacing: .01em; }
.brand small { margin-top: 1px; color: rgba(255,255,255,.62); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 18px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-label { margin: 19px 12px 8px; color: rgba(255,255,255,.42); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-item, .nav-group summary { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: rgba(255,255,255,.75); cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.nav-item:hover, .nav-group summary:hover { background: rgba(255,255,255,.07); color: #fff; }
.assistant-nav-item { margin-top: 5px; }
.nav-item.is-active { background: rgba(183,156,115,.18); color: #fff; }
.nav-item svg, .nav-group summary svg { width: 19px; height: 19px; color: var(--sand-500); }
.nav-group { margin: 2px 0; }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "›"; margin-left: auto; font-size: 20px; font-weight: 400; transform: rotate(0); transition: transform .2s; }
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group > div { display: grid; margin: 3px 0 8px 43px; gap: 1px; }
.nav-group > div a { padding: 7px 9px; border-radius: 8px; color: rgba(255,255,255,.58); font-size: 13px; text-decoration: none; }
.nav-group > div a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-group > div a.is-active { background: rgba(183,156,115,.18); color: #fff; }
.nav-admin-group { margin-top: 16px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.11); }
.sidebar-footer { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 15px 9px 0; border-top: 1px solid rgba(255,255,255,.11); }
.avatar, .topbar-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--sand-500); color: #fff; font-weight: 800; text-decoration: none; }
.avatar { width: 36px; height: 36px; }
.avatar, .topbar-avatar { overflow: hidden; }
.avatar img, .topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-footer strong, .sidebar-footer small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer small { color: rgba(255,255,255,.52); font-size: 10px; }
.logout-form { margin: 0; }
.logout-link { padding: 3px; border: 0; background: transparent; color: rgba(255,255,255,.6); cursor: pointer; font-size: 12px; text-decoration: none; }
.logout-link:hover { color: #fff; }

.app-content { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; height: 78px; align-items: center; gap: 18px; padding: 0 clamp(22px, 4vw, 54px); border-bottom: 1px solid rgba(20,32,58,.08); background: rgba(248,246,241,.92); backdrop-filter: blur(14px); }
.topbar-title { min-width: 0; }
.topbar-title strong, .topbar-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title strong { color: var(--navy-900); font-family: var(--serif); font-size: 20px; }
.topbar-title small { color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topbar-documents, .topbar-assistant, .topbar-calendar { display: flex; align-items: center; gap: 7px; color: var(--navy-800); font-size: 13px; font-weight: 700; text-decoration: none; }
.topbar-avatar { width: 38px; height: 38px; }
.text-size-button { width: 42px; height: 42px; border: 1px solid #cfd4dc; border-radius: 12px; background: #fff; color: var(--navy-900); cursor: pointer; font-size: 14px; font-weight: 900; }
.text-size-button[aria-pressed="true"] { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.mobile-menu-button { display: none; }
.icon-button { width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy-900); cursor: pointer; }
.main-content { width: min(1480px, 100%); min-height: calc(100vh - 130px); margin: 0 auto; padding: 34px clamp(22px, 4vw, 54px) 54px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px clamp(22px, 4vw, 54px); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-backdrop { display: none; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy-900); font-family: var(--serif); line-height: 1.18; }
.eyebrow { margin-bottom: 7px; color: var(--sand-600); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.page-heading h1 { margin-bottom: 8px; font-size: clamp(31px, 4vw, 48px); font-weight: 600; letter-spacing: -.025em; }
.page-heading > div > p:last-child { max-width: 710px; margin-bottom: 0; color: var(--muted); }
.surface { border: 1px solid rgba(20,32,58,.08); border-radius: var(--radius); background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 750; line-height: 1.2; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; }
.button-primary { background: var(--navy-900); color: #fff; box-shadow: 0 6px 18px rgba(31,45,79,.17); }
.button-primary:hover { background: var(--navy-800); }
.button-secondary { border-color: var(--line); background: #fff; color: var(--navy-900); }
.button-secondary:hover { border-color: #c8ccd4; background: #fbfbfc; }
.button-danger { border-color: #f1cac6; background: var(--danger-bg); color: var(--danger); }
.text-link { color: var(--navy-800); font-size: 13px; font-weight: 700; }

.alert { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 12px 16px; border: 1px solid; border-radius: 12px; font-size: 13px; }
.alert button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 19px; }
.alert-success { border-color: #bfe2d1; background: var(--success-bg); color: var(--success); }
.alert-error { border-color: #f2cac5; background: var(--danger-bg); color: var(--danger); }
.alert-warning { border-color: #efd5aa; background: var(--warning-bg); color: var(--warning); }

.filters-surface { margin-bottom: 18px; padding: 14px; }
.filters { display: flex; align-items: flex-end; gap: 10px; }
.filters > label:not(.search-control) { display: grid; min-width: 150px; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.search-control { position: relative; flex: 1; min-width: 210px; }
.search-control svg { position: absolute; top: 12px; left: 13px; width: 17px; height: 17px; color: #98a2b3; }
.search-control input { width: 100%; padding-left: 40px; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid #d8dce3; border-radius: 10px; outline: none; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input, select { padding: 9px 12px; }
textarea { resize: vertical; padding: 11px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--sand-500); box-shadow: 0 0 0 3px rgba(183,156,115,.16); }
input::placeholder, textarea::placeholder { color: #98a2b3; }

.table-surface { overflow: hidden; }
.table-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.table-meta strong { color: var(--navy-900); font-size: 13px; }
.table-meta span { color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: middle; }
th { background: #faf9f6; color: #687083; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
td { max-width: 280px; color: #344054; font-size: 13px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbfaf7; }
tbody tr:last-child td { border-bottom: 0; }
.actions-column { width: 132px; text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.mini-button { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy-800); text-decoration: none; }
.mini-button:hover { border-color: var(--sand-500); color: var(--sand-600); }
.mini-button svg { width: 16px; height: 16px; }
.mini-button.is-danger { color: var(--danger); }
.mini-button.is-danger:hover { border-color: #e6a39d; background: var(--danger-bg); color: var(--danger); }
.row-actions form { display: inline-flex; margin: 0; }

.empty-state { display: grid; min-height: 360px; place-items: center; align-content: center; padding: 50px 24px; text-align: center; }
.empty-state h2 { margin: 15px 0 7px; font-size: 24px; }
.empty-state p { max-width: 430px; margin-bottom: 20px; color: var(--muted); }
.empty-icon, .privacy-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 19px; background: var(--cream-200); color: var(--sand-600); }
.empty-icon svg, .privacy-icon svg { width: 28px; height: 28px; }

.form-surface, .detail-surface, .privacy-card { padding: clamp(22px, 4vw, 36px); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-title h2 { margin-bottom: 0; font-size: 27px; }
.section-title > span { color: var(--muted); font-size: 11px; }
.record-form { padding-top: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-field { display: grid; align-content: start; gap: 7px; color: #475467; font-size: 12px; font-weight: 700; }
.form-field.field-wide { grid-column: 1 / -1; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 11px; font-weight: 600; }
.switch-control { display: flex; min-height: 42px; align-items: center; gap: 9px; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-control > span { position: relative; width: 40px; height: 23px; border-radius: 20px; background: #cfd4dc; transition: background .2s; }
.switch-control > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.18); transition: transform .2s; }
.switch-control input:checked + span { background: var(--success); }
.switch-control input:checked + span::after { transform: translateX(17px); }
.switch-control em { color: var(--muted); font-size: 11px; font-style: normal; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-actions form { margin: 0; }

.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; margin: 0; }
.detail-grid > div { min-width: 0; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); }
.detail-grid > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.detail-grid .detail-wide { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
.detail-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; color: var(--navy-900); font-size: 14px; font-weight: 650; }
.privacy-card { position: sticky; top: 100px; }
.privacy-card h2 { margin: 17px 0 9px; font-size: 21px; }
.privacy-card p { color: var(--muted); font-size: 12px; }
.privacy-card a { color: var(--navy-800); font-size: 12px; font-weight: 800; }

.confirm-dialog { width: min(430px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 20px; box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgba(20,32,58,.62); backdrop-filter: blur(2px); }
.confirm-dialog form { padding: 30px; text-align: center; }
.confirm-dialog h2 { margin: 15px 0 8px; font-size: 25px; }
.confirm-dialog p { color: var(--muted); }
.dialog-icon { display: grid; width: 50px; height: 50px; margin: auto; place-items: center; border-radius: 50%; background: var(--warning-bg); color: var(--warning); font-size: 23px; font-weight: 800; }
.dialog-actions { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }

.error-page, .login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: linear-gradient(135deg, rgba(31,45,79,.94), rgba(20,32,58,.98)), url('../../images/fondo.jpg') center / cover; }
.error-card { width: min(560px, 100%); padding: 42px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); text-align: center; }
.error-card h1 { font-size: 32px; }
.error-card p:not(.eyebrow) { color: var(--muted); }
.error-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

.login-shell { display: grid; width: min(1040px, 100%); min-height: 640px; grid-template-columns: 1.12fr .88fr; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 28px; background: #fff; box-shadow: 0 30px 90px rgba(8,16,34,.34); }
.login-shell-simple { width: min(510px, 100%); min-height: 560px; grid-template-columns: 1fr; }
.login-shell-simple .mobile-brand { display: block; margin-bottom: 42px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px, 5vw, 62px); }
.login-card-heading { margin-bottom: 28px; }
.login-card-heading h2 { margin-bottom: 10px; font-size: 32px; font-weight: 600; }
.login-card-heading > p:last-child { color: var(--muted); font-size: 12px; }
.mobile-brand { display: none; color: var(--navy-900); font-family: var(--serif); font-size: 24px; font-weight: 700; }
.login-form { display: grid; gap: 19px; }
.login-form > label { display: grid; gap: 7px; color: #475467; font-size: 12px; font-weight: 750; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 75px; }
.password-control button { position: absolute; top: 7px; right: 7px; height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: var(--cream-200); color: var(--navy-800); cursor: pointer; font-size: 10px; font-weight: 800; }
.login-submit { width: 100%; min-height: 48px; margin-top: 3px; }
.login-help { margin: 24px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.dashboard-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.dashboard-hero h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 52px); font-weight: 550; letter-spacing: -.03em; }
.dashboard-hero p:last-child { margin-bottom: 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 24px; align-items: start; }
.section-heading h2 { margin-bottom: 18px; font-size: 27px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.feature-card { position: relative; display: flex; min-height: 240px; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 25px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(20,32,58,.04), rgba(20,32,58,.9)), var(--feature-image) center / cover; color: #fff; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-card span, .feature-card small { color: rgba(255,255,255,.67); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.feature-card strong { margin: 4px 0 2px; font-family: var(--serif); font-size: 27px; }
.feature-card small { letter-spacing: 0; text-transform: none; }
.feature-wide { grid-column: 1 / -1; min-height: 225px; }
.upcoming-card { overflow: hidden; }
.upcoming-list { margin: 0; padding: 5px 20px; list-style: none; }
.upcoming-list li { display: grid; grid-template-columns: 46px 1fr; gap: 13px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.upcoming-list li:last-child { border-bottom: 0; }
.date-tile { display: grid; width: 44px; height: 48px; place-items: center; align-content: center; border-radius: 10px; background: var(--cream-200); color: var(--navy-900); line-height: 1; }
.date-tile strong { font-family: var(--serif); font-size: 19px; }
.date-tile small { margin-top: 3px; color: var(--sand-600); font-size: 8px; font-weight: 900; }
.upcoming-list li > span:last-child { display: grid; min-width: 0; }
.upcoming-list li > span:last-child small { color: var(--muted); font-size: 9px; }
.upcoming-list a { overflow: hidden; color: var(--navy-900); font-size: 12px; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.compact-empty { padding: 40px 22px; text-align: center; }
.compact-empty .empty-icon { margin: auto; }
.compact-empty h3 { margin: 13px 0 5px; }
.compact-empty p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.faq-banner { display: flex; min-height: 94px; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; padding: 20px; border-radius: var(--radius); background: linear-gradient(110deg, var(--sand-600), #75603f); color: #fff; text-decoration: none; }
.faq-banner small, .faq-banner strong { display: block; }
.faq-banner small { color: rgba(255,255,255,.7); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.faq-banner strong { margin-top: 3px; font-family: var(--serif); font-size: 18px; }
.faq-banner > span:last-child { font-size: 24px; }
.calendar-banner { display: grid; min-height: 84px; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin-top: 13px; padding: 16px 18px; border: 1px solid var(--sand-200); border-radius: var(--radius); background: #fff; color: var(--navy-900); text-decoration: none; }
.calendar-banner-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--cream-200); color: var(--sand-600); }
.calendar-banner small, .calendar-banner strong { display: block; }
.calendar-banner small { color: var(--sand-600); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.calendar-banner strong { font-family: var(--serif); font-size: 17px; }
.calendar-banner > span:last-child { color: var(--sand-600); font-size: 23px; }

.upload-control input { height: auto; padding: 13px; border-style: dashed; background: var(--cream-100); }
.upload-control > small:not(.field-error) { color: var(--muted); font-size: 10px; font-weight: 500; }
.table-subline { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.row-actions form { margin: 0; }
.row-actions button.mini-button { cursor: pointer; }
.status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.status-badge.is-active { background: var(--success-bg); color: var(--success); }
.status-badge.is-inactive { background: var(--danger-bg); color: var(--danger); }
.profile-form { max-width: 820px; }
.profile-form + .profile-form { margin-top: 20px; }
.profile-photo-control { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 22px; align-items: center; }
.profile-photo-preview { display: grid; width: 108px; height: 108px; overflow: hidden; place-items: center; border: 4px solid var(--sand-200); border-radius: 50%; background: var(--sand-500); color: #fff; font-size: 34px; font-weight: 800; }
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.current-avatar-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.current-avatar-preview img { width: 54px; height: 54px; border: 2px solid var(--sand-200); border-radius: 50%; object-fit: cover; }
.current-avatar-preview em { color: var(--muted); font-size: 11px; font-style: normal; }
.user-cell { display: inline-flex; align-items: center; gap: 9px; }
.user-list-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 36px; overflow: hidden; place-items: center; border-radius: 50%; background: var(--sand-500); color: #fff; font-size: 12px; font-weight: 800; }
.user-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.relation-picker { padding: 18px; border: 1px solid var(--sand-200); border-radius: 14px; background: linear-gradient(135deg, #fbfaf7, #f5f1e8); }
.relation-picker > small:not(.field-error) { color: var(--muted); font-size: 11px; font-weight: 500; }
.entity-link { display: grid; gap: 1px; color: var(--navy-900); text-decoration: none; }
.entity-link span { color: var(--sand-600); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.entity-link strong { overflow-wrap: anywhere; font-size: 12px; }
.record-connection { display: flex; align-items: center; gap: 15px; margin-top: 22px; padding: 18px; border: 1px solid var(--sand-200); border-radius: 15px; background: linear-gradient(135deg, #fbfaf7, #f3eee3); }
.connection-icon { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 13px; background: var(--navy-900); color: #fff; }
.record-connection > span:last-child { display: grid; }
.record-connection small { color: var(--sand-600); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.record-connection a, .record-connection strong { color: var(--navy-900); font-family: var(--serif); font-size: 20px; font-weight: 700; text-decoration: none; }
.record-connection em { color: var(--muted); font-size: 11px; font-style: normal; }
.record-connection.is-empty { border-color: var(--line); background: var(--cream-100); }

.calendar-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.calendar-heading h1 { margin-bottom: 8px; font-size: clamp(36px,4vw,52px); font-weight: 560; letter-spacing: -.03em; }
.calendar-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.calendar-shell { overflow: hidden; }
.calendar-toolbar { display: grid; min-height: 92px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,#fff,#f8f4ec); }
.calendar-toolbar h2 { margin: 0; font-size: 25px; text-align: center; }
.calendar-navigation { display: flex; align-items: center; gap: 7px; }
.calendar-navigation a { display: grid; min-width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy-900); font-size: 23px; font-weight: 800; text-decoration: none; }
.calendar-navigation .calendar-today { width: auto; padding: 0 13px; font-size: 12px; }
.calendar-views { display: flex; justify-self: end; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.calendar-views a { min-height: 34px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.calendar-views a.is-active { background: var(--navy-900); color: #fff; }
.calendar-summary { display: flex; min-height: 62px; align-items: center; gap: 24px; padding: 11px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.calendar-summary > span { display: flex; align-items: center; gap: 7px; }
.calendar-summary > span:first-child { display: grid; margin-right: auto; gap: 0; }
.calendar-summary strong { color: var(--navy-900); font-family: var(--serif); font-size: 22px; line-height: 1; }
.calendar-summary small { color: var(--muted); font-size: 9px; }
.legend-dot, .calendar-event-dot { display: block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #6c7aa0; }
.legend-dot.is-obligation, .calendar-event.is-obligation .calendar-event-dot { background: #a15c00; }
.legend-dot.is-service, .calendar-event.is-service .calendar-event-dot { background: #16794e; }
.legend-dot.is-document, .calendar-event.is-document .calendar-event-dot { background: #4f46a5; }
.calendar-event.is-insurance .calendar-event-dot { background: #21618c; }
.calendar-event.is-license .calendar-event-dot { background: #a23c65; }
.calendar-event.is-equipment .calendar-event-dot { background: #6b5b45; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-bottom: 1px solid var(--line); background: #faf9f6; }
.calendar-weekdays span { padding: 10px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.calendar-month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); background: var(--line); gap: 1px; }
.calendar-day { min-width: 0; min-height: 148px; padding: 10px; background: #fff; }
.calendar-day.is-outside { background: #fafafa; }
.calendar-day.is-outside .calendar-day-number, .calendar-day.is-outside .calendar-day-events { opacity: .46; }
.calendar-day.is-today { position: relative; background: #fffcf5; }
.calendar-day.is-today::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--sand-500); }
.calendar-day-number { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 8px; color: var(--navy-900); text-decoration: none; }
.calendar-day-number span { display: none; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.calendar-day-number strong { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; font-family: var(--serif); font-size: 16px; }
.calendar-day.is-today .calendar-day-number strong { background: var(--navy-900); color: #fff; }
.calendar-day-events { display: grid; gap: 5px; }
.calendar-event { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy-900); text-decoration: none; transition: border-color .15s, transform .15s; }
.calendar-event:hover { border-color: var(--sand-500); transform: translateY(-1px); }
.calendar-event > span:last-child { display: grid; min-width: 0; }
.calendar-event small { color: var(--muted); font-size: 9px; font-weight: 750; }
.calendar-event strong { overflow: hidden; font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event em { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.is-compact { padding: 6px 7px; border: 0; border-radius: 7px; background: #f7f5ef; }
.calendar-event.is-compact .calendar-event-dot { margin-top: 4px; }
.calendar-event.is-compact small, .calendar-event.is-compact em { display: none; }
.calendar-event.is-compact strong { font-size: 10px; }
.calendar-more { color: var(--sand-600); font-size: 10px; font-weight: 800; text-decoration: none; }
.calendar-week-grid { display: grid; grid-template-columns: repeat(7,minmax(180px,1fr)); overflow-x: auto; background: var(--line); gap: 1px; }
.calendar-week-day { min-height: 520px; background: #fff; }
.calendar-week-day > header { display: grid; justify-items: center; padding: 17px 10px; border-bottom: 1px solid var(--line); background: #faf9f6; }
.calendar-week-day.is-today > header { background: var(--navy-900); color: #fff; }
.calendar-week-day > header small { font-size: 10px; font-weight: 850; text-transform: uppercase; }
.calendar-week-day > header strong { font-family: var(--serif); font-size: 27px; }
.calendar-week-day > header span { color: var(--muted); font-size: 10px; }
.calendar-week-day.is-today > header span { color: rgba(255,255,255,.65); }
.calendar-week-day > div { display: grid; align-content: start; gap: 8px; padding: 10px; }
.calendar-week-day > div > p { color: #98a2b3; font-size: 10px; text-align: center; }
.calendar-day-view { display: grid; min-height: 520px; grid-template-columns: 220px minmax(0,720px); justify-content: center; gap: 36px; padding: 46px; background: linear-gradient(135deg,#faf8f3,#fff); }
.calendar-day-view > header { display: flex; align-items: flex-start; gap: 13px; }
.calendar-day-view > header > span { color: var(--navy-900); font-family: var(--serif); font-size: 74px; line-height: .85; }
.calendar-day-view > header > div { display: grid; }
.calendar-day-view > header small { color: var(--sand-600); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.calendar-day-view > header strong { color: var(--navy-900); font-size: 15px; }
.calendar-day-agenda { display: grid; align-content: start; gap: 11px; }
.calendar-day-agenda .calendar-event { min-height: 76px; align-items: center; padding: 15px; }
.calendar-day-agenda .calendar-event strong { font-size: 15px; white-space: normal; }
.calendar-day-agenda .calendar-event em { font-size: 11px; white-space: normal; }

.assistant-fab { position: fixed; right: 24px; bottom: 24px; z-index: 42; display: flex; min-height: 62px; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: var(--navy-900); color: #fff; box-shadow: 0 16px 34px rgba(20,32,58,.28); text-decoration: none; }
.assistant-fab > img { width: 42px; height: 42px; flex: 0 0 42px; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; object-fit: cover; }
.assistant-fab strong, .assistant-fab small { display: block; }
.assistant-fab strong { font-size: 13px; }
.assistant-fab small { color: rgba(255,255,255,.67); font-size: 10px; }

.assistant-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 25px; }
.assistant-heading h1 { margin-bottom: 9px; font-size: clamp(36px, 4vw, 52px); font-weight: 560; letter-spacing: -.03em; }
.assistant-heading > div > p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 16px; }
.emergency-call { display: grid; min-width: 220px; min-height: 66px; align-content: center; padding: 11px 20px; border: 2px solid #9f1c14; border-radius: 15px; background: #fff; color: #8f1d15; text-align: center; text-decoration: none; }
.emergency-call span { font-size: 11px; font-weight: 800; text-transform: uppercase; }
.emergency-call strong { font-size: 19px; }
.assistant-quick { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 22px; }
.assistant-quick button { display: flex; min-width: 0; min-height: 82px; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--navy-900); cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); }
.assistant-quick button:hover { border-color: var(--sand-500); transform: translateY(-1px); }
.assistant-quick svg { width: 27px; height: 27px; flex: 0 0 27px; color: var(--sand-600); }
.assistant-quick span, .assistant-quick strong, .assistant-quick small { display: block; min-width: 0; }
.assistant-quick strong { font-size: 14px; }
.assistant-quick small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.assistant-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 20px; align-items: start; }
.conversation-card { overflow: hidden; }
.conversation-card > header { display: flex; min-height: 76px; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.assistant-avatar { display: block; width: 52px; height: 52px; flex: 0 0 52px; border: 2px solid var(--sand-200); border-radius: 50%; object-fit: cover; }
.conversation-card > header > span:nth-child(2) { min-width: 0; }
.conversation-card > header strong, .conversation-card > header small { display: block; }
.conversation-card > header strong { color: var(--navy-900); font-size: 15px; }
.conversation-card > header small { color: var(--success); font-size: 11px; font-weight: 700; }
.text-listen-button { min-height: 42px; margin-left: auto; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy-900); cursor: pointer; font-size: 12px; font-weight: 800; }
.text-listen-button:disabled { opacity: .45; cursor: not-allowed; }
.conversation-log { display: grid; max-height: 630px; gap: 22px; overflow-y: auto; padding: 24px; background: linear-gradient(180deg,#faf9f6,#f5f2eb); scroll-behavior: smooth; }
.chat-message { display: grid; max-width: 88%; gap: 6px; }
.chat-message.is-user { justify-self: end; }
.message-label { color: var(--muted); font-size: 11px; font-weight: 800; }
.is-user .message-label { text-align: right; }
.message-bubble { padding: 19px 21px; border: 1px solid var(--line); border-radius: 6px 19px 19px; background: #fff; box-shadow: var(--shadow-sm); }
.is-user .message-bubble { border-color: var(--navy-900); border-radius: 19px 6px 19px 19px; background: var(--navy-900); color: #fff; }
.message-bubble h2 { margin-bottom: 9px; font-size: 22px; }
.message-bubble > p { margin-bottom: 12px; font-size: 16px; line-height: 1.65; white-space: pre-line; }
.message-bubble > p:last-child { margin-bottom: 0; }
.is-user .message-bubble p { font-size: 16px; }
.privacy-note { padding: 11px 13px; border-radius: 10px; background: var(--success-bg); color: #126540; font-size: 13px !important; font-weight: 650; }
.answer-list { display: grid; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.answer-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.answer-list li > span { display: grid; min-width: 0; }
.answer-list strong { overflow-wrap: anywhere; color: var(--navy-900); font-size: 14px; }
.answer-list small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.answer-list a, .answer-list button { flex: 0 0 auto; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy-900); cursor: pointer; font-size: 12px; font-weight: 800; text-decoration: none; }
.answer-warning { padding: 13px 15px; border-left: 4px solid var(--danger); border-radius: 8px; background: var(--danger-bg); color: #7d1a13; font-size: 14px !important; font-weight: 700; }
.answer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.answer-action { min-height: 44px; padding: 10px 14px; border: 1px solid var(--navy-900); border-radius: 10px; background: #fff; color: var(--navy-900); cursor: pointer; font-size: 13px; font-weight: 800; text-decoration: none; }
.answer-action.is-phone { border-color: var(--success); background: var(--success); color: #fff; }
.answer-source { display: block; margin-top: 14px; color: var(--muted); font-size: 10px; }
.chat-status { min-height: 28px; padding: 5px 24px 0; background: #fff; color: var(--navy-800); font-size: 12px; font-weight: 700; }
.chat-form { padding: 13px 18px 18px; border-top: 1px solid var(--line); background: #fff; }
.chat-form > label { display: block; margin-bottom: 7px; color: #475467; font-size: 13px; font-weight: 800; }
.chat-form > div { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.chat-form input { min-height: 54px; font-size: 16px; }
.chat-form .button { min-height: 54px; min-width: 115px; font-size: 15px; }
.external-ai-option { display: flex !important; min-height: 58px; align-items: center; gap: 11px; margin: 12px 0 0 !important; padding: 10px 12px; border: 1px solid #cfd7e6; border-radius: 12px; background: #f5f7fb; cursor: pointer; }
.external-ai-option input { width: 22px; min-height: 22px; flex: 0 0 22px; accent-color: var(--navy-900); }
.external-ai-option span, .external-ai-option strong, .external-ai-option small { display: block; }
.external-ai-option strong { color: var(--navy-900); font-size: 13px; }
.external-ai-option small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.external-ai-option.is-disabled { opacity: .72; cursor: not-allowed; }
.assistant-guides { display: grid; gap: 15px; }
.guide-card { padding: 21px; }
.guide-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.guide-heading > span { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 14px; font-size: 24px; font-weight: 900; }
.guide-heading .eyebrow { margin: 0 0 2px; }
.guide-heading h2 { margin: 0; font-size: 22px; }
.guide-card > p { color: var(--muted); font-size: 13px; }
.guide-card.is-medical .guide-heading > span { background: var(--danger-bg); color: var(--danger); }
.guide-card.is-security .guide-heading > span { background: var(--warning-bg); color: var(--warning); }
.preset-list { display: grid; gap: 8px; }
.preset-list button { min-height: 54px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy-900); cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.35; text-align: left; }
.preset-list button:hover { border-color: var(--sand-500); background: var(--cream-100); }
.assistant-layout button:disabled, .assistant-quick button:disabled { opacity: .58; cursor: wait; }

html[data-text-size="large"] .nav-item, html[data-text-size="large"] .nav-group summary { min-height: 49px; font-size: 16px; }
html[data-text-size="large"] .nav-group > div a { min-height: 42px; font-size: 15px; }
html[data-text-size="large"] .topbar-title strong { font-size: 23px; }
html[data-text-size="large"] .topbar-title small, html[data-text-size="large"] .page-heading p, html[data-text-size="large"] .assistant-heading p { font-size: 15px; }
html[data-text-size="large"] .button, html[data-text-size="large"] input, html[data-text-size="large"] select, html[data-text-size="large"] textarea, html[data-text-size="large"] td { font-size: 16px; }
html[data-text-size="large"] .assistant-quick strong, html[data-text-size="large"] .preset-list button, html[data-text-size="large"] .answer-list strong { font-size: 16px; }
html[data-text-size="large"] .assistant-quick small, html[data-text-size="large"] .answer-list small, html[data-text-size="large"] .guide-card > p { font-size: 14px; }
html[data-text-size="large"] .message-bubble > p { font-size: 18px; }

@media (max-width: 1050px) {
  .record-layout { grid-template-columns: 1fr; }
  .privacy-card { position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .assistant-quick { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .assistant-layout { grid-template-columns: 1fr; }
  .assistant-guides { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calendar-toolbar { grid-template-columns: auto 1fr; }
  .calendar-toolbar h2 { text-align: right; }
  .calendar-views { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(20,32,58,.48); }
  .app-shell.sidebar-open .sidebar-backdrop { display: block; }
  .app-content { margin-left: 0; }
  .mobile-menu-button { display: inline-flex; }
  .topbar { height: 70px; padding: 0 18px; }
  .topbar-title small, .topbar-documents span, .topbar-assistant span, .topbar-calendar span { display: none; }
  .topbar-actions { gap: 9px; }
  .main-content { padding: 26px 18px 45px; }
  .app-footer { padding-inline: 18px; }
  .page-heading { align-items: flex-start; }
}

@media (max-width: 680px) {
  .page-heading { display: grid; gap: 18px; }
  .page-heading .button { width: 100%; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .search-control { grid-column: 1 / -1; min-width: 0; }
  .filters > label:not(.search-control) { min-width: 0; }
  .filters .button { width: 100%; }
  .table-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .table-scroll { overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { padding: 8px 14px 14px; }
  tbody tr { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
  tbody tr:hover { background: #fff; }
  td { display: grid; max-width: none; grid-template-columns: minmax(105px, 38%) 1fr; gap: 10px; padding: 8px 0; border: 0; text-align: right; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
  td.row-actions { display: flex; justify-content: flex-end; margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
  td.row-actions::before { display: none; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .profile-photo-control { grid-template-columns: 1fr; }
  .form-field.field-wide, .detail-grid .detail-wide { grid-column: auto; }
  .detail-grid > div, .detail-grid > div:nth-child(even) { padding: 17px 0; border-right: 0; border-left: 0; }
  .section-title { align-items: flex-start; flex-direction: column; gap: 8px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button, .form-actions form, .form-actions form .button { width: 100%; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 2px; }
  .login-page { padding: 0; background: #fff; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .login-card { padding: 35px 24px; }
  .mobile-brand { display: block; margin-bottom: 38px; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-hero .button { width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-wide { min-height: 205px; grid-column: auto; }
  .assistant-fab { right: 14px; bottom: 14px; width: 58px; min-height: 58px; padding: 10px; justify-content: center; }
  .assistant-fab > img { width: 40px; height: 40px; flex-basis: 40px; }
  .assistant-fab > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .assistant-heading { align-items: stretch; flex-direction: column; }
  .emergency-call { width: 100%; }
  .assistant-quick { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assistant-guides { grid-template-columns: 1fr; }
  .conversation-log { max-height: none; padding: 18px 14px; }
  .chat-message { max-width: 94%; }
  .message-bubble { padding: 17px; }
  .answer-list li { align-items: stretch; flex-direction: column; }
  .answer-list a, .answer-list button { width: 100%; text-align: center; }
  .chat-form > div { grid-template-columns: 1fr; }
  .chat-form .button { width: 100%; }
  .calendar-heading { display: grid; align-items: start; gap: 18px; }
  .calendar-heading .button { width: 100%; }
  .calendar-toolbar { grid-template-columns: 1fr; padding: 16px; }
  .calendar-navigation { justify-content: center; }
  .calendar-toolbar h2 { grid-row: 1; font-size: 22px; text-align: center; }
  .calendar-views { grid-column: auto; }
  .calendar-views a { flex: 1; text-align: center; }
  .calendar-summary { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .calendar-summary > span:first-child { width: 100%; margin: 0; }
  .calendar-weekdays { display: none; }
  .calendar-month-grid { grid-template-columns: 1fr; padding: 10px; background: #f7f5ef; gap: 9px; }
  .calendar-day { min-height: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
  .calendar-day:not(:has(.calendar-event)):not(.is-today), .calendar-day.is-outside:not(:has(.calendar-event)) { display: none; }
  .calendar-day-number { justify-content: space-between; }
  .calendar-day-number span { display: block; }
  .calendar-event.is-compact { min-height: 48px; padding: 9px; }
  .calendar-event.is-compact small { display: block; }
  .calendar-event.is-compact strong { font-size: 12px; white-space: normal; }
  .calendar-week-grid { grid-template-columns: 1fr; overflow: visible; gap: 10px; padding: 10px; background: #f7f5ef; }
  .calendar-week-day { min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
  .calendar-week-day > header { display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; }
  .calendar-day-view { min-height: 420px; grid-template-columns: 1fr; gap: 24px; padding: 26px 18px; }
  .calendar-day-view > header > span { font-size: 58px; }
}

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