:root {
  --green: #486b54;
  --green-deep: #28382f;
  --green-soft: #e8f0e9;
  --ink: #28382f;
  --muted: #59665f;
  --line: #eee8e3;
  --warm-white: #fffdf9;
  --cream: #fff6f0;
  --shadow: 0 18px 46px rgba(67, 57, 47, .09);
  --shadow-soft: 0 10px 28px rgba(67, 57, 47, .065);
  color: var(--ink);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #e9e6de; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible { outline: 3px solid rgba(77, 114, 90, .34); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -80px; padding: 12px 16px; border-radius: 12px; color: var(--green-deep); background: white; }
.skip-link:focus { top: 16px; }
h1, h2, h3 { color: var(--ink); }
.eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }

.screen { display: none; min-height: 100vh; }
.screen.is-active { display: grid; }

.login-screen { grid-template-columns: minmax(520px, 1.35fr) minmax(420px, .65fr); background: var(--warm-white); }
.login-scene {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  overflow: hidden;
  padding: 72px 8vw 80px;
  background-image:
    linear-gradient(90deg, rgba(255,250,245,.96) 0%, rgba(255,250,245,.75) 34%, rgba(255,250,245,.12) 67%),
    linear-gradient(0deg, rgba(255,250,245,.66), transparent 48%),
    url("assets/mayak-unified-background-v1.png");
  background-size: cover;
  background-position: center;
}
.scene-copy { position: relative; z-index: 1; max-width: 620px; }
.scene-copy h1 { max-width: 560px; margin: 16px 0 20px; font-size: clamp(42px, 4.7vw, 66px); line-height: 1.04; font-weight: 500; letter-spacing: -.05em; }
.scene-copy > p:last-child { max-width: 560px; margin: 0; color: #667169; font-size: 18px; line-height: 1.65; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; background: radial-gradient(circle at 52% 48%, white 0 8%, #ffe7bb 24%, #f6b951 73%, #edaa42 100%); box-shadow: 0 0 25px rgba(242,183,83,.32); }
.brand strong, .brand small { display: block; }
.brand strong { color: var(--green-deep); font-size: 23px; line-height: 1; }
.brand small { max-width: 180px; margin-top: 6px; color: #68716b; font-size: 11px; line-height: 1.45; }
.brand-on-scene { margin-bottom: 120px; }
.mobile-brand { display: none; }
.login-panel { display: grid; align-content: center; min-height: 100vh; padding: 60px clamp(34px, 5vw, 80px); background: rgba(255,252,248,.91); box-shadow: -20px 0 60px rgba(82,65,46,.05); backdrop-filter: blur(24px); }
.mode-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-bottom: 42px; padding: 5px; border-radius: 16px; background: #f3eee8; }
.mode-tab { min-height: 45px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.mode-tab.is-current { color: var(--green-deep); background: white; box-shadow: 0 6px 18px rgba(82,65,46,.07); }
.auth-form { width: 100%; max-width: 460px; margin: 0 auto; }
.auth-form h2 { margin: 12px 0 13px; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; font-weight: 500; letter-spacing: -.045em; }
.form-lead { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.field { display: grid; gap: 8px; margin: 0 0 17px; }
.field span { font-size: 12px; font-weight: 600; }
.field input { height: 52px; width: 100%; border: 1px solid rgba(74,88,80,.15); border-radius: 14px; padding: 0 15px; color: var(--ink); background: rgba(255,255,255,.82); }
.field input::placeholder { color: #a5aaa6; }
.agreement-row { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.agreement-row input { margin-top: 3px; accent-color: var(--green); }
.primary-button { min-height: 50px; border: 0; border-radius: 14px; color: white; background: var(--green); font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(77,114,90,.18); }
.full-button { width: 100%; }
.text-button { display: none; width: 100%; border: 0; margin-top: 16px; color: var(--green); background: transparent; cursor: pointer; }
.prototype-note { margin: 22px 0 0; color: #979d98; font-size: 10px; line-height: 1.5; text-align: center; }

.app-screen {
  position: relative;
  isolation: isolate;
  grid-template-columns: 280px minmax(0,1fr);
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--warm-white);
  background-image:
    radial-gradient(circle at 8% 8%, rgba(255,228,204,.34), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(251,239,242,.60), transparent 34%),
    radial-gradient(circle at 56% 84%, rgba(255,246,240,.72), transparent 38%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.sidebar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  padding: 36px 22px 28px;
  border-right: 1px solid rgba(238,232,227,.72);
  background-color: rgba(255,253,249,.72);
  background-image:
    linear-gradient(180deg, rgba(255,253,249,.50), rgba(255,253,249,.78)),
    url("assets/background-branch-shadow-v1.png"),
    url("assets/background-blossom-foreground-v1.png");
  background-repeat: no-repeat;
  background-size: 100% 100%, 470px auto, 430px auto;
  background-position: center, -110px -135px, -190px calc(100% + 150px);
  backdrop-filter: blur(8px);
}
.sidebar-brand { padding: 4px 16px 34px; }
.sidebar-brand .brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
.sidebar-brand strong { font-size: 20px; }
.sidebar-brand small { font-size: 10px; }
.side-nav { display: grid; gap: 6px; }
.side-nav-bottom { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(75,89,81,.10); }
.nav-item { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; min-height: 54px; width: 100%; border: 0; border-radius: 27px; padding: 8px 16px; color: #35423a; background: transparent; font-size: 15px; font-weight: 500; line-height: 1.45; text-align: left; cursor: pointer; }
.nav-item span { color: var(--green); font-size: 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.50); }
.nav-item.is-current { color: var(--green-deep); background: rgba(232,232,222,.72); box-shadow: inset 0 0 0 1px rgba(72,98,76,.04); font-weight: 600; backdrop-filter: blur(12px); }

.app-shell { position: relative; z-index: 2; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 0 44px; background: transparent; }
.email-confirmation-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 44px 22px; padding: 17px 20px; border: 1px solid #ead9b4; border-radius: 18px; background: rgba(255,248,228,.92); box-shadow: var(--shadow-soft); }
.email-confirmation-banner strong { display: block; margin-bottom: 3px; font-size: 15px; }
#email-change-slot { margin:0 44px 22px; }
.email-change-banner { margin:0; z-index:55; background:#fff3ce; border-color:#c49b44; }
.email-change-banner.is-docked { position:fixed; top:12px; }
.email-change-banner p,.email-change-banner small { overflow-wrap:anywhere; }
.email-change-banner[hidden] { display:none !important; }
@media(max-width:700px){
  #email-change-slot { margin:0 16px 18px; }
  .email-confirmation-banner.email-change-banner { margin:0; gap:8px; padding:12px; }
  .email-change-banner p { font-size:12px; line-height:1.35; }
  .email-change-banner small { font-size:10px; line-height:1.3; }
  .email-change-banner button { min-height:32px; padding:6px 12px; }
}
.email-confirmation-banner p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.email-confirmation-banner small { display: block; min-height: 18px; margin-top: 4px; color: #7b6741; }
.email-confirmation-banner button { flex: 0 0 auto; min-height: 42px; border: 0; border-radius: 13px; padding: 10px 16px; color: white; background: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; }
.email-confirmation-banner button:disabled { cursor: default; opacity: .58; }
.breadcrumb { margin: 0; color: var(--muted); font-size: 14px; }
.profile { display: flex; align-items: center; gap: 10px; }
.icon-button, .mobile-menu { display: inline-grid; place-items: center; border: 1px solid rgba(74,88,80,.11); border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; backdrop-filter: blur(12px); }
.icon-button { width: 40px; height: 40px; }
.mobile-menu { display: none; width: 38px; height: 38px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: white; background: #9d7459; font-weight: 700; }
.profile-name { color: #59645d; font-size: 13px; font-weight: 700; }
.page-view { display: none; padding: 0 44px 72px; }
.page-view.is-active { display: block; }

@media(max-width:700px){.email-confirmation-banner{align-items:stretch;flex-direction:column;margin:0 16px 18px}.email-confirmation-banner button{width:100%}}

.hero-card {
  position: relative;
  min-height: 410px;
  margin: 0 -44px;
  overflow: hidden;
  background-image: url("assets/mayak-hero-v2.png");
  background-repeat: no-repeat;
  background-size: auto 430px;
  background-position: right -8px center;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--warm-white) 0%, rgba(255,253,249,.97) 30%, rgba(255,253,249,.72) 43%, rgba(255,253,249,.08) 64%, transparent 74%),
    linear-gradient(0deg, var(--warm-white) 0%, transparent 13%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 600px; padding: 54px 0 0 44px; }
.hero-copy h2 { margin: 14px 0 14px; color: var(--ink); font-size: 48px; line-height: 1.15; font-weight: 600; letter-spacing: -.04em; }
.hero-lead { max-width: 520px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.continue-hint { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; width: min(100%, 560px); min-height: 60px; margin-top: 26px; padding: 8px 9px 8px 11px; border: 1px solid rgba(238,232,227,.96); border-radius: 17px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(68,56,45,.055); backdrop-filter: blur(12px); }
.hint-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--green); background: rgba(230,238,229,.86); }
.continue-hint small, .continue-hint strong { display: block; }
.continue-hint small { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.continue-hint strong { color: var(--ink); font-size: 13px; }
.continue-hint button { border: 0; border-radius: 14px; padding: 11px 17px; color: white; background: var(--green); font-size: 12px; font-weight: 600; cursor: pointer; }

.locations-section { position: relative; padding-top: 18px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin: 8px 0 0; color: var(--ink); font-size: 30px; line-height: 1.25; font-weight: 600; letter-spacing: -.03em; }
.section-note { margin: 0; color: var(--muted); font-size: 14px; }
.location-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.location-card { display: flex; flex-direction: column; min-height: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease; }
.location-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.location-art { height: 205px; overflow: hidden; background: #f3ede5; }
.location-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.location-personal .location-art img { object-position: 56% center; }
.location-professional .location-art img { object-position: 50% center; }
.location-library .location-art img { object-position: 53% center; }
.location-practice .location-art img { object-position: 61% center; }
.location-content { display: flex; flex: 1; flex-direction: column; padding: 16px 20px 18px; }
.status-line { min-height: 24px; }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.status-active { color: var(--green-deep); background: var(--green-soft); }
.status-open { color: #5b714f; background: #edf2e7; }
.status-new { color: #8c6427; background: #fff0d9; }
.status-completed { color: #6e716e; background: #eeece9; }
.location-content h3, .content-card h3 { margin: 10px 0 6px; color: var(--ink); font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.025em; }
.location-content > p, .content-card > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; color: var(--muted); font-size: 11px; }
.card-footer button, .card-footer .card-open { min-height: 38px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; color: var(--green); background: rgba(255,255,255,.86); font-size: 11px; font-weight: 700; cursor: pointer; box-shadow: 0 5px 12px rgba(68,56,45,.05); }
.card-footer .card-open { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.location-card .card-footer button { width: 38px; padding: 0; border-radius: 50%; font-size: 18px; }

.back-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 12px 0 22px;
  padding: 0;
  border: 1px solid rgba(111,118,79,.45);
  border-radius: 50%;
  color: #5f684a;
  background: rgba(250,247,238,.96);
  box-shadow: 0 5px 16px rgba(65,59,43,.12);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.back-button svg { width: 18px; height: 18px; }
.back-button:hover { transform: translateX(-2px); background: #fffdf7; box-shadow: 0 7px 20px rgba(65,59,43,.15); }
.back-button:focus-visible { outline: 2px solid #7b8660; outline-offset: 3px; }
.location-hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 230px; padding: 40px; border: 1px solid rgba(107,92,74,.09); border-radius: 28px; background: rgba(255,251,246,.75); box-shadow: var(--shadow-soft); backdrop-filter: blur(18px); }
.location-hero h2 { margin: 10px 0 14px; color: #4d5952; font-size: clamp(35px,4vw,52px); line-height: 1.07; font-weight: 500; letter-spacing: -.045em; }
.location-hero p:last-child { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.65; }
.location-symbol { display: grid; place-items: center; width: 120px; height: 120px; flex: 0 0 120px; border-radius: 50%; color: var(--green); background: rgba(255,255,255,.55); font-size: 58px; box-shadow: inset 0 0 0 1px rgba(72,107,84,.08); }
.content-section { padding-top: 34px; }
.compact-heading { margin-bottom: 18px; }
.content-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.content-card { display: flex; flex-direction: column; min-height: 235px; padding: 23px; border: 1px solid rgba(107,92,74,.10); border-radius: 23px; background: rgba(255,253,250,.84); box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); }
.content-card .status-badge { align-self: flex-start; }
.progress-row { height: 7px; overflow: hidden; margin: 22px 0 0; border-radius: 999px; background: #edf0ec; }
.progress-row span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.empty-card { border-style: dashed; box-shadow: none; }

@media (max-width: 1260px) {
  .app-screen { grid-template-columns: 248px minmax(0,1fr); }
  .sidebar { padding-inline: 17px; }
  .page-view { padding-inline: 30px; }
  .topbar { padding-inline: 30px; }
  .hero-card { margin-inline: -30px; background-position: right -115px center; }
  .hero-copy { padding-left: 30px; }
  .location-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .location-art { height: 250px; }
  .content-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1280px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-scene { min-height: 315px; padding: 30px 24px; background-position: 61% center; }
  .brand-on-scene { display: none; }
  .scene-copy h1 { max-width: 350px; font-size: 36px; }
  .scene-copy > p:last-child { display: none; }
  .login-panel { min-height: auto; padding: 34px 22px 92px; }
  .mobile-brand { display: flex; margin-bottom: 28px; }
  .mode-tabs { margin-bottom: 30px; }
  .app-screen { grid-template-columns: 1fr; background-image: radial-gradient(circle at 12% 5%, rgba(255,228,204,.34), transparent 28%), radial-gradient(circle at 90% 14%, rgba(251,239,242,.56), transparent 34%); }
  .sidebar { position: fixed; inset: 0 auto 0 -290px; z-index: 20; width: 270px; height: 100vh; padding: 28px 18px 22px; background: rgba(255,250,245,.91); box-shadow: 18px 0 40px rgba(40,56,47,.13); backdrop-filter: blur(22px); transition: left .2s ease; }
  .sidebar.is-open { left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { min-height: 62px; padding: 0 16px; }
  .breadcrumb { margin-right: auto; margin-left: 12px; }
  .profile-name, .icon-button { display: none; }
  .page-view { padding: 0 16px 90px; }
  .hero-card { min-height: 540px; margin: 0 -16px; padding-top: 250px; background-size: auto 270px; background-position: 63% top; background-color: var(--warm-white); }
  .hero-card::before { background: linear-gradient(0deg, var(--warm-white) 0 52%, rgba(255,253,249,.78) 63%, transparent 80%); }
  .hero-copy { max-width: none; padding: 22px 20px 0; }
  .hero-copy h2 { font-size: 34px; line-height: 1.15; }
  .hero-lead { max-width: 390px; font-size: 16px; }
  .continue-hint { margin-top: 20px; background: rgba(255,255,255,.90); }
  .locations-section { padding-top: 22px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .location-grid, .content-grid { grid-template-columns: 1fr; }
  .location-card { min-height: 0; }
  .location-art { height: 250px; }
  .location-content { min-height: 205px; }
  .location-hero { padding: 28px 23px; }
  .location-symbol { width: 78px; height: 78px; flex-basis: 78px; font-size: 40px; }
}

/* Request 576 · settings live inside the unchanged /sreda/ shell. */
#settings-view {
  padding-bottom: 12px;
}

.settings-stage {
  width: min(660px, 78%);
  margin: 0 auto;
  padding-top: clamp(24px, 5.8cqw, 72px);
  color: #2f3d35;
  font: inherit;
}

.settings-loading,
.settings-error {
  margin: 0;
  color: #6a746e;
  font-size: 13px;
  text-align: center;
}

.settings-error { color: #9a5a48; }
.sv3-heading { margin: 0 0 16px; text-align: center; }
.sv3-heading h1 { margin: 0; color: #334139; font-size: 32px; font-weight: 650; line-height: 1.1; }
.sv3-heading p { margin: 6px 0 0; color: #6a746e; font-size: 13px; line-height: 1.45; }
.sv3-notice { margin: 0 0 8px; padding: 6px 10px; border: 1px solid #cad2b2; border-radius: 8px; background: rgba(240,243,229,.9); color: #59603b; font-size: 12px; }
.sv3-notice.error { border-color: #dfb9ae; background: #fff3ef; color: #9a5a48; }
.sv3-surface { overflow: hidden; border: 1px solid rgba(55,74,63,.12); border-radius: 20px; background: rgba(255,253,249,.88); box-shadow: 0 12px 30px rgba(61,56,48,.055); backdrop-filter: blur(16px); }
.sv3-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 5px; border-bottom: 1px solid rgba(57,74,64,.13); background: rgba(244,239,229,.48); }
.sv3-tab { min-height: 34px; padding: 0; border: 0; border-radius: 8px; color: #617068; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; }
.sv3-tab.active { color: #2f4d3b; background: rgba(255,255,255,.82); box-shadow: 0 2px 9px rgba(61,56,48,.05); }
.sv3-panel { display: none; padding: 15px 20px 17px; }
.sv3-panel.active { display: block; }
.sv3-panel h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; line-height: 1.2; }
.sv3-panel-copy { margin: 0 0 14px; color: #6a746e; font-size: 12px; line-height: 1.45; }
.sv3-profile { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 0 0 16px; border-bottom: 1px solid rgba(57,74,64,.13); }
.sv3-profile h2 { margin: 0 0 2px; font-size: 15px; }
.sv3-profile p { margin: 0; color: #6a746e; font-size: 11px; }
.sv3-avatar { width: 46px; height: 46px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.78); border-radius: 50%; background: #a77a5e center/cover no-repeat; color: #fff; font-size: 14px; font-weight: 700; }
.sv3-photo-form { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.sv3-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px; border: 1px solid rgba(69,106,84,.25); border-radius: 10px; color: #3e654d; background: rgba(255,255,255,.5); font: 650 11px/1.2 inherit; text-decoration: none; cursor: pointer; }
.sv3-button:hover { background: rgba(255,255,255,.84); }
.sv3-button.danger { color: #7d574d; border-color: rgba(125,87,77,.18); }
.sv3-button.wide { width: 100%; margin-top: 12px; }
.sv3-photo-remove,.sv3-photo-cancel { border: 0; background: none; color: #7d574d; font: 11px/1.2 inherit; cursor: pointer; }
.sv3-photo-save[hidden],.sv3-photo-cancel[hidden] { display: none; }
.sv3-row { display: grid; grid-template-columns: minmax(80px, 20%) minmax(0,1fr) auto; align-items: center; gap: 4px 10px; min-height: 41px; border-top: 1px solid rgba(57,74,64,.13); }
.sv3-row.first,.sv3-row:first-of-type { border-top: 0; }
.sv3-label { color: #707870; font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.sv3-value { min-width: 0; overflow: hidden; color: #334139; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.sv3-edit { padding: 5px 0; border: 0; color: #4c6c58; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.sv3-editor { grid-column: 2/-1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 8px; }
.sv3-row [hidden] { display: none; }
.sv3-editor .pole { width: 100%; min-width: 0; height: 32px; padding: 5px 8px; border: 1px solid rgba(69,106,84,.25); border-radius: 7px; background: rgba(255,255,255,.72); color: inherit; font-size: 12px; }
.sv3-edit-actions { display: flex; align-items: center; gap: 8px; }
.sv3-editor .knopka { min-height: 32px; padding: 5px 8px; border: 1px solid #456a54; border-radius: 7px; background: #456a54; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.sv3-field-error { grid-column: 1/-1; color: #9a5a48; }
.sv3-city-picker { position: relative; min-width: 0; }
.sv3-city-picker .pole { width: 100%; min-width: 0; }
.sv3-city-results { position: absolute; z-index: 30; bottom: calc(100% + 5px); left: 0; width: min(335px, 75vw); padding: 5px; border: 1px solid rgba(69,106,84,.25); border-radius: 10px; background: #fffefa; box-shadow: 0 12px 28px rgba(48,57,51,.18); }
.sv3-city-results[hidden] { display: none; }
.sv3-city-option { display: block; width: 100%; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: #334139; font: 12px/1.35 inherit; text-align: left; cursor: pointer; }
.sv3-city-option:hover,.sv3-city-option:focus { outline: 0; background: #f0f3e8; }
.sv3-city-empty { padding: 9px; color: #6a746e; font-size: 11px; }
.sv3-city-credit { display: block; width: 100%; margin-top: 4px; color: #6a746e; font-size: 9px; }
.sv3-city-credit a { color: inherit; }
.sv3-session-action { margin-top: 10px; text-align: right; }
.sv3-session-action .sv3-button { min-height: 32px; font-size: 12px; }
.sv3-access-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(57,74,64,.13); }
.sv3-access-line:first-of-type { border-top: 0; }
.sv3-access-line strong { font-size: 12px; }
.sv3-access-line span { color: #6a746e; font-size: 11px; }
.sv3-status { display: inline-flex; align-items: center; gap: 6px; }
.sv3-status::before { width: 6px; height: 6px; border-radius: 50%; background: #5f8068; content: ""; }
.sv3-renew-note { margin: 10px 0 0; color: #596761; font-size: 12px; line-height: 1.45; }
.sv3-renew-note + .wide { margin-top: 5px; }
.sv3-documents-group { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(57,74,64,.13); }
.sv3-documents-group h3 { margin: 0 0 10px; font-size: 13px; }
.sv3-document-links { display: grid; gap: 0; }
.sv3-document-link { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 12px 0; border-top: 1px solid rgba(57,74,64,.13); color: #486451; font-size: 13px; line-height: 1.35; text-decoration: none; }
.sv3-document-link:first-child { border-top: 0; }
.sv3-document-link small { color: #6a746e; font-size: 11px; text-align: right; }
.sv3-document-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.sv3-consent-list { display: grid; }
.sv3-consent-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(57,74,64,.13); color: inherit; text-decoration: none; }
.sv3-consent-row:first-child { border-top: 0; }
.sv3-consent-row strong { font-size: 12px; }
.sv3-consent-row span,.sv3-consent-empty { color: #6a746e; font-size: 11px; }
.sv3-consent-status { white-space: nowrap; }
.sv3-consent-back { display: inline-block; margin-bottom: 10px; color: #486451; font-size: 11px; text-decoration: none; }
.sv3-consent-title { margin: 0 0 9px!important; }
.sv3-consent-detail { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 7px 14px; margin: 0; padding: 12px 0; border-top: 1px solid rgba(57,74,64,.13); }
.sv3-consent-detail dt { color: #6a746e; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.sv3-consent-detail dd { margin: 0; font-size: 12px; }
.sv3-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sv3-consent-revoke { color: #7d574d; border-color: rgba(125,87,77,.25); }
.sv3-password-form { display: grid; gap: 7px; margin-top: 7px; }
.sv3-password-field { position: relative; display: grid; gap: 3px; }
.sv3-password-field span { font-size: 13px; font-weight: 650; }
.sv3-password-field input { width: 100%; height: 33px; padding: 5px 74px 5px 9px; border: 1px solid rgba(69,106,84,.25); border-radius: 8px; background: #fffefa; color: #2f3d35; font-size: 13px; }
.sv3-password-field input:focus { border-color: #62816b; outline: 3px solid rgba(98,129,107,.13); }
.sv3-show-password { position: absolute; right: 9px; bottom: 8px; padding: 0; border: 0; background: transparent; color: #4c6c58; font-size: 12px; font-weight: 600; cursor: pointer; }
.sv3-password-submit { width: 100%; min-height: 34px; border: 1px solid #456a54; border-radius: 8px; background: #456a54; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.sv3-password-row { display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 10px; }
.sv3-password-row label { color: #707870; font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.sv3-password-input { position: relative; }
.sv3-password-input input { width: 100%; min-height: 38px; padding: 8px 78px 8px 11px; border: 1px solid rgba(69,106,84,.25); border-radius: 9px; background: rgba(255,255,255,.72); color: inherit; font: 12px/1.3 inherit; }
.sv3-password-input button { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); border: 0; background: none; color: #4c6c58; font: 650 10px/1.2 inherit; cursor: pointer; }
.sv3-password-actions { display: flex; justify-content: flex-end; }
.sv3-account-exit { display: flex; justify-content: flex-end; margin-top: 10px; padding: 0 3px; }
.sv3-account-exit a { color: #7d574d; font-size: 12px; text-decoration: none; }
.sv3-account-exit a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1281px) {
  main:has(#settings-view.is-active) > .platform-back-button {
    position: absolute;
    z-index: 50;
    top: 46px;
    left: max(40px, calc((100vw - 1240px) / 2 - 60px));
    display: grid;
    margin: 0;
  }
}

@media (max-width: 1280px) {
  #settings-view { padding-inline: 12px; }
  .settings-stage { width: auto; padding-top: 16px; }
  .sv3-heading h1 { font-size: 26px; }
  .sv3-panel { padding-inline: 12px; }
  .sv3-tabs { gap: 3px; }
  .sv3-tab { font-size: clamp(10px, 3.2vw, 13px); }
  .sv3-profile { grid-template-columns: 46px minmax(0,1fr); }
  .sv3-photo-form { grid-column: 1/-1; justify-content: flex-start; }
  .sv3-row { grid-template-columns: minmax(0,1fr) auto; padding: 3px 0; }
  .sv3-label,.sv3-value { grid-column: 1; }
  .sv3-edit { grid-column: 2; grid-row: 1/3; }
  .sv3-editor { grid-column: 1/-1; }
  .sv3-document-link { grid-template-columns: 1fr; gap: 4px; }
  .sv3-document-link small { text-align: left; }
  .sv3-consent-detail,.sv3-password-row { grid-template-columns: 1fr; }
  .sv3-consent-detail dd { margin-bottom: 5px; }
}
@media (min-width: 1281px) and (max-width: 1100px) {
  #settings-view { padding-inline: 8px; }
  .settings-stage { width: min(660px, 95%); padding-top: 12px; }
  .sv3-heading { margin-bottom: 8px; }
  .sv3-heading h1 { font-size: 24px; }
  .sv3-panel { padding-block: 9px; }
  .sv3-password-form { gap: 4px; }
  .sv3-password-field input { height: 29px; }
  .sv3-session-action { margin-top: 5px; }
  .sv3-account-exit { margin-top: 5px; }
  .sv3-document-link { grid-template-columns: minmax(0,1fr); gap: 2px; padding-block: 4px; }
  .sv3-document-link small { text-align: left; }
  .sv3-documents-group { margin-top: 8px; padding-top: 6px; }
  .sv3-documents-group h3 { margin-bottom: 4px; }
}
@media (min-width: 1281px) and (max-width: 940px) {
  .settings-stage { padding-top: 5px; }
  .sv3-panel { padding-block: 7px; }
  .sv3-tab { min-height: 30px; }
  .sv3-password-field { grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); align-items: center; gap: 6px; }
  .sv3-password-field span { font-size: 12px; line-height: 1.25; }
  .sv3-password-submit { min-height: 29px; }
  .sv3-session-action .sv3-button { min-height: 28px; }
  .sv3-panel-copy { margin-bottom: 6px; }
}
@media (min-width: 1101px) {
  .settings-stage:has(> .sv3-notice) { padding-top: calc(clamp(24px, 5.8cqw, 72px) - 24px); }
}
@media (max-width: 480px) {
  .sv3-documents-group { margin-top: 8px; padding-top: 7px; }
  .sv3-documents-group h3 { margin-bottom: 4px; }
  .sv3-document-link { padding-block: 5px; }
  .sv3-panel-copy { margin-bottom: 7px; }
}

@media (max-width: 500px) {
  .mode-tabs { gap: 3px; }
  .mode-tab { min-height: 44px; padding-inline: 4px; font-size: 10.5px; }
  .scene-copy h1 { font-size: 31px; }
  .login-scene { min-height: 275px; }
  .page-view { padding-inline: 12px; }
  .hero-card { min-height: 535px; padding-top: 235px; background-size: auto 255px; }
  .hero-copy { padding-top: 20px; }
  .hero-copy h2 { margin-top: 9px; font-size: 32px; }
  .continue-hint { grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; min-height: 62px; border-radius: 18px; }
  .continue-hint strong { font-size: 10.5px; }
  .continue-hint button { padding-inline: 12px; }
  .section-heading h2 { font-size: 24px; }
  .location-art { height: 215px; }
  .location-content { min-height: 210px; }
  .location-hero { align-items: flex-start; }
  .location-symbol { display: none; }
}

.material-entry-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 0 0 24px;
  padding: 12px;
  border: 1px solid rgba(80, 96, 75, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.material-entry-preview[hidden] { display: none; }
.material-entry-preview img { width: 132px; height: 94px; object-fit: cover; border-radius: 11px; background: #ebece5; }
.material-entry-preview .eyebrow { margin: 0 0 4px; }
.material-entry-preview h2 { margin: 0 0 5px; font-size: 18px; line-height: 1.25; }
.material-entry-preview p:last-child { margin: 0; color: var(--muted); font-size: 13px; }

.material-view-card {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.material-view-cover { width: 100%; max-height: 390px; object-fit: cover; border-radius: 16px; background: #eff0ea; }
.material-view-copy { align-self: center; }
.material-view-copy h2 { margin: 6px 0 12px; font-size: clamp(28px, 4vw, 46px); line-height: 1.08; }
.material-view-copy p:last-child { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.material-view-video { grid-column: 1 / -1; width: 100%; max-height: 72vh; border-radius: 16px; background: #111; }
.material-unavailable { padding: 54px 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; text-align: center; }
.material-unavailable h2 { margin: 0 0 10px; font-size: 30px; }
.material-unavailable p { max-width: 620px; margin: 0 auto 20px; color: var(--muted); }
.material-library-card { overflow: hidden; padding: 0; }
.material-library-card img { width: 100%; height: 190px; object-fit: cover; background: #eff0ea; }
.material-library-card-copy { display: grid; gap: 10px; padding: 18px; }
.material-library-card-copy h3, .material-library-card-copy p { margin: 0; }
.material-library-card-copy p { color: var(--muted); }

@media (max-width: 760px) {
  .material-entry-preview { grid-template-columns: 92px minmax(0, 1fr); }
  .material-entry-preview img { width: 92px; height: 76px; }
  .material-view-card { grid-template-columns: 1fr; padding: 16px; }
  .material-view-video { grid-column: auto; }
}

/*
 * Desktop reference canvas.
 * The supplied visual is the single atmospheric source for the home screen.
 * Live interface layers cover only the words and controls that differ from it.
 */
@media (min-width: 1281px) {
  .app-screen {
    grid-template-columns: clamp(205px, 15vw, 230px) minmax(0, 1fr);
    width: min(calc(100vw - 32px), 1500px);
    height: min(calc(100vh - 32px), 1000px);
    min-height: 600px;
    margin: max(16px, calc((100vh - 1000px) / 2)) auto;
    overflow: hidden;
    border: 1px solid rgba(221, 214, 204, .74);
    border-radius: 28px;
    background-color: var(--warm-white);
    background-image: url("assets/background-home-continuous-v6-natural.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    box-shadow: 0 24px 72px rgba(59, 54, 47, .14);
  }

  .sidebar {
    height: 100%;
    padding: clamp(24px, 3vh, 34px) clamp(16px, 1.25vw, 22px) clamp(18px, 2vh, 26px);
    border-right-color: rgba(222, 213, 205, .42);
    background-color: transparent;
    background-image: linear-gradient(180deg, rgba(255, 253, 249, .13), rgba(255, 253, 249, .20));
    background-size: 100% 100%;
    background-position: center;
    box-shadow: none;
    backdrop-filter: none;
  }

  .sidebar-brand {
    position: relative;
    z-index: 1;
    padding: 0 clamp(8px, .9vw, 15px) clamp(26px, 3.2vh, 38px);
  }

  .sidebar-brand::before,
  .side-nav::before {
    display: none;
  }

  .sidebar-brand .brand-mark {
    width: clamp(46px, 3.2vw, 56px);
    height: clamp(46px, 3.2vw, 56px);
    flex-basis: clamp(46px, 3.2vw, 56px);
  }

  .sidebar-brand strong { font-size: clamp(20px, 1.4vw, 24px); }
  .sidebar-brand small { font-size: clamp(10px, .7vw, 12px); }
  .side-nav { position: relative; z-index: 1; gap: clamp(3px, .5vh, 6px); }
  .side-nav-bottom {
    margin-top: clamp(60px, 8vh, 90px);
    padding-top: clamp(14px, 1.8vh, 22px);
  }
  .side-nav-bottom::before { top: clamp(-10px, -.6vw, -7px); }

  .nav-item {
    min-height: clamp(46px, 5.2vh, 54px);
    border-radius: 999px;
    padding: 7px clamp(12px, 1.15vw, 18px);
    color: #314039;
    font-size: clamp(14px, .92vw, 16px);
    background: rgba(255, 253, 249, .34);
  }

  .nav-item span { font-size: clamp(18px, 1.2vw, 21px); }
  .nav-item.is-current {
    background: rgba(230, 231, 219, .76);
    box-shadow: inset 0 0 0 1px rgba(72, 98, 76, .035);
  }

  .app-shell {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .topbar {
    min-height: clamp(58px, 7vh, 68px);
    padding: 0 clamp(24px, 2vw, 34px);
    background: rgba(255, 253, 249, .14);
    backdrop-filter: blur(.5px);
  }

  .breadcrumb { font-size: clamp(13px, .96vw, 16px); }
  .profile { gap: clamp(8px, .75vw, 13px); }
  .icon-button, .avatar { width: clamp(38px, 4.5vh, 44px); height: clamp(38px, 4.5vh, 44px); }
  .profile-name { font-size: clamp(13px, .95vw, 16px); }

  #home-view {
    height: auto;
    min-height: calc(100% - clamp(58px, 7vh, 68px));
    padding: 0 clamp(24px, 2vw, 34px) 18px;
    overflow: visible;
  }

  #home-view .hero-card {
    min-height: clamp(280px, 40vh, 390px);
    margin: 0 clamp(-34px, -2vw, -24px);
    background: none;
  }

  #home-view .hero-card::before {
    background:
      linear-gradient(90deg, rgba(255, 252, 248, .18) 0%, rgba(255, 252, 248, .08) 32%, transparent 58%),
      linear-gradient(0deg, rgba(255, 252, 248, .08) 0%, transparent 18%);
  }

  #home-view .hero-copy {
    max-width: min(600px, 48vw);
    padding: clamp(28px, 4vh, 40px) 0 0 clamp(24px, 2vw, 34px);
  }

  #home-view .hero-copy h2 {
    margin: 8px 0 10px;
    font-size: clamp(38px, 2.75vw, 48px);
    line-height: 1.12;
    font-weight: 600;
  }

  #home-view .hero-lead {
    max-width: 520px;
    font-size: clamp(14px, .95vw, 16px);
    line-height: 1.55;
  }

  #home-view .continue-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 172px;
    min-height: 48px;
    margin-top: clamp(18px, 2.5vh, 24px);
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    color: #fff;
    background: var(--green);
    box-shadow: 0 10px 24px rgba(72, 107, 84, .18);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  #home-view .continue-button span { font-size: 20px; line-height: 1; }

  #home-view .locations-section { padding-top: 0; }

  #home-view .section-heading {
    position: relative;
    z-index: 1;
    min-height: 52px;
    margin-bottom: 12px;
  }

  #home-view .section-heading::before {
    display: none;
  }

  #home-view .section-heading h2 {
    margin-top: 4px;
    font-size: clamp(25px, 1.7vw, 30px);
  }

  #home-view .section-note { font-size: clamp(12px, .82vw, 14px); }

  #home-view .location-grid { gap: clamp(10px, .9vw, 16px); }

  #home-view .location-card {
    min-height: 0;
    height: clamp(306px, 39vh, 350px);
    border: 0;
    border-radius: 22px;
    background: rgba(255, 253, 250, .96);
    box-shadow: 0 12px 30px rgba(76, 57, 40, .075);
  }

  #home-view .location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(76, 57, 40, .10);
  }

  #home-view .location-art {
    height: clamp(154px, 20vh, 180px);
    background: transparent;
  }

  #home-view .location-art img { opacity: 1; }

  #home-view .location-content {
    min-height: 0;
    padding: 12px clamp(14px, 1vw, 18px) 14px;
    border-radius: 0 0 22px 22px;
    background: #fffdfa;
    box-shadow: inset 0 1px 0 rgba(238, 232, 227, .72);
  }

  #home-view .status-line { min-height: 22px; }
  #home-view .status-badge { font-size: 10px; }

  #home-view .location-content h3 {
    margin: 7px 0 4px;
    font-size: clamp(16px, 1.05vw, 19px);
  }

  #home-view .location-content > p {
    font-size: clamp(11px, .75vw, 13px);
    line-height: 1.42;
  }

  #home-view .card-footer {
    font-size: 10px;
    padding-top: 8px;
  }
}

@media (min-width: 1281px) and (max-height: 760px) {
  .app-screen {
    width: min(calc(100vw - 32px), 1100px);
    min-height: 600px;
  }

  .sidebar {
    min-height: 600px;
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .sidebar-brand { padding-bottom: 14px; }
  .sidebar-brand .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .sidebar-brand strong { font-size: 18px; }
  .sidebar-brand small { font-size: 9px; }
  .side-nav { gap: 2px; }
  .side-nav-bottom { margin-top: 48px; padding-top: 10px; }

  .nav-item {
    min-height: 40px;
    padding-block: 5px;
    font-size: 13px;
  }

  .nav-item span { font-size: 17px; }

  .topbar { min-height: 52px; }

  #home-view {
    height: auto;
    min-height: calc(100% - 52px);
    padding-bottom: 10px;
  }

  #home-view .hero-card { min-height: 280px; }

  #home-view .hero-copy {
    padding-top: 18px;
  }

  #home-view .hero-copy .eyebrow { font-size: 9px; }

  #home-view .hero-copy h2 {
    margin-block: 6px 7px;
    font-size: 34px;
  }

  #home-view .hero-lead { font-size: 13px; }

  #home-view .continue-button {
    min-width: 148px;
    min-height: 40px;
    margin-top: 12px;
    padding-inline: 20px;
    font-size: 13px;
  }

  #home-view .locations-section { padding-top: 0; }

  #home-view .section-heading {
    min-height: 40px;
    margin-bottom: 6px;
  }

  #home-view .section-heading .eyebrow { font-size: 9px; }
  #home-view .section-heading h2 { margin-top: 2px; font-size: 23px; }
  #home-view .section-note { font-size: 11px; }

  #home-view .location-card { height: 320px; border-radius: 18px; }
  #home-view .location-art { height: 144px; }
  #home-view .location-content { padding: 9px 12px 10px; border-radius: 0 0 18px 18px; }
  #home-view .status-line { min-height: 18px; }
  #home-view .status-badge { min-height: 18px; padding: 2px 7px; font-size: 8px; }
  #home-view .location-content h3 { margin: 5px 0 3px; font-size: 15px; }
  #home-view .location-content > p { font-size: 10px; line-height: 1.35; }
  #home-view .card-footer { padding-top: 5px; font-size: 8px; }
  #home-view .card-footer button { width: 30px; height: 30px; font-size: 14px; }
}

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

/*
 * Home canvas v7.
 * The background and interface share the 1586 x 992 reference grid.
 * Geometry follows the canvas; type keeps readable compact-screen minima.
 */
@media (min-width: 1281px) {
  .app-screen {
    container-type: size;
    grid-template-columns: 17.528% minmax(0, 1fr);
    width: auto;
    height: min(calc(100vh - 32px), 938px);
    min-height: 0;
    max-width: calc(100vw - 32px);
    aspect-ratio: 1586 / 992;
    margin: max(16px, calc((100vh - 938px) / 2)) auto;
    background-image: url("assets/background-home-continuous-v7-candidate.png");
    background-position: center;
    background-size: 100% 100%;
  }

  .sidebar {
    height: 100%;
    padding: 5.24cqh 1.39cqw 2.82cqh;
    border-right-color: rgba(222, 213, 205, .48);
    background: linear-gradient(180deg, rgba(255, 253, 249, .08), rgba(255, 253, 249, .16));
    backdrop-filter: none;
  }

  .sidebar-brand {
    padding: 0 1.01cqw 6.85cqh;
  }

  .sidebar-brand .brand-mark {
    width: clamp(42px, 6.25cqh, 62px);
    height: clamp(42px, 6.25cqh, 62px);
    flex-basis: clamp(42px, 6.25cqh, 62px);
  }

  .sidebar-brand strong { font-size: clamp(18px, 1.51cqw, 24px); }
  .sidebar-brand small { font-size: clamp(9px, .76cqw, 12px); }

  .side-nav {
    gap: clamp(6px, 1.01cqh, 10px);
  }

  .nav-item {
    grid-template-columns: clamp(20px, 1.51cqw, 24px) minmax(0, 1fr);
    gap: clamp(6px, .63cqw, 10px);
    width: 100%;
    min-width: 0;
    min-height: clamp(38px, 5.44cqh, 54px);
    border-radius: 999px;
    padding: .7cqh 1.01cqw;
    font-size: clamp(13px, 1.14cqw, 18px);
    line-height: 1.32;
    background: transparent;
  }

  .nav-item span {
    font-size: clamp(17px, 1.39cqw, 22px);
  }

  .nav-item:not(.is-current) {
    overflow-wrap: anywhere;
  }

  .nav-item.is-current {
    background: rgba(230, 231, 219, .72);
  }

  .side-nav-bottom {
    margin-top: clamp(28px, 4.33cqh, 43px);
    padding-top: clamp(18px, 2.72cqh, 27px);
  }

  .app-shell {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: auto;
  }

  .topbar {
    height: 8.27cqh;
    min-height: 0;
    padding: 0 2.14cqw 0 2.90cqw;
    background: transparent;
    backdrop-filter: none;
  }

  .breadcrumb { font-size: clamp(13px, .88cqw, 14px); }
  .profile { gap: clamp(8px, .63cqw, 10px); }
  .icon-button,
  .avatar {
    width: clamp(36px, 4.03cqh, 40px);
    height: clamp(36px, 4.03cqh, 40px);
  }
  .profile-name { font-size: clamp(13px, .95cqw, 15px); }

  #home-view {
    min-height: 0;
    padding: 0 2.14cqw 2cqh 2.90cqw;
    overflow: visible;
  }

  #home-view .hero-card {
    min-height: 0;
    height: 47.98cqh;
    margin: 0;
    overflow: visible;
    background: none;
  }

  #home-view .hero-card::before { display: none; }

  #home-view .hero-copy {
    max-width: 30.27cqw;
    padding: 6.25cqh 0 0;
  }

  #home-view .hero-copy .eyebrow,
  #home-view .section-heading .eyebrow {
    font-size: clamp(9px, .76cqw, 12px);
    line-height: 1.5;
    letter-spacing: .28em;
  }

  #home-view .hero-copy h2 {
    margin: clamp(10px, 1.6cqh, 16px) 0 clamp(14px, 2.2cqh, 22px);
    color: #34453d;
    font-size: clamp(36px, 3.28cqw, 52px);
    line-height: 1.06;
    font-weight: 600;
    letter-spacing: -.045em;
  }

  #home-view .hero-lead {
    max-width: 30.27cqw;
    color: #667169;
    font-size: clamp(13px, 1.14cqw, 18px);
    line-height: 1.5;
  }

  #home-view .continue-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(9px, .76cqw, 12px);
    width: clamp(153px, 13.87cqw, 220px);
    min-width: 0;
    height: clamp(40px, 5.44cqh, 54px);
    min-height: 0;
    margin-top: clamp(18px, 2.82cqh, 28px);
    border: 0;
    border-radius: 999px;
    padding: 0 clamp(18px, 1.51cqw, 24px);
    color: #fff;
    background: var(--green);
    box-shadow: 0 10px 24px rgba(72, 107, 84, .16);
    font-size: clamp(13px, 1.01cqw, 16px);
    font-weight: 600;
  }

  #home-view .continue-button span {
    font-size: clamp(18px, 1.39cqw, 22px);
  }

  #home-view .locations-section { padding-top: 0; }

  #home-view .section-heading {
    height: 7.46cqh;
    min-height: 0;
    margin: 0;
    align-items: flex-start;
  }

  #home-view .section-heading h2 {
    margin: .45cqh 0 0;
    color: #34453d;
    font-size: clamp(22px, 1.89cqw, 30px);
    line-height: 1.14;
    font-weight: 600;
  }

  #home-view .section-note {
    align-self: center;
    max-width: 20cqw;
    font-size: clamp(11px, .88cqw, 14px);
    line-height: 1.35;
    text-align: right;
  }

  #home-view .location-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.14cqw;
  }

  #home-view .location-card {
    height: clamp(280px, 35.48cqh, 352px);
    min-height: 0;
    border: 0;
    border-radius: clamp(18px, 2.42cqh, 24px);
    background: rgba(255, 253, 250, .97);
    box-shadow: 0 12px 30px rgba(76, 57, 40, .07);
  }

  #home-view .location-art {
    height: clamp(140px, 18.15cqh, 180px);
    flex: 0 0 auto;
    background: transparent;
  }

  #home-view .location-content {
    min-height: 0;
    padding: clamp(10px, 1.21cqh, 12px) clamp(12px, 1.14cqw, 18px) clamp(10px, 1.41cqh, 14px);
    border-radius: 0 0 clamp(18px, 2.42cqh, 24px) clamp(18px, 2.42cqh, 24px);
    background: rgba(255, 253, 250, .98);
  }

  #home-view .status-line { min-height: clamp(18px, 2.22cqh, 22px); }
  #home-view .status-badge {
    min-height: clamp(18px, 2.22cqh, 22px);
    padding: 2px clamp(7px, .57cqw, 9px);
    font-size: clamp(9px, .69cqw, 11px);
  }

  #home-view .location-content h3 {
    margin: clamp(5px, .7cqh, 7px) 0 clamp(3px, .4cqh, 4px);
    font-size: clamp(15px, 1.26cqw, 20px);
    line-height: 1.18;
  }

  #home-view .location-content > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: clamp(11px, .82cqw, 13px);
    line-height: 1.38;
  }

  #home-view .card-footer {
    padding-top: clamp(5px, .8cqh, 8px);
    font-size: clamp(9px, .63cqw, 10px);
  }

  #home-view .card-footer button,
  #home-view .location-card .card-footer button {
    width: clamp(32px, 4.23cqh, 42px);
    height: clamp(32px, 4.23cqh, 42px);
    min-height: 0;
    font-size: clamp(14px, 1.14cqw, 18px);
  }
}

@media (min-width: 1281px) and (max-aspect-ratio: 1586 / 992) {
  .app-screen {
    width: min(calc(100vw - 32px), 1500px);
    height: auto;
    max-height: calc(100vh - 32px);
  }
}

/*
 * Home canvas v8.
 * Typography and colors follow the current working specification.
 * The page owns scrolling; the background, navigation and content move together.
 */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(72, 107, 84, .48) transparent;
}

html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb {
  min-height: 54px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(72, 107, 84, .48);
  background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover { background-color: rgba(72, 107, 84, .68); }

body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #fffdf9;
  transition: background .2s ease;
}

body[data-backdrop="warm-white"] {
  background: #fffdf9;
}

body[data-backdrop="cream"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(248, 228, 212, .46), transparent 34%),
    linear-gradient(135deg, #fff6f0 0%, #fffdf9 58%, #fff8f4 100%);
}

body[data-backdrop="rose"] {
  background:
    radial-gradient(circle at 82% 14%, rgba(251, 239, 242, .88), transparent 38%),
    linear-gradient(135deg, #fffdf9 0%, #fbeff2 100%);
}

@media (min-width: 1281px) {
  .app-screen {
    container-type: inline-size;
    width: min(calc(159.879vh - 51.16px), calc(100vw - 48px), 1500px);
    height: auto;
    min-height: calc(100vh - 32px);
    max-height: none;
    aspect-ratio: auto;
    margin: 24px auto 42px;
    overflow: hidden;
    background-color: #fceef2;
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    box-shadow:
      0 30px 82px rgba(40, 56, 47, .14),
      0 10px 28px rgba(232, 212, 193, .30),
      inset 0 0 0 1px rgba(238, 232, 227, .72);
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    align-self: stretch;
  }

  .app-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .topbar {
    color: #59665f;
  }

  .breadcrumb,
  .profile-name,
  #home-view .hero-lead,
  #home-view .section-note,
  #home-view .location-content > p,
  #home-view .card-footer {
    color: #59665f;
  }

  .sidebar-brand strong,
  .nav-item,
  #home-view .hero-copy h2,
  #home-view .section-heading h2,
  #home-view .location-content h3 {
    color: #28382f;
  }

  .nav-item {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
  }

  #home-view .hero-copy {
    max-width: 38cqw;
  }

  #home-view .hero-copy h2 {
    margin: 12px 0 16px;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.035em;
  }

  #home-view .hero-lead {
    max-width: 38cqw;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
  }

  #home-view .continue-button {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
  }

  #home-view .hero-copy .eyebrow,
  #home-view .section-heading .eyebrow {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
  }

  #home-view .section-heading h2 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.03em;
  }

  #home-view .section-note {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
  }

  #home-view .location-content h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
  }

  #home-view .location-content > p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
  }

  #home-view .status-badge,
  #home-view .card-footer {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
  }
}

/*
 * Home canvas v10 · 1872 × 1171 centered grid.
 * All desktop geometry maps to the background's native coordinate system.
 */
@media (min-width: 1281px) {
  .app-screen {
    container-type: inline-size;
    grid-template-columns: 17.5% minmax(0, 1fr);
    width: min(calc(100vw - 200px), 1240px);
    height: auto;
    min-height: 0;
    aspect-ratio: 1872 / 1171;
    margin: 24px auto 42px;
    overflow: hidden;
    background-color: #fceef2;
    background-image: url("assets/background-variants/background-home-warm-milk-1872x1171.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
  }

  .sidebar {
    position: relative;
    top: auto;
    width: auto;
    height: 62.553cqw;
    min-height: 62.553cqw;
    align-self: start;
    padding: 2.671cqw 1.175cqw 1.496cqw;
    border-right: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .sidebar-brand {
    min-height: 3.312cqw;
    padding: 0 .855cqw 3.739cqw;
    gap: .748cqw;
  }

  .sidebar-brand .brand-mark {
    width: 3.312cqw;
    height: 3.312cqw;
    flex-basis: 3.312cqw;
  }

  .sidebar-brand strong {
    font-size: 1.282cqw;
    line-height: 1;
  }

  .sidebar-brand small {
    max-width: 8.547cqw;
    margin-top: .321cqw;
    font-size: .641cqw;
    line-height: 1.5;
  }

  .side-nav {
    gap: .534cqw;
  }

  .nav-item {
    grid-template-columns: 1.175cqw minmax(0, 1fr);
    gap: .534cqw;
    min-height: 2.885cqw;
    padding: .427cqw .855cqw;
    border-radius: 999px;
    font-size: .962cqw;
    font-weight: 500;
    line-height: 1.34;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .nav-item span {
    font-size: 1.175cqw;
  }

  .side-nav-bottom {
    margin-top: 10.043cqw;
    padding-top: 2.137cqw;
  }

  .app-shell {
    height: auto;
    min-height: 62.553cqw;
    overflow: visible;
  }

  .topbar {
    height: 4.380cqw;
    min-height: 0;
    padding: 0 3.365cqw 0 3.419cqw;
    background: transparent;
  }

  .breadcrumb {
    font-size: .748cqw;
  }

  .profile {
    gap: .534cqw;
  }

  .icon-button,
  .avatar {
    width: 2.137cqw;
    height: 2.137cqw;
  }

  .profile-name {
    font-size: .801cqw;
  }

  #home-view {
    min-height: 0;
    padding: 0 3.365cqw 2.137cqw 3.419cqw;
    overflow: visible;
  }

  #home-view .hero-card {
    height: 27.4cqw;
    min-height: 0;
    margin: 0;
    overflow: visible;
    background: none;
  }

  #home-view .hero-card::before {
    display: none;
  }

  #home-view .hero-copy {
    max-width: 26.709cqw;
    padding: 4.7cqw 0 0;
  }

  #home-view .hero-copy .eyebrow,
  #home-view .section-heading .eyebrow {
    font-size: .641cqw;
    font-weight: 600;
    line-height: 1.42;
    letter-spacing: .28em;
  }

  #home-view .hero-copy h2 {
    margin: .748cqw 0 .748cqw;
    color: #4b4f49;
    font-size: 2.778cqw;
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.045em;
  }

  #home-view .hero-lead {
    max-width: 26.709cqw;
    color: #676768;
    font-size: .962cqw;
    font-weight: 400;
    line-height: 1.5;
  }

  #home-view .continue-button {
    width: 11.752cqw;
    min-width: 0;
    height: 2.885cqw;
    min-height: 0;
    margin-top: 1.389cqw;
    padding: 0 1.282cqw;
    gap: .641cqw;
    border-radius: 999px;
    font-size: .855cqw;
    font-weight: 600;
    line-height: 1.3;
  }

  #home-view .continue-button span {
    font-size: 1.175cqw;
  }

  #home-view .locations-section {
    padding-top: 0;
  }

  #home-view .section-heading {
    height: 3.739cqw;
    min-height: 0;
    margin: 0;
    align-items: flex-start;
  }

  #home-view .section-heading h2 {
    margin: .321cqw 0 0;
    color: #34453d;
    font-size: 1.603cqw;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.03em;
  }

  #home-view .section-note {
    align-self: flex-start;
    width: 16.560cqw;
    max-width: none;
    margin-top: .267cqw;
    color: #667169;
    font-size: .748cqw;
    font-weight: 400;
    line-height: 1.42;
    text-align: right;
  }

  #home-view .location-grid {
    grid-template-columns: repeat(4, 18.145cqw);
    gap: 1.6cqw;
  }

  #home-view .location-card {
    width: 18.145cqw;
    height: 22cqw;
    min-height: 0;
    border: 0;
    border-radius: 1.282cqw;
    background: rgba(255, 253, 250, .96);
    box-shadow: 0 .641cqw 1.603cqw rgba(76, 57, 40, .07);
  }

  #home-view .location-art {
    height: 10.9cqw;
    flex: 0 0 10.9cqw;
  }

  #home-view .location-content {
    min-height: 11.1cqw;
    padding: .641cqw .962cqw .748cqw;
    border-radius: 0 0 1.282cqw 1.282cqw;
    background: rgba(255, 253, 250, .98);
  }

  #home-view .status-line {
    min-height: 1.175cqw;
  }

  #home-view .status-badge {
    min-height: 1.175cqw;
    padding: .107cqw .481cqw;
    font-size: .588cqw;
    line-height: 1.25;
  }

  #home-view .location-content h3 {
    margin: .267cqw 0 .214cqw;
    color: #34453d;
    font-size: 1.068cqw;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.025em;
  }

  #home-view .location-content > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #667169;
    font-size: .748cqw;
    font-weight: 400;
    line-height: 1.36;
  }

  #home-view .card-footer {
    padding-top: .427cqw;
    color: #667169;
    font-size: .534cqw;
    font-weight: 600;
    line-height: 1.4;
  }

  #home-view .card-footer button,
  #home-view .location-card .card-footer button {
    width: 2.244cqw;
    height: 2.244cqw;
    min-height: 0;
    font-size: .962cqw;
  }
}

/* Approved home navigation and first-entry action. */
.nav-icon {
  width: 20px;
  height: 20px;
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#home-view .continue-button {
  border: 1px solid rgba(73, 105, 82, .62);
  color: #355843;
  background: linear-gradient(180deg, rgba(255, 254, 249, .98), rgba(255, 241, 224, .96));
  box-shadow:
    0 9px 20px rgba(147, 111, 76, .14),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#home-view .continue-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fffef9, #ffecd6);
  box-shadow:
    0 12px 24px rgba(147, 111, 76, .17),
    inset 0 1px 0 rgba(255, 255, 255, .96);
}

#home-view .continue-button:focus-visible {
  outline: 3px solid rgba(73, 105, 82, .22);
  outline-offset: 3px;
}

@media (min-width: 1281px) {
  .nav-icon {
    width: 1.175cqw;
    height: 1.175cqw;
  }

  #home-view .section-heading {
    transform: translateY(-.32cqw);
  }
}

/* Approved typography · Onest expressive · 11.11.2026. */
.app-screen,
.app-screen button,
.app-screen input,
.app-screen textarea,
.app-screen select,
.app-screen .brand,
.app-screen .breadcrumb,
.app-screen .profile,
.app-screen .sidebar,
#home-view .hero-copy,
#home-view .locations-section,
#home-view .location-card {
  font-family: Onest, Manrope, sans-serif;
}

.app-screen .brand strong {
  font-size: clamp(20px, 1.4cqw, 23px);
  font-weight: 600;
}

.app-screen .brand small {
  font-size: clamp(10px, .7cqw, 11.5px);
  line-height: 1.5;
}

/* Compact institute signature in the upper-left corner. */
.app-screen .sidebar-brand {
  gap: .55cqw;
}

.app-screen .sidebar-brand .brand-mark {
  width: 2.35cqw;
  height: 2.35cqw;
  flex-basis: 2.35cqw;
}

.app-screen .sidebar-brand strong {
  font-size: clamp(16px, 1.01cqw, 18px);
}

.app-screen .sidebar-brand small {
  max-width: 8cqw;
  margin-top: .24cqw;
  font-size: clamp(8px, .53cqw, 9.5px);
  line-height: 1.45;
}

.app-screen .breadcrumb {
  font-size: clamp(12.5px, .82cqw, 13.5px);
}

.app-screen .nav-item {
  font-size: clamp(14px, .98cqw, 15.5px);
  font-weight: 500;
  line-height: 1.48;
}

#home-view .hero-copy {
  max-width: 31.5cqw;
}

#home-view .hero-copy .eyebrow {
  font-size: clamp(10px, .64cqw, 11px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .21em;
}

#home-view .hero-copy h2 {
  margin: .9cqw 0 1.04cqw;
  font-size: clamp(42px, 3.35cqw, 49px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

#home-view .hero-lead {
  max-width: 31cqw;
  font-size: clamp(14px, .96cqw, 15.5px);
  font-weight: 400;
  line-height: 1.66;
}

#home-view .continue-button {
  margin-top: 2.5cqw;
  font-size: clamp(13px, .88cqw, 14px);
  font-weight: 500;
}

#home-view .section-heading h2 {
  font-size: clamp(26px, 1.86cqw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.024em;
}

#home-view .location-content h3 {
  font-size: clamp(16px, 1.12cqw, 17.5px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -.02em;
}

#home-view .location-content > p {
  font-size: clamp(11.5px, .8cqw, 12.5px);
  line-height: 1.54;
}

#home-view .status-badge {
  font-size: clamp(9px, .62cqw, 10px);
  font-weight: 500;
}

#home-view .card-footer {
  font-size: clamp(9px, .62cqw, 10px);
}

/* Reversible preview · roomier location cards · 11.11.2026.
 * Rollback: remove this media block only.
 */
@media (min-width: 1281px) {
  #home-view .location-card {
    height: 22.8cqw;
  }

  #home-view .location-art {
    height: 10.3cqw;
    flex-basis: 10.3cqw;
  }

  #home-view .location-content {
    min-height: 12.5cqw;
  }

  #home-view .location-content h3 {
    min-height: 2.56em;
  }

  #home-view .location-content > p {
    display: block;
    min-height: 3.08em;
    overflow: visible;
    -webkit-line-clamp: unset;
  }
}

/* Reversible preview · personal welcome hero · 11.11.2026.
 * Rollback: restore the eyebrow and "Моя среда" in index.html,
 * then remove this block.
 */
#home-view .hero-copy .welcome-title {
  max-width: 31cqw;
  margin: 0 0 clamp(16px, 1.1cqw, 18px);
  font-size: clamp(36px, 2.75cqw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.03em;
}

#home-view .hero-copy .welcome-title + .hero-lead {
  max-width: 31cqw;
}

#home-view .hero-copy .welcome-title ~ .continue-button {
  margin-top: clamp(22px, 2cqw, 30px);
}

/* Reversible preview · framed profile avatar · 11.11.2026.
 * Rollback: remove this block only.
 */
@media (min-width: 1281px) {
  .app-screen .profile {
    display: grid;
    place-items: center;
    width: 3.62cqw;
    height: 3.62cqw;
    padding: .34cqw;
    border: 1px solid rgba(91, 82, 71, .10);
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    box-shadow:
      0 .42cqw 1.1cqw rgba(93, 70, 49, .12),
      inset 0 1px 0 rgba(255, 255, 255, .96);
    transform: translateY(1.14cqw);
  }

  .app-screen .profile .avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 1cqw;
  }

  .app-screen .profile .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }
}

/*
 * Local reversible prototype · shared authentication shell · 12.11.2026
 * Scope: login, registration, invitation activation and password recovery only
 * Rollback: restore dist from snapshots/before-auth-rebuild-2026-11-12-1551-local
 */
.login-screen.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(420px, .86fr);
  width: 100%;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  font-family: Onest, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4ede5;
}

.login-screen .login-scene {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: clamp(34px, 4.5vw, 68px);
  background-image:
    linear-gradient(90deg, rgba(255, 249, 242, .78) 0%, rgba(255, 249, 242, .42) 34%, rgba(255, 249, 242, .04) 70%),
    linear-gradient(0deg, rgba(255, 249, 242, .34) 0%, rgba(255, 249, 242, .02) 48%),
    url("assets/mayak-unified-background-v1.png");
  background-size: cover;
  background-position: 54% center;
  background-repeat: no-repeat;
}

.login-screen .login-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 16% 22%, rgba(255, 251, 246, .36), transparent 34%);
}

.login-scene-header {
  position: absolute;
  z-index: 2;
  top: clamp(56px, 8.5vh, 88px);
  left: clamp(34px, 4.5vw, 68px);
}

.login-screen .brand-on-scene {
  margin: 0;
}

.login-screen .scene-copy {
  position: absolute;
  z-index: 2;
  top: 51%;
  left: clamp(34px, 4.5vw, 68px);
  width: min(calc(100% - 68px), 450px);
  margin: 0;
}

.login-screen .scene-eyebrow {
  margin: 0 0 16px;
  color: #526158;
  font-family: Manrope, Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(11px, .78vw, 13px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.login-screen .scene-copy h1 {
  max-width: 420px;
  margin: 0 0 20px;
  font-size: clamp(34px, 2.65vw, 43px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.login-screen .scene-copy > p:last-child {
  max-width: 390px;
  margin: 0;
  color: #536159;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.6;
}

.login-screen .login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100dvh;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(28px, 4vh, 48px) clamp(32px, 4.2vw, 66px) 26px;
  background: rgba(255, 252, 247, .96);
  border-left: 1px solid rgba(87, 73, 59, .07);
  box-shadow: -18px 0 55px rgba(82, 65, 46, .08);
  backdrop-filter: blur(18px);
  scrollbar-width: thin;
  scrollbar-color: rgba(72, 107, 84, .30) transparent;
}

.login-screen .login-panel::-webkit-scrollbar {
  width: 7px;
}

.login-screen .login-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(72, 107, 84, .30);
  background-clip: padding-box;
}

.auth-card {
  width: min(100%, 440px);
  margin: auto;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 clamp(22px, 3vh, 32px);
  padding: 4px;
  border-radius: 14px;
  background: #f1ebe4;
}

@media (min-width: 1281px) {
  .login-screen .login-panel {
    justify-content: flex-start;
  }

  .auth-card {
    margin: 0 auto auto;
  }

  body[data-auth-mode="register"] .auth-switch {
    margin-bottom: 36px;
  }

  body[data-auth-mode="invite"] .auth-switch {
    margin-bottom: 60px;
  }

  body[data-auth-mode="signin"] .auth-switch {
    margin-bottom: 72px;
  }

  body[data-auth-mode="recovery"] .auth-switch {
    margin-bottom: 84px;
  }
}

.auth-switch-button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: #6c756f;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.auth-switch-button.is-current {
  color: var(--green-deep);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 18px rgba(82, 65, 46, .07);
}

.login-screen .auth-form {
  width: 100%;
  max-width: none;
  margin: 0;
}

.login-screen .auth-form h2 {
  margin: 0 0 22px;
  font-size: clamp(30px, 2.5vw, 36px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.login-screen .form-lead {
  max-width: 420px;
  margin: 0 0 22px;
  color: #657068;
  font-size: 13px;
  line-height: 1.6;
}

.invitation-context {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: -4px 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(72, 107, 84, .12);
  border-radius: 14px;
  color: var(--green-deep);
  background: rgba(232, 240, 233, .64);
}

.invitation-context > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: var(--green);
}

.invitation-context p,
.invitation-context strong,
.invitation-context small {
  display: block;
  margin: 0;
}

.invitation-context strong {
  font-size: 13px;
  font-weight: 600;
}

.invitation-context small {
  margin-top: 2px;
  color: #667169;
  font-size: 11px;
  line-height: 1.4;
}

.login-screen .field {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.login-screen .field > span:first-child {
  color: #39473f;
  font-size: 12px;
  font-weight: 500;
}

.login-screen .field input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(74, 88, 80, .16);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .88);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.login-screen .field input:hover {
  border-color: rgba(72, 107, 84, .30);
}

.login-screen .field input:focus {
  border-color: rgba(72, 107, 84, .48);
  background: white;
  box-shadow: 0 0 0 4px rgba(72, 107, 84, .08);
  outline: 0;
}

.login-screen .field input[readonly] {
  color: #69736c;
  background: rgba(242, 239, 234, .82);
}

.password-control {
  position: relative;
  display: block;
}

.login-screen .password-control input {
  padding-right: 90px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  padding: 8px;
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.login-screen .agreement-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 16px;
  color: #69736d;
  font-size: 11px;
  line-height: 1.5;
}

.document-link {
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--green);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(72, 107, 84, .34);
  text-underline-offset: 2px;
  cursor: pointer;
}

.login-screen .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  min-height: 52px;
  position: relative;
  overflow: hidden;
  border: 1px solid #a7b8a9;
  border-radius: 14px;
  padding: 0 24px;
  color: #31513d;
  background:
    radial-gradient(ellipse 78% 72% at 50% -18%, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .52) 45%, rgba(255, 255, 255, 0) 76%),
    linear-gradient(180deg, #fbfcf8 0%, #eef3ed 50%, #e1e9e1 100%);
  box-shadow:
    0 15px 30px rgba(45, 68, 53, .16),
    0 4px 9px rgba(45, 68, 53, .10),
    inset 0 2px 1px rgba(255, 255, 255, .98),
    inset 0 -4px 6px rgba(67, 96, 75, .17),
    inset 3px 0 5px rgba(255, 255, 255, .44),
    inset -3px 0 5px rgba(55, 79, 62, .07);
  font-size: 13px;
  font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-screen .primary-button:hover {
  transform: translateY(-1px);
  background:
    radial-gradient(ellipse 82% 76% at 50% -14%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, .60) 44%, rgba(255, 255, 255, 0) 76%),
    linear-gradient(180deg, #ffffff 0%, #f1f6f0 50%, #e4ece4 100%);
  box-shadow:
    0 18px 34px rgba(45, 68, 53, .18),
    0 5px 10px rgba(45, 68, 53, .11),
    inset 0 2px 1px rgba(255, 255, 255, 1),
    inset 0 -4px 6px rgba(67, 96, 75, .16),
    inset 3px 0 5px rgba(255, 255, 255, .48),
    inset -3px 0 5px rgba(55, 79, 62, .07);
}

.login-screen .primary-button:active {
  transform: translateY(1px);
  background: linear-gradient(180deg, #e2eae2 0%, #eef3ed 48%, #f8faf6 100%);
  box-shadow:
    0 7px 15px rgba(45, 68, 53, .13),
    inset 0 4px 7px rgba(55, 79, 62, .18),
    inset 0 -2px 2px rgba(255, 255, 255, .86),
    inset 2px 0 4px rgba(55, 79, 62, .07),
    inset -2px 0 4px rgba(255, 255, 255, .38);
}

.login-screen .primary-button:focus-visible {
  outline: 3px solid rgba(73, 105, 82, .22);
  outline-offset: 3px;
}

.form-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-top: 11px;
}

.login-screen .text-button {
  display: inline-flex;
  width: auto;
  margin: 0;
  border: 0;
  padding: 6px 2px;
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.form-message {
  margin: 0 0 13px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
}

.form-message.is-error {
  color: #7c413d;
  background: #f9ebe8;
}

.form-message.is-success {
  color: #365945;
  background: #eaf2eb;
}

.form-message.is-neutral {
  color: #665a4c;
  background: #f4efe8;
}

.login-screen .prototype-note {
  margin: 15px 0 0;
  color: #9a9e9a;
  font-size: 9.5px;
}

@media (max-height: 760px) and (min-width: 1281px) {
  .login-screen .login-panel {
    justify-content: flex-start;
    padding-top: 22px;
    padding-bottom: 18px;
  }

  .auth-card {
    margin-top: 0;
  }

  .login-screen .auth-form h2 {
    margin-bottom: 20px;
    font-size: 30px;
  }

  .login-screen .field {
    gap: 5px;
    margin-bottom: 10px;
  }

  .login-screen .field input {
    height: 44px;
  }

  .login-screen .agreement-row {
    margin: 12px 0 14px;
  }

  .login-screen .primary-button {
    min-height: 48px;
  }

  .login-screen .form-lead {
    margin-bottom: 20px;
  }

}

/* Request 492 · desktop return button outside the complete platform canvas.
 * The original in-flow button remains the mobile control.
 * Rollback: remove this block and the platform-back-button from index.html.
 */
.platform-back-button {
  display: none;
}

@media (min-width: 1281px) {
  #location-view > .back-button {
    display: none;
  }

  main:has(#location-view.is-active) > .platform-back-button {
    position: absolute;
    z-index: 50;
    top: 46px;
    left: max(40px, calc((100vw - 1240px) / 2 - 60px));
    display: grid;
    margin: 0;
  }
}

@media (max-width: 1280px) {
  .login-screen.is-active {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .login-screen .login-scene {
    height: 320px;
    min-height: 320px;
    padding: 26px 24px;
    background-position: 58% center;
  }

  .login-screen .login-scene-header {
    display: flex;
    top: 24px;
    left: 24px;
  }

  .login-screen .scene-copy {
    position: absolute;
    top: 58%;
    bottom: auto;
    left: 24px;
    width: min(82%, 430px);
  }

  .login-screen .scene-copy h1 {
    max-width: 410px;
    margin: 0;
    font-size: clamp(28px, 6.6vw, 38px);
  }

  .login-screen .scene-eyebrow,
  .login-screen .scene-copy > p:last-child {
    display: none;
  }

  .login-screen .login-panel {
    justify-content: flex-start;
    height: auto;
    min-height: calc(100dvh - 320px);
    overflow: visible;
    padding: 28px 22px 34px;
    border-left: 0;
    border-top: 1px solid rgba(87, 73, 59, .07);
    box-shadow: 0 -14px 38px rgba(82, 65, 46, .07);
  }

  .login-screen .mobile-brand {
    display: none;
  }

  .auth-switch {
    margin-bottom: 28px;
  }
}

@media (max-width: 500px) {
  .login-screen .login-scene {
    height: 275px;
    min-height: 275px;
    padding: 22px 18px;
    background-position: 60% center;
  }

  .login-screen .scene-copy {
    top: 58%;
    bottom: auto;
    left: 18px;
    width: 94%;
  }

  .login-screen .scene-copy h1 {
    font-size: 29px;
  }

  .login-screen .login-panel {
    min-height: calc(100dvh - 275px);
    padding-inline: 18px;
  }

  .login-screen .auth-form h2 {
    font-size: 31px;
  }

}

/* Request 501: official Institute signature and the selected, more visible navigation size. */
.app-screen .sidebar-brand.institute-sign {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding-right: 0;
  padding-left: 0;
  gap: 0;
  color: #263b2f;
}

.app-screen .institute-sign__mark {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
}

.app-screen .institute-sign__divider {
  width: 1px;
  height: 38px;
  flex: 0 0 1px;
  margin: 0 11px;
  background: rgba(38, 59, 47, .42);
}

.app-screen .institute-sign__name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  color: #263b2f;
  font-size: 8.6px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: .10em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-screen .nav-item {
  font-size: 16px;
}

@media (max-width: 1280px) {
  .app-screen .sidebar-brand.institute-sign {
    padding-right: 4px;
    padding-left: 4px;
  }

  .app-screen .institute-sign__name {
    font-size: 8.4px;
  }
}

/* Release 511: approved desktop left-rail treatment.
   Keep the content canvas and card geometry untouched. */
@media (min-width: 1281px) {
  .app-screen .sidebar {
    border-right: 1px solid rgba(56, 72, 63, .15);
    background: linear-gradient(180deg, rgba(255, 253, 249, .05), rgba(255, 253, 249, .11));
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .28);
  }

  .app-screen .institute-sign__mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .app-screen .institute-sign__divider {
    height: 40px;
    margin: 0 10px;
    background: rgba(38, 59, 47, .32);
  }

  .app-screen .institute-sign__name {
    gap: 2px;
    font-size: 9.4px;
    line-height: 1.12;
    letter-spacing: .085em;
  }

  .app-screen .nav-item {
    color: #314239;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .app-screen .nav-item.is-current {
    position: relative;
    background: rgba(241, 237, 224, .54);
    box-shadow: none;
  }

  .app-screen .nav-item.is-current::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 4px;
    width: 2px;
    border-radius: 999px;
    background: #55725f;
    content: "";
  }
}

/* Mobile drawer controls are separate from the desktop sidebar. */
.sidebar-close, .sidebar-backdrop { display: none; }
.settings-home-return { display: none; }
@media (max-width: 1280px) {
  .settings-home-return { display: grid; width: 44px; height: 44px; margin: 10px 0 18px; }
  body.mobile-navigation-open { overflow: hidden; }
  html body #app-screen .sidebar {
    z-index: 100;
    width: min(310px, calc(100vw - 48px));
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: max(12px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fffbf6;
    transition: transform .2s ease, visibility .2s;
    left: 0;
    transform: translateX(-100%);
    visibility: hidden;
  }
  html body #app-screen .sidebar.is-open { transform: translateX(0); visibility: visible; }
  html body #app-screen .sidebar .sidebar-brand { flex: 0 0 auto; padding: 4px 8px 24px; }
  html body #app-screen .sidebar .side-nav { flex: 0 0 auto; }
  html body #app-screen .sidebar .side-nav-bottom { margin-top: 20px; padding-top: 16px; }
  html body #app-screen .sidebar button.nav-item { min-height: 48px; padding: 10px 12px; white-space: normal; }
  html body #app-screen .sidebar-close {
    position: sticky; top: 0; align-self: flex-end; z-index: 1;
    flex: 0 0 44px; margin-top: 0; margin-bottom: 8px;
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid rgba(74,88,80,.18); border-radius: 50%;
    background: #fffdf9; color: #456a54; cursor: pointer;
  }
  html body #app-screen .sidebar-close span { font: 28px/1 Arial, sans-serif; }
  html body #app-screen .sidebar-backdrop:not([hidden]) {
    display: block; position: fixed; z-index: 99; inset: 0; background: rgba(31,45,36,.28);
  }
  html body #app-screen .mobile-menu { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html body #app-screen .sidebar { transition: none; }
}

/* First entry: fixed location order, emphasis follows the current access list. */
[data-action="start"][hidden]{display:none!important}
#home-view .location-highlighted{outline:2px solid #55775f;outline-offset:3px;box-shadow:0 10px 24px #456a5430}
#home-view .location-highlighted .status-badge{background:#456a54;color:white}
@media(min-width:1281px){
 #home-view .location-content{display:flex;flex-direction:column;gap:3px;padding-top:8px;padding-bottom:8px}
 #home-view .location-content .status-line{flex:0 0 14px;min-height:14px;line-height:1}
 #home-view .location-content h3{margin:0;font-size:14px;line-height:1.15}
 #home-view .location-content p{margin:0;font-size:10px;line-height:1.25}
 #home-view .location-content .card-footer{margin-top:auto;flex:0 0 29px;min-height:29px;padding:0;gap:4px;line-height:1.15}
 #home-view .location-content .card-footer>span{font-size:8px;line-height:1.15}
}
@media(max-width:1280px){
 #home-view .hero-card{height:auto;min-height:0}
 #home-view .hero-copy{width:100%;max-width:none;padding:20px 16px;box-sizing:border-box}
 #home-view .hero-copy .welcome-title{font-size:32px;line-height:1.08;max-width:none;width:auto;margin-bottom:14px}
 #home-view .hero-copy .welcome-title + .hero-lead{width:auto;max-width:none;font-size:14px;line-height:1.5;text-align:left}
 #home-view .hero-copy .continue-button{display:inline-flex;align-items:center;justify-content:space-between;gap:14px;min-width:125px;min-height:36px;margin-top:18px;padding:7px 15px;border:1px solid #879887;border-radius:20px;background:#fffdf9;color:#456a54;font:600 13px Onest,Arial,sans-serif;cursor:pointer}
 #home-view .location-grid{grid-template-columns:1fr;gap:18px}
 #home-view .location-card{width:100%;height:auto;min-height:0}
 #home-view .location-art{height:180px}
 #home-view .location-content{min-height:0;padding:16px;gap:8px}
 #home-view .location-content h3{font-size:21px;line-height:1.15}
 #home-view .location-content p{font-size:13px;line-height:1.45}
 #home-view .location-content .card-footer{margin-top:12px;min-height:32px}
 #home-view .location-content .card-footer span{font-size:11px}
}

@media (min-width: 700px) and (max-width: 1280px) {
  html body #app-screen #home-view .location-grid, html body #app-screen .content-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
