@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #203844;
  --ink-deep: #112833;
  --ink-soft: #64747b;
  --mint: #dcefe9;
  --mint-strong: #a6d3c5;
  --lime: #f2d36f;
  --coral: #e98b74;
  --cream: #f4f3ee;
  --paper: #fffdfa;
  --line: #e4e5df;
  --shadow: 0 20px 55px rgba(32, 56, 68, 0.12);
  --shadow-soft: 0 10px 28px rgba(32, 56, 68, 0.09);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Manrope', var(--font-body);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--cream); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { min-height: 100vh; }

.brand-lockup,
.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px 13px 13px 4px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 6px 20px rgba(223, 241, 117, 0.25);
}

.brand-mark-image { display: block; width: 40px; height: 40px; object-fit: contain; }
.brand-lockup > span:last-child { display: inline-flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.brand-word { font: 800 17px var(--font-display); letter-spacing: -0.04em; }
.brand-note { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-soft); }
.access-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.welcome-tools { display: flex; align-items: center; gap: 13px; }
.language-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: rgba(255,255,255,.52); font-size: 10px; font-weight: 800; transition: border 180ms ease, color 180ms ease, background 180ms ease; }
.language-btn:hover { border-color: var(--mint-strong); color: var(--ink); background: var(--paper); }
.language-btn svg { width: 15px; height: 15px; }
.language-btn strong { color: var(--ink); font-size: 10px; }
.access-language { border-color: rgba(255,255,255,.13); color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }
.access-language strong { color: #fff; }
.access-language:hover { border-color: rgba(223,241,117,.5); color: #fff; background: rgba(255,255,255,.1); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--coral);
  content: '';
}

.display-title {
  margin: 0;
  max-width: 620px;
  font: 800 clamp(1.85rem, 3.6vw, 3.25rem)/1.02 var(--font-display);
  letter-spacing: -0.075em;
}

.muted { color: var(--ink-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 45px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--lime); box-shadow: 0 8px 18px rgba(197, 214, 91, 0.24); }
.btn-primary:hover { background: #e9f98b; box-shadow: 0 13px 24px rgba(197, 214, 91, 0.3); }
.btn-dark { color: #fff; background: var(--ink); box-shadow: 0 9px 19px rgba(23, 59, 55, 0.18); }
.btn-dark:hover { background: var(--ink-deep); }
.btn-ghost { border-color: var(--line); background: rgba(255, 255, 255, 0.54); }
.btn-ghost:hover { border-color: var(--mint-strong); background: var(--paper); }
.btn-danger-ghost { border-color: #edc0b4; color: #a45d48; background: #fff4ef; }
.btn-danger-ghost:hover { border-color: #d99482; color: #8f4f3d; background: #ffebe4; }
.btn-block { width: 100%; }

.form-field { display: grid; gap: 8px; }
.form-field label { color: var(--ink); font-size: 12px; font-weight: 800; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper);
  transition: border 180ms ease, box-shadow 180ms ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(169, 223, 181, 0.26); }
.form-field textarea { min-height: 125px; resize: vertical; line-height: 1.55; }
.form-hint { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.rich-text-editor-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); transition: border 180ms ease, box-shadow 180ms ease; }
.rich-text-editor-shell:focus-within { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(169, 223, 181, 0.26); }
.rich-text-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--cream); }
.rich-text-tool-group { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.rich-text-tool-group[hidden] { display: none; }
.rich-text-tool { display: grid; place-items: center; width: 27px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 7px; color: var(--ink); background: transparent; font: 800 11px var(--font-body); cursor: pointer; }
.rich-text-tool:hover { border-color: var(--mint-strong); background: var(--mint); }
.rich-text-tool.is-active { border-color: #d5c855; background: #fff5a8; box-shadow: inset 0 0 0 1px rgba(213,200,85,.22); }
.rich-text-tool.is-highlight span { padding: 0 2px; border-radius: 2px; background: var(--lime); }
.rich-text-tool[data-rich-command="foreColor"] { font-size: 12px; }
.rich-text-tool[data-rich-command="foreColor"]:nth-of-type(3) { color: var(--ink); }
.rich-text-tool[data-rich-value="#173b37"] { color: #173b37; }
.rich-text-tool[data-rich-value="#2c5f7b"] { color: #2c5f7b; }
.rich-text-tool[data-rich-value="#b45f4b"] { color: #b45f4b; }
.rich-text-tool[data-rich-value="#6d5b87"] { color: #6d5b87; }
.rich-text-editor { min-height: 112px; max-height: 220px; overflow: auto; padding: 11px 12px; color: var(--ink); background: var(--paper); font-size: 12px; line-height: 1.6; outline: none; }
.rich-text-editor:empty::before { color: #8a9b94; content: attr(data-placeholder); pointer-events: none; }
.rich-text-editor strong { font-weight: 800; }
.rich-text-editor mark, .notice-rich-body mark { padding: 0 .12em; border-radius: 3px; background: #f6e780; }
.rich-text-editor [data-color], .notice-rich-body [data-color] { color: var(--rich-color, inherit); }
.rich-text-editor [data-color="#173b37"], .notice-rich-body [data-color="#173b37"] { --rich-color: #173b37; }
.rich-text-editor [data-color="#2c5f7b"], .notice-rich-body [data-color="#2c5f7b"] { --rich-color: #2c5f7b; }
.rich-text-editor [data-color="#b45f4b"], .notice-rich-body [data-color="#b45f4b"] { --rich-color: #b45f4b; }
.rich-text-editor [data-color="#6d5b87"], .notice-rich-body [data-color="#6d5b87"] { --rich-color: #6d5b87; }
.rich-text-editor ul, .rich-text-editor ol, .notice-rich-body ul, .notice-rich-body ol { margin: .35em 0; padding-left: 1.35em; }
.rich-text-editor blockquote, .notice-rich-body blockquote { margin: .35em 0 .35em 2.5em; padding: 0 0 0 .85em; border-left: 3px solid var(--mint-strong); color: inherit; }
.rich-text-editor blockquote blockquote, .notice-rich-body blockquote blockquote { margin-left: 1.75em; }
.rich-text-editor div + div, .notice-rich-body div + div { margin-top: .35em; }
.rich-text-value { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* Access */
.access-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

.access-screen::before,
.access-screen::after {
  position: absolute;
  width: 450px;
  height: 450px;
  border: 1px solid rgba(214, 239, 220, 0.12);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.access-screen::before { top: -270px; left: 42%; box-shadow: 0 0 0 55px rgba(214, 239, 220, 0.025), 0 0 0 110px rgba(214, 239, 220, 0.018); }
.access-screen::after { right: -260px; bottom: -270px; border-color: rgba(223, 241, 117, 0.2); }

.access-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 38px clamp(26px, 7vw, 106px) 35px;
  color: #fff;
}

.access-copy::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: url('./assets/sidebar/moshiokuri-password-option-3.png');
  background-position: center;
  background-size: cover;
  content: '';
  opacity: .28;
  pointer-events: none;
  mix-blend-mode: screen;
}

.access-copy > * { position: relative; z-index: 1; }

.access-copy .brand-mark { color: var(--ink); }
.access-copy .brand-note { color: rgba(255,255,255,0.52); }
.access-copy .eyebrow { color: rgba(255,255,255,0.6); }
.access-copy .eyebrow::before { background: var(--lime); }
.access-copy .display-title { max-width: 625px; color: #fff; }
.access-copy .display-title em { color: var(--lime); font-style: normal; }
.access-copy-intro { margin-top: auto; margin-bottom: auto; padding: 64px 0; }
.access-copy-intro > p:not(.eyebrow) { max-width: 470px; margin: 22px 0 0; color: rgba(255,255,255,0.68); font-size: 15px; line-height: 1.7; }
.access-footer { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,0.45); font-size: 11px; }
.access-footer .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); }

.access-panel-wrap { display: grid; place-items: center; padding: 30px; background: #eef1e8; }
.access-panel {
  position: relative;
  width: min(100%, 460px);
  padding: clamp(25px, 4vw, 42px);
  border: 1px solid rgba(23,59,55,0.06);
  border-radius: 28px;
  background: rgba(255,254,250,0.94);
  box-shadow: var(--shadow);
  animation: float-in 600ms cubic-bezier(.2,.8,.2,1) both;
}

.access-panel::before { position: absolute; top: -12px; right: 32px; width: 82px; height: 25px; border-radius: 0 0 10px 10px; background: var(--coral); content: ''; transform: rotate(3deg); }
.access-panel h2 { margin: 0; font: 800 31px/1 var(--font-display); letter-spacing: -0.06em; }
.access-panel > p { margin: 11px 0 27px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.access-form { display: grid; gap: 15px; }
.access-form + .btn-ghost { margin-top: 18px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 45px; }
.password-icon { position: absolute; top: 50%; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; padding: 4px; border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; transform: translateY(-50%); }
.password-icon:hover, .password-icon:focus-visible { color: var(--ink); background: var(--mint); outline: 0; }
.password-icon svg { width: 16px; height: 16px; }
.access-demo { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.access-demo strong { color: var(--ink); }
.access-orb { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; background: var(--mint); color: var(--ink); }

/* Welcome */
.welcome-screen { min-height: 100vh; padding: 28px clamp(20px, 5vw, 78px) 60px; background: var(--cream); }
.welcome-head { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.welcome-head .brand-note { display: none; }
.welcome-progress { color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.welcome-content { max-width: 1200px; margin: 68px auto 0; }
.welcome-content > p:not(.eyebrow) { max-width: 510px; margin: 18px 0 40px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.unit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.unit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-align: left;
  background: rgba(255,254,250,0.75);
  overflow: hidden;
  transition: transform 200ms ease, border 200ms ease, box-shadow 200ms ease;
}
.unit-card::after { position: absolute; right: -24px; bottom: -34px; width: 95px; height: 95px; border-radius: 50%; background: var(--mint); opacity: .54; content: ''; transition: transform 250ms ease; }
.unit-card:hover { border-color: var(--mint-strong); box-shadow: var(--shadow-soft); transform: translateY(-4px); }
.unit-card:hover::after { transform: scale(1.35); }
.unit-card-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
.unit-number { color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.unit-card-arrow { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: var(--ink); color: #fff; }
.unit-card-arrow svg { width: 14px; height: 14px; }
.unit-card h3 { display: -webkit-box; position: relative; z-index: 1; margin: auto 0 6px; overflow: hidden; font: 800 16px/1.12 var(--font-display); letter-spacing: -.045em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.unit-card p { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); font-size: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--ink-soft); background: transparent; font-size: 12px; font-weight: 800; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 15px; height: 15px; }
.selected-context { display: inline-flex; align-items: center; gap: 9px; margin: 20px 0 30px; padding: 10px 12px; border-radius: 11px; color: var(--ink); background: var(--mint); font-size: 12px; font-weight: 800; }
.selected-context svg { width: 16px; height: 16px; flex: 0 0 16px; }
.caregiver-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 870px; }
.caregiver-card { display: flex; align-items: center; gap: 13px; min-height: 85px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-align: left; background: var(--paper); transition: border 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.caregiver-card:hover { border-color: var(--mint-strong); box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.caregiver-card > svg { width: 28px; height: 28px; flex: 0 0 28px; margin-left: auto; }
.caregiver-card h3 { margin: 0 0 4px; font-size: 13px; }
.caregiver-card p { margin: 0; color: var(--ink-soft); font-size: 11px; }

.avatar { display: inline-grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; border-radius: 12px; color: var(--ink); font-size: 11px; font-weight: 800; }
.avatar-image { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.avatar-lg { width: 44px; height: 44px; flex-basis: 44px; border-radius: 15px; font-size: 13px; }
.avatar-xl { width: 52px; height: 52px; flex-basis: 52px; border-radius: 17px; font-size: 15px; }
.avatar-a { background: #f5d7a1; }
.avatar-b { background: #d1e8e0; }
.avatar-c { background: #f6b8a9; }
.avatar-d { background: #cdd6f1; }
.avatar-e { background: #ead8f3; }
.avatar-f { background: #d9eaa4; }
.avatar-g { background: #f0d2cb; }
.avatar-h { background: #bde3ec; }

/* Dashboard shell */
.dashboard-shell { display: block; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 30px 17px 18px; color: #fff; background: var(--ink); isolation: isolate; overflow: hidden; }
.sidebar::before { position: absolute; z-index: 0; inset: 0; display: none; background-image: linear-gradient(180deg, rgba(14,43,40,.2), rgba(14,43,40,.58)), url('./assets/sidebar/moshiokuri-sidebar-option-5-left.png'); background-position: center; background-size: cover; content: ''; opacity: .38; pointer-events: none; }
.sidebar > * { position: relative; z-index: 1; }
.sidebar .brand-note { color: rgba(255,255,255,.46); }
.sidebar-nav { display: grid; gap: 7px; margin-top: 62px; }
.sidebar-label { margin: 0 11px 7px; color: rgba(255,255,255,.39); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-btn { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; border: 0; border-radius: 13px; color: rgba(255,255,255,.58); background: transparent; text-align: left; font-size: 13px; font-weight: 700; transition: color 180ms ease, background 180ms ease, transform 180ms ease; }
.nav-btn svg { width: 18px; height: 18px; }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.nav-btn.active { color: var(--ink); background: var(--lime); box-shadow: 0 9px 19px rgba(0,0,0,.12); }
.sidebar-spacer { flex: 1; }
.sidebar-context { display: grid; grid-template-columns: 35px minmax(0, 1fr) 16px; align-items: center; gap: 9px; padding: 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.05); }
.sidebar-context .avatar { width: 33px; height: 33px; flex-basis: 33px; }
.sidebar-context h4 { margin: 0 0 3px; color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-context p { margin: 0; color: rgba(255,255,255,.42); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-context > svg { color: rgba(255,255,255,.36); }
.sidebar-context > svg { width: 14px; height: 14px; }
.logout-btn { display: flex; align-items: center; gap: 9px; margin: 15px 11px 0; padding: 0; border: 0; color: rgba(255,255,255,.45); background: transparent; font-size: 11px; font-weight: 700; }
.logout-btn:hover { color: #fff; }
.logout-btn svg { width: 15px; height: 15px; }

.main-content { min-width: 0; padding: 28px clamp(20px, 4vw, 62px) 70px; }
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1138px; margin: 0 auto; }
.topbar-leading { display: flex; align-items: center; min-width: 0; }
.topbar-company-name { position: absolute; top: 50%; left: 50%; color: #a91252; font: 800 clamp(1rem, 1.8vw, 1.35rem)/1 var(--font-display); letter-spacing: .04em; white-space: nowrap; transform: translate(-50%, -50%); pointer-events: none; }
.topbar-meta { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.topbar-meta .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #63c279; box-shadow: 0 0 0 5px rgba(99,194,121,.13); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.context-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); font-size: 11px; font-weight: 800; }
.context-btn:hover { border-color: var(--mint-strong); }
.context-btn .avatar { width: 25px; height: 25px; flex-basis: 25px; border-radius: 8px; font-size: 9px; }
.context-btn svg { width: 14px; height: 14px; color: var(--ink-soft); }
.topbar-unit-context { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; max-width: min(280px, 42vw); padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); font-size: 11px; font-weight: 800; }
.topbar-unit-context svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--ink-soft); }
.topbar-unit-context span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-unit-context { cursor: pointer; text-align: left; }
.topbar-unit-context:hover { border-color: var(--mint-strong); background: #fbfff8; }
.topbar-unit-context svg:last-child { width: 13px; height: 13px; flex: 0 0 13px; margin-left: 2px; color: var(--ink-soft); }
.topbar-setup { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); font-size: 11px; font-weight: 800; cursor: pointer; }
.topbar-setup:hover { border-color: var(--mint-strong); color: var(--ink); }
.topbar-setup svg { width: 15px; height: 15px; color: var(--ink-soft); }
.topbar-logout { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: var(--paper); cursor: pointer; }
.topbar-logout:hover { color: var(--ink); border-color: var(--mint-strong); }
.topbar-logout svg { width: 14px; height: 14px; }
.mobile-menu { display: none; }
.page-content { max-width: 1138px; margin: 68px auto 0; }

@media (min-width: 701px) {
  .sidebar::before { display: block; }
}
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.hero-row .display-title { max-width: 760px; font-size: clamp(1.55rem, 2.35vw, 2.25rem); line-height: 1.12; }
.hero-row p { max-width: 660px; margin: 9px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.hero-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0 28px; }
.stat-card { position: relative; min-height: 72px; padding: 12px 14px; border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: 0 7px 24px rgba(23,59,55,.045); }
.stat-card-action { width: 100%; border: 0; color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease, outline-color 180ms ease; }
.stat-card-action:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(23,59,55,.1); }
.stat-card-action:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.stat-card-action.active { outline: 2px solid var(--lime); outline-offset: 2px; }
.stat-pending { border: 1px solid #f1c1b2; background: #fff0ea; }
.stat-pending .stat-label { color: #a45d48; }
.stat-pending .stat-label svg { color: #bc6b55; }
.stat-pending .stat-sub { color: #a45d48; }
.stat-read { border: 1px solid #c9e3cd; background: var(--mint); }
.stat-global { border: 1px solid #d4e2f0; color: #214a61; background: #eaf2fa; }
.stat-global .stat-label { color: #577487; }
.stat-global .stat-sub { color: #577487; }
.stat-pending::after { border-color: rgba(188,107,85,.17); }
.stat-global::after { border-color: rgba(62,111,143,.16); }
.stat-card::after { display: none; }
.stat-label { position: relative; z-index: 1; display: flex; align-items: center; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.stat-label > span:first-child { position: relative; z-index: 1; }
.stat-card-icon { position: absolute; top: 50%; right: 5px; z-index: 0; display: grid; place-items: center; width: 48px; height: 48px; color: currentColor; opacity: .14; transform: translateY(-50%); pointer-events: none; }
.stat-card-icon svg { width: 48px; height: 48px; }
.stat-value { position: relative; z-index: 1; margin-top: 5px; font: 800 25px/1 var(--font-display); letter-spacing: -.06em; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font: 800 20px var(--font-display); letter-spacing: -.055em; }
.section-title-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; width: 100%; }
.section-title-actions h2 { min-width: 0; white-space: nowrap; }
.home-section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.sync-now-btn { min-height: 34px; padding: 0 11px; border-radius: 10px; font-size: 10px; white-space: nowrap; }
.sync-now-btn svg { width: 14px; height: 14px; }
.sync-now-btn.is-loading svg { animation: spin 900ms linear infinite; }
.latest-create-row { display: flex; justify-content: flex-start; margin: -4px 0 14px; }
.create-notice-btn { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 10px; }
.create-notice-btn svg { width: 14px; height: 14px; }
.filter-row { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.5); }
.filter-btn { min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 10px; font-weight: 800; }
.filter-btn.active { color: var(--ink); background: var(--paper); box-shadow: 0 2px 8px rgba(23,59,55,.08); }
.notice-list { display: grid; gap: 12px; }
.notice-card { position: relative; display: block; width: 100%; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); transition: border 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.notice-card:hover { border-color: #dbe8d9; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.notice-card[data-action="open-notice"] { cursor: pointer; }
.notice-card[data-action="open-notice"]:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.notice-card.notice-focus-target { outline: 3px solid var(--mint-strong); outline-offset: 4px; }
.notice-card.latest-notice { border-color: var(--mint-strong); box-shadow: 0 10px 30px rgba(91,164,108,.12); }
.notice-main { min-width: 0; }
.notice-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.notice-card-header .notice-meta { min-width: 0; flex: 1 1 auto; }
.notice-card-header .notice-owner-actions { flex: 0 0 auto; margin-left: auto; }
.notice-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.notice-meta .translation-btn, .notice-meta .translation-loading { margin-top: 0; }
.notice-type { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; color: var(--ink); background: var(--mint); font-size: 9px; font-weight: 800; }
.notice-type svg { width: 12px; height: 12px; }
.notice-type.global { background: #f4d9cf; }
.latest-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 7px; color: #477254; background: #edf7e9; font-size: 9px; font-weight: 800; }
.latest-badge svg { width: 11px; height: 11px; }
.notice-card h3 { margin: 11px 0 6px; font: 800 15px/1.25 var(--font-display); letter-spacing: -.03em; }
.notice-card .notice-title-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.notice-card .notice-title-row h3 { margin: 0; color: var(--ink); font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.notice-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.notice-title-row h3 { min-width: 0; }
.translation-btn, .translation-loading { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 0 0 auto; min-height: 27px; margin-top: 9px; padding: 0 8px; border: 1px solid #c7ddd0; border-radius: 8px; color: var(--ink); background: #f7fbf5; font-size: 9px; font-weight: 800; white-space: nowrap; }
.translation-btn:hover { border-color: var(--mint-strong); background: var(--mint); }
.translation-btn svg, .translation-loading svg { width: 12px; height: 12px; }
.translation-loading { color: var(--ink-soft); background: var(--cream); }
.translation-source { display: block; margin: 0 0 6px; color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.notice-card p { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.58; }
.notice-card-body { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.58; }
.notice-card .notice-card-body { width: 100%; max-width: 100%; margin-top: 8px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.notice-attachments { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 100%; min-width: 0; margin-top: 15px; }
.attachment-image-link { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 8px; width: min(100%, 260px); min-width: 0; max-width: 100%; padding: 5px 8px 5px 5px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; background: var(--cream); font: 800 10px/1.2 var(--font-body); text-align: left; cursor: pointer; appearance: none; }
.attachment-image-link:hover, .attachment-file:hover { border-color: var(--mint-strong); background: #fbfff8; }
.attachment-image-link img { width: 48px; height: 38px; object-fit: cover; border-radius: 7px; }
.attachment-image-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file { display: inline-flex; align-items: center; gap: 8px; width: min(100%, 280px); min-width: 0; max-width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; background: var(--cream); font: inherit; text-align: left; cursor: pointer; appearance: none; }
.attachment-file-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 8px; color: var(--ink); background: var(--mint); }
.attachment-file-icon svg { width: 14px; height: 14px; }
.attachment-file > span:nth-child(2) { display: grid; min-width: 0; }
.attachment-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.attachment-file small { margin-top: 2px; color: var(--ink-soft); font-size: 9px; }
.attachment-file > svg { width: 14px; height: 14px; margin-left: auto; color: var(--ink-soft); }
.attachment-preview-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(14,43,40,.58); backdrop-filter: blur(8px); animation: fade-in 180ms ease both; }
.attachment-preview { display: flex; flex-direction: column; width: min(100%, 920px); max-height: calc(100dvh - 36px); padding: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; background: var(--paper); box-shadow: 0 28px 80px rgba(14,43,40,.28); animation: modal-in 220ms ease both; }
.attachment-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.attachment-preview-head .eyebrow { margin: 0 0 5px; }
.attachment-preview-head h2 { max-width: 700px; margin: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font: 800 18px/1.15 var(--font-display); letter-spacing: -.03em; }
.attachment-preview-head p:last-child { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.attachment-preview-stage { display: grid; place-items: center; min-height: 120px; max-height: calc(100dvh - 170px); overflow: auto; margin-top: 12px; padding: 12px; border-radius: 13px; background: #eef3ed; }
.attachment-preview-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 240px); object-fit: contain; border-radius: 10px; }
.attachment-preview-frame { width: 100%; min-height: min(64vh, 620px); border: 0; border-radius: 9px; background: #fff; }
.attachment-preview-video { display: block; max-width: 100%; max-height: calc(100dvh - 240px); border-radius: 10px; background: #0e2b28; }
.attachment-preview-audio { width: min(100%, 560px); }
.attachment-preview-unavailable { display: grid; justify-items: center; gap: 10px; max-width: 420px; padding: 30px 20px; color: var(--ink-soft); text-align: center; font-size: 12px; }
.attachment-preview-unavailable svg { width: 32px; height: 32px; color: var(--ink); }
.attachment-preview-unavailable p { margin: 0; }
.attachment-preview-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 12px; }
.notice-footer { display: flex; align-items: center; width: 100%; min-width: 0; margin-top: 19px; }
.creator { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 10px; font-weight: 800; }
.creator .avatar { width: 24px; height: 24px; flex-basis: 24px; border-radius: 8px; font-size: 8px; }
.read-summary { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 10px; }
.avatar-stack { display: inline-flex; padding-left: 5px; }
.avatar-stack .avatar { width: 23px; height: 23px; flex-basis: 23px; margin-left: -5px; border: 2px solid var(--paper); border-radius: 8px; font-size: 7px; }
.avatar-stack .avatar.pending { opacity: .38; filter: grayscale(.25); }
.notice-people-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; width: 100%; }
.notice-people-strip { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; flex: 1 1 240px; overflow-x: auto; padding: 2px 1px 4px; scrollbar-width: thin; scrollbar-color: #bfd4c8 transparent; }
.notice-people-strip::-webkit-scrollbar { height: 4px; }
.notice-people-strip::-webkit-scrollbar-thumb { border-radius: 4px; background: #bfd4c8; }
.notice-person-mini { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 112px; min-height: 30px; flex: 0 0 auto; padding: 2px 6px 2px 3px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: transparent; font: 800 9px/1 var(--font-body); text-align: left; white-space: nowrap; }
button.notice-person-mini { cursor: pointer; appearance: none; transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease, transform 160ms ease; }
button.notice-person-mini:hover, button.notice-person-mini:focus-visible { border-color: var(--mint-strong); background: #fbfff8; outline: none; transform: translateY(-1px); }
.notice-person-mini.is-read { border-color: #a8d6b7; color: #477254; background: #eff9ef; }
.notice-person-mini.is-pending { border-color: #b8c2bb; border-style: dashed; color: #7f8d88; background: transparent; }
.notice-person-mini.is-unavailable { border-color: #d3d9d5; border-style: dashed; color: #9aa39f; background: transparent; opacity: .76; }
.notice-mini-avatar { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; font-size: 7px; }
.notice-mini-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-mini-state { display: grid; place-items: center; width: 13px; height: 13px; flex: 0 0 13px; margin-left: 1px; }
.notice-mini-state svg { width: 12px; height: 12px; }
.notice-people-count { flex: 0 0 auto; color: var(--ink-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.notice-owner-actions { display: inline-flex; align-items: center; gap: 5px; }
.notice-owner-actions .icon-action { width: 28px; height: 28px; flex-basis: 28px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 7px; color: #477254; background: #edf7e9; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-pill.pending { color: #a05e47; background: #fff0e9; }
.status-pill svg { width: 12px; height: 12px; }
.read-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 10px; color: var(--ink); background: transparent; font-size: 10px; font-weight: 800; white-space: nowrap; transition: background 180ms ease, color 180ms ease; }
.read-btn:hover { color: #fff; background: var(--ink); }
.read-btn svg { width: 14px; height: 14px; }
.empty-state { padding: 42px 20px; border: 1px dashed #cfdcd3; border-radius: 18px; color: var(--ink-soft); text-align: center; background: rgba(255,255,255,.32); }
.empty-state svg { width: 32px; height: 32px; margin-bottom: 12px; color: var(--mint-strong); }
.empty-state h3 { margin: 0 0 7px; color: var(--ink); font: 800 17px var(--font-display); }
.empty-state p { margin: 0; font-size: 12px; }

/* Notice details / read status */
.notice-detail-modal { width: min(100%, 760px); max-height: min(820px, calc(100vh - 28px)); }
.notice-detail-modal .modal-head { margin-bottom: 15px; }
.notice-detail-modal .modal-head .eyebrow { margin: 0 0 5px; }
.notice-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.notice-detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 12px; }
.notice-detail-title-row h3 { min-width: 0; margin: 0; font: 800 25px/1.16 var(--font-display); letter-spacing: -.045em; }
.notice-detail-body { max-width: none !important; margin-top: 11px !important; color: var(--ink-soft); font-size: 15px !important; line-height: 1.75 !important; white-space: normal; }
.notice-detail-modal .notice-attachments { margin-top: 18px; }
.notice-detail-modal .attachment-image-link { grid-template-columns: 118px minmax(0, 1fr); min-width: 230px; max-width: 360px; padding: 7px 10px 7px 7px; }
.notice-detail-modal .attachment-image-link img { width: 118px; height: 84px; border-radius: 9px; }
.notice-detail-modal .attachment-file { min-width: 230px; max-width: 360px; padding: 11px 12px; }
.notice-readers { margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--line); }
.reader-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.reader-heading .eyebrow { margin: 0 0 3px; }
.reader-heading h3 { margin: 0; font: 800 17px/1.1 var(--font-display); letter-spacing: -.035em; }
.reader-total { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 8px; color: var(--ink); background: var(--mint); font-size: 10px; font-weight: 800; }
.reader-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.reader-legend-item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 8px; font-size: 9px; font-weight: 800; }
.reader-legend-item svg { width: 12px; height: 12px; }
.reader-legend-item.is-read { color: #477254; background: #f1faf0; }
.reader-legend-item.is-unread { color: #a05e47; background: #fff8f4; }
.reader-legend-item.is-unavailable { color: #8f9995; background: #f1f3f0; }
.reader-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.reader-card { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid #c9e3cd; border-radius: 10px; color: var(--ink); background: #f5fbf3; }
.reader-card.is-unread { border-color: #cfd8d1; border-style: dashed; opacity: .62; background: transparent; }
.reader-card.is-unavailable { border-color: #d3d9d5; border-style: dashed; color: #9aa39f; background: transparent; opacity: .76; }
.reader-card.is-actionable { width: 100%; font: inherit; text-align: left; cursor: pointer; transition: border-color 180ms ease, background 180ms ease, opacity 180ms ease, transform 180ms ease; }
.reader-card.is-actionable:hover, .reader-card.is-actionable:focus-visible { border-color: var(--mint-strong); background: #fbfff8; opacity: 1; transform: translateY(-1px); outline: none; }
.reader-card .avatar { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; font-size: 8px; }
.reader-card > span:nth-child(2) { display: block; min-width: 0; overflow: hidden; }
.reader-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 10px; }
.reader-status-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; margin-left: auto; border-radius: 50%; color: #4d9b60; background: #ddf1df; }
.reader-status-icon svg { width: 12px; height: 12px; }
.reader-card.is-unread .reader-status-icon { color: var(--ink-soft); background: transparent; }
.reader-card.is-unavailable .reader-status-icon { color: #9aa39f; background: transparent; }
.reader-empty { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.4; }
.reader-confirm-modal { width: min(100%, 500px); }
.reader-confirm-notice { display: grid; gap: 4px; margin: 0 0 16px; padding: 11px 12px; border: 1px solid #d5e8dc; border-radius: 11px; background: #f3faf4; }
.reader-confirm-notice strong { color: var(--ink); font-size: 12px; }
.reader-confirm-notice span { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.reader-confirm-modal .modal-note { margin: 12px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.reader-confirm-modal .form-error { margin: -5px 0 0; color: #a34f3e; font-size: 10px; font-weight: 800; }
.notice-detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--line); }
.notice-detail-footer .creator > span { display: inline-flex; align-items: center; gap: 7px; }
.notice-detail-footer .creator strong { font-size: 10px; }
.notice-detail-actions { display: flex; align-items: center; gap: 9px; }

/* Team view */
.team-hero { display: grid; gap: 25px; margin-bottom: 30px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.team-hero p { max-width: 620px; margin: 13px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.team-back-link { margin-top: 10px; gap: 10px; padding: 4px 0; font-size: 16px; }
.team-back-link svg { width: 20px; height: 20px; }
.team-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.team-hero-actions .btn { min-width: 218px; min-height: 48px; }
.advanced-settings-actions { display: flex; justify-content: flex-start; gap: 9px; margin-top: 4px; }
.advanced-settings-actions .btn { min-height: 42px; }
.admin-badge { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid rgba(169,223,181,.7); border-radius: 10px; color: var(--ink); background: var(--mint); font-size: 10px; font-weight: 800; white-space: nowrap; }
.admin-badge svg { width: 14px; height: 14px; }
.team-layout { display: grid; grid-template-columns: minmax(240px, 285px) minmax(0,1fr); gap: 18px; align-items: start; }
.team-units, .team-roster { padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-heading h3, .team-roster h3 { margin: 0; font: 800 14px var(--font-display); letter-spacing: -.03em; }
.team-unit-list { display: grid; gap: 4px; }
.team-unit-item { display: flex; align-items: center; gap: 4px; }
.team-unit-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; flex: 1; padding: 0 11px; border: 0; border-radius: 10px; color: var(--ink-soft); background: transparent; text-align: left; font-size: 11px; font-weight: 700; }
.team-unit-btn span:last-child { display: grid; place-items: center; min-width: 24px; height: 22px; border-radius: 7px; color: var(--ink-soft); background: var(--cream); font-size: 10px; }
.team-unit-btn:hover { color: var(--ink); background: var(--cream); }
.team-unit-btn.active { color: var(--ink); background: var(--mint); }
.team-unit-btn.active span:last-child { color: var(--ink); background: rgba(255,255,255,.55); }
.roster-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.roster-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }
.roster-actions { display: flex; align-items: center; gap: 8px; }
.roster-create-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--cream); font-size: 10px; font-weight: 800; white-space: nowrap; transition: color 180ms ease, background 180ms ease, border 180ms ease, transform 180ms ease; }
.roster-create-btn:hover { border-color: var(--mint-strong); background: var(--mint); transform: translateY(-1px); }
.roster-create-btn svg { width: 14px; height: 14px; }
.roster-count { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px; color: var(--ink); background: var(--mint); font-size: 10px; font-weight: 800; }
.roster-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding-top: 15px; }
.roster-row { display: flex; align-items: center; width: 100%; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); font: inherit; text-align: left; }
.roster-card.is-editable { cursor: pointer; transition: border 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease; }
.roster-card.is-editable:hover { border-color: var(--mint-strong); box-shadow: var(--shadow-soft); background: #fcfffb; transform: translateY(-2px); }
.roster-card.is-editable:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.roster-card-edit, .roster-edit-hint { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.roster-card-edit { margin-left: auto; padding: 6px 7px; border-radius: 7px; background: var(--cream); }
.roster-card.is-editable:hover .roster-card-edit { color: var(--ink); background: var(--mint); }
.roster-card-edit svg, .roster-edit-hint svg { width: 13px; height: 13px; }
.roster-edit-hint { padding: 6px 8px; border-radius: 8px; background: var(--cream); }
.roster-row h4 { margin: 0 0 4px; font-size: 11px; }
.roster-row p { margin: 0; color: var(--ink-soft); font-size: 10px; }
.roster-row.is-inactive { opacity: .62; }
.roster-row > span:nth-child(2) { min-width: 0; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; padding: 5px 7px; border-radius: 7px; color: #4d8757; background: #edf7e9; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-badge.inactive { color: #9d6757; background: #fff0e9; }
.edit-member-btn { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border: 0; border-radius: 8px; color: var(--ink-soft); background: var(--cream); }
.edit-member-btn:hover { color: var(--ink); background: var(--mint); }
.edit-member-btn svg { width: 14px; height: 14px; }
.icon-action { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: var(--cream); transition: color 180ms ease, background 180ms ease, border 180ms ease, transform 180ms ease; }
.icon-action:hover { color: var(--ink); border-color: var(--mint-strong); background: var(--mint); transform: translateY(-1px); }
.icon-action.danger { color: #a56858; }
.icon-action.danger:hover { color: #8a4638; border-color: #f2b5a3; background: #fff0e9; }
.icon-action svg { width: 15px; height: 15px; }
.member-identity { display: flex; align-items: center; gap: 12px; margin: -4px 0 20px; padding: 12px; border-radius: 13px; background: var(--cream); }
.member-identity strong, .member-identity span { display: block; }
.member-identity strong { font-size: 13px; }
.member-identity span { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.employee-edit-modal { width: min(100%, 520px); max-height: min(760px, calc(100dvh - 24px)); padding: 16px; }
.employee-edit-modal .modal-head { margin-bottom: 11px; }
.employee-edit-modal .modal-head h2 { font-size: 19px; }
.employee-edit-modal .modal-head p { margin-top: 4px; font-size: 10px; }
.compact-member-identity { align-items: center; margin: 0 0 10px; padding: 9px 10px; }
.compact-member-identity strong { font-size: 12px; }
.compact-member-identity span { margin-top: 3px; font-size: 9px; }
.employee-edit-form { gap: 9px; }
.employee-form-section { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); }
.employee-section-label { margin: 0; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.compact-field { gap: 4px; }
.compact-field input, .compact-field select { padding: 9px 10px; border-radius: 9px; background: var(--paper); }
.employee-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.employee-avatar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-avatar-row .file-picker-wrap { min-width: 0; }
.employee-avatar-row .form-hint { margin: 0; font-size: 9px; }
.employee-avatar-row .checkbox-line { flex: 0 0 auto; margin: 0; font-size: 9px; }
.employee-edit-modal .file-list { min-height: 0; }
.member-access-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -7px 0 15px; padding: 9px 10px; border-radius: 11px; color: var(--ink-soft); background: var(--mint); font-size: 10px; }
.member-access-action p { margin: 0; }
.member-access-action .btn { min-height: 32px; padding: 0 9px; font-size: 10px; }
.compact-access-action { margin: 0 0 9px; padding: 8px 9px; font-size: 9px; }
.compact-access-action > div { display: grid; gap: 2px; min-width: 0; }
.compact-access-action strong { color: var(--ink); font-size: 10px; }
.compact-access-action span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-access-action .btn { min-height: 30px; padding: 0 8px; font-size: 9px; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.employee-created-state { display: grid; justify-items: center; gap: 13px; padding: 10px 0 3px; text-align: center; }
.employee-created-state p { max-width: 300px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.employee-created-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--ink); background: var(--mint); }
.employee-created-icon svg { width: 22px; height: 22px; }
.profile-identity { margin-bottom: 15px; }
.profile-modal { width: min(100%, 520px); }
.profile-form { gap: 14px; }
.profile-avatar-editor { display: grid; justify-items: center; gap: 8px; padding: 10px 0 2px; }
.profile-avatar-trigger { position: relative; display: inline-grid; place-items: center; min-width: 104px; min-height: 104px; border-radius: 50%; cursor: pointer; }
.profile-avatar-trigger:hover .profile-avatar-action, .profile-avatar-trigger:focus-within .profile-avatar-action { color: var(--ink); background: var(--lime); }
.profile-avatar-trigger > span:first-child { display: block; }
.profile-avatar-action { position: absolute; right: -8px; bottom: 1px; display: inline-flex; align-items: center; gap: 4px; min-height: 25px; padding: 0 7px; border: 2px solid var(--paper); border-radius: 999px; color: var(--ink-soft); background: var(--mint); font-size: 9px; font-weight: 800; transition: color 180ms ease, background 180ms ease; }
.profile-avatar-action svg { width: 12px; height: 12px; }
.profile-avatar-editor .form-hint { margin: 0; text-align: center; }
.profile-avatar-editor .file-list { justify-content: center; min-height: 0; }
.profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-detail { padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.profile-detail span { display: block; margin: 0; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.profile-detail strong { display: block; margin-top: 4px; color: var(--ink); font-size: 12px; }
.profile-language-field label { display: block; margin: 0; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.profile-language-field select { width: 100%; margin-top: 4px; padding: 5px 7px; border: 0; color: var(--ink); background: transparent; font: inherit; font-size: 12px; }
.profile-read-only { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 11px; border-radius: 10px; color: var(--ink-soft); background: var(--cream); font-size: 10px; line-height: 1.4; }
.profile-read-only svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 1px; color: var(--ink); }
.online-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #66bd75; box-shadow: 0 0 0 4px rgba(102,189,117,.12); }

/* Modal / toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(14,43,40,.48); backdrop-filter: blur(7px); animation: fade-in 180ms ease both; }
.modal { width: min(100%, 470px); max-height: min(720px, calc(100vh - 40px)); overflow: auto; padding: 20px; border-radius: 20px; background: var(--paper); box-shadow: 0 28px 80px rgba(14,43,40,.28); animation: modal-in 240ms cubic-bezier(.2,.8,.2,1) both; }
.modal:has(form#notice-form) { width: min(100%, 560px); max-height: min(760px, calc(100dvh - 24px)); padding: 16px; }
.modal:has(form#notice-form) .modal-head { margin-bottom: 11px; }
.modal:has(form#notice-form) .modal-head h2 { font-size: 19px; }
.modal:has(form#notice-form) .modal-head p { margin-top: 4px; font-size: 10px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.modal-head h2 { margin: 0; font: 800 21px/1.1 var(--font-display); letter-spacing: -.05em; }
.modal-head p { margin: 6px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.modal-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 9px; color: var(--ink-soft); background: var(--cream); }
.modal-close:hover { color: var(--ink); background: var(--mint); }
.modal-close svg { width: 16px; height: 16px; }
.notice-form { display: grid; gap: 16px; }
.modal:has(form#notice-form) .notice-form { gap: 10px; }
.modal:has(form#notice-form) .form-field { gap: 5px; }
.modal:has(form#notice-form) .form-field label { font-size: 11px; }
.modal:has(form#notice-form) .form-field input,
.modal:has(form#notice-form) .form-field textarea,
.modal:has(form#notice-form) .form-field select { padding: 10px 12px; border-radius: 11px; }
.modal:has(form#notice-form) .form-field textarea { min-height: 86px; }
.modal:has(form#notice-form) .rich-text-editor { min-height: 180px; max-height: 320px; padding: 12px 14px; font-size: 16px; line-height: 1.65; }
.modal:has(form#notice-form) .rich-text-toolbar { gap: 3px; padding: 5px; }
.modal:has(form#notice-form) .rich-text-tool { width: 25px; height: 24px; }
.file-picker-wrap { display: grid; gap: 8px; }
.file-native { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.file-picker { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: max-content; min-height: 39px; padding: 0 12px; border: 1px dashed #b9cec0; border-radius: 11px; color: var(--ink); background: var(--cream); font-size: 11px; font-weight: 800; cursor: pointer; transition: border 180ms ease, background 180ms ease, transform 180ms ease; }
.file-picker:hover { border-color: var(--mint-strong); background: var(--mint); transform: translateY(-1px); }
.file-picker svg { width: 15px; height: 15px; }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.existing-file-list { margin-top: 8px; }
.attachment-clear { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.attachment-clear input { width: 14px; height: 14px; accent-color: var(--ink); }
.attachment-edit-list { display: grid; gap: 5px; margin-top: 8px; }
.attachment-edit-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); transition: color 180ms ease, background 180ms ease, border 180ms ease, opacity 180ms ease; }
.attachment-edit-item.is-removal-pending { border-color: #edc0b4; color: #8f4f3d; background: #fff4ef; opacity: .78; }
.attachment-edit-meta { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink-soft); }
.attachment-edit-meta > svg { width: 15px; height: 15px; flex: 0 0 15px; }
.attachment-edit-meta > span { display: grid; min-width: 0; gap: 2px; }
.attachment-edit-meta strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.attachment-edit-item.is-removal-pending .attachment-edit-meta strong { color: #8f4f3d; text-decoration: line-through; }
.attachment-edit-meta small { color: var(--ink-soft); font-size: 9px; }
.attachment-remove-action.is-removal-pending { border-color: #d99482; color: #8f4f3d; background: #ffebe4; }
.attachment-remove-action.is-removal-pending:hover { border-color: #c77b68; color: #7d3f31; background: #ffe1d8; }
.attachment-edit-hint { margin: 0; }
.file-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 6px 8px; border-radius: 8px; color: var(--ink); background: var(--mint); font-size: 10px; font-weight: 800; }
.file-chip small { color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.modal:has(form#notice-form) .file-picker-wrap { gap: 5px; }
.modal:has(form#notice-form) .file-picker { min-height: 34px; padding: 0 10px; font-size: 10px; }
.modal:has(form#notice-form) .form-hint { font-size: 10px; }
.unit-selection-panel { display: grid; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--cream); }
.unit-selection-panel[hidden] { display: none; }
.unit-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-height: 142px; overflow: auto; }
.unit-check-option { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.62); font-size: 10px; font-weight: 700; cursor: pointer; }
.unit-check-option:hover { border-color: var(--mint-strong); background: #fbfff8; }
.unit-check-option input { width: 14px; height: 14px; flex: 0 0 14px; accent-color: var(--ink); }
.unit-check-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audience-note { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 11px; color: var(--ink-soft); background: var(--cream); font-size: 11px; line-height: 1.45; }
.audience-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; color: var(--ink); }
.modal:has(form#notice-form) .audience-note { gap: 8px; padding: 8px 10px; font-size: 10px; line-height: 1.35; }
.modal:has(form#notice-form) .audience-note svg { width: 14px; height: 14px; flex-basis: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.modal:has(form#notice-form) .modal-actions { position: sticky; bottom: -16px; z-index: 2; margin-top: 0; padding: 9px 0 2px; background: var(--paper); }
.compose-modal { width: min(100%, 620px); }
.modal.compose-modal:has(form#notice-form) {
  width: min(1200px, calc(100vw - 40px));
  height: min(960px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 28px 30px;
}
.modal.compose-modal:has(form#notice-form) .modal-head { margin-bottom: 20px; }
.modal.compose-modal:has(form#notice-form) .modal-head h2 { font-size: 28px; }
.modal.compose-modal:has(form#notice-form) .modal-head p { margin-top: 7px; font-size: 14px; }
.modal.compose-modal:has(form#notice-form) .notice-form { gap: 18px; }
.modal.compose-modal:has(form#notice-form) .form-field { gap: 8px; }
.modal.compose-modal:has(form#notice-form) .form-field label { font-size: 14px; }
.modal.compose-modal:has(form#notice-form) .form-field input,
.modal.compose-modal:has(form#notice-form) .form-field textarea,
.modal.compose-modal:has(form#notice-form) .form-field select { padding: 13px 15px; border-radius: 13px; font-size: 16px; }
.modal.compose-modal:has(form#notice-form) .rich-text-editor {
  min-height: 260px;
  max-height: 420px;
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.65;
}
.modal.compose-modal:has(form#notice-form) .rich-text-toolbar { gap: 5px; padding: 8px; }
.modal.compose-modal:has(form#notice-form) .rich-text-tool { width: 32px; height: 30px; font-size: 13px; }
.modal.compose-modal:has(form#notice-form) .form-hint { font-size: 12px; }
.modal.compose-modal:has(form#notice-form) .file-picker { min-height: 40px; padding: 0 13px; font-size: 12px; }
.modal.compose-modal:has(form#notice-form) .modal-actions { position: relative; bottom: auto; flex: 0 0 auto; padding: 14px 0 4px; }
.modal.compose-modal:has(form#notice-form) .btn { min-height: 44px; padding-inline: 17px; font-size: 13px; }
.compose-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0 0 11px; padding: 0; list-style: none; }
.modal.compose-modal:has(form#notice-form) .compose-steps { gap: 8px; margin-bottom: 15px; }
.modal.compose-modal:has(form#notice-form) .compose-steps li { grid-template-columns: 26px minmax(0, 1fr); gap: 7px; padding: 9px 10px; border-radius: 11px; }
.modal.compose-modal:has(form#notice-form) .compose-steps li span { width: 26px; height: 26px; font-size: 11px; }
.modal.compose-modal:has(form#notice-form) .compose-steps li strong { font-size: 12px; }
.compose-steps li { display: grid; grid-template-columns: 21px minmax(0, 1fr); align-items: center; gap: 5px; min-width: 0; padding: 6px 5px; border-radius: 9px; color: var(--ink-soft); background: var(--cream); }
.compose-steps li span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: var(--ink-soft); background: rgba(255,255,255,.7); font-size: 9px; font-weight: 900; }
.compose-steps li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.compose-steps li.is-current { color: var(--ink); background: var(--mint); }
.compose-steps li.is-current span, .compose-steps li.is-complete span { color: var(--ink); background: var(--lime); }
.compose-step-content { display: grid; gap: 11px; min-height: 250px; }
.modal.compose-modal:has(form#notice-form) .compose-step-content { gap: 15px; min-height: 300px; }
.modal.compose-modal:has(form#notice-form) #notice-form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.modal.compose-modal:has(form#notice-form) .compose-step-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
.modal.compose-modal:has(form#notice-form) .compose-step-lead { color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.5; }
/* Keep the writing step compact so the complete form fits in the viewport. */
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .compose-step-content { gap: 9px; overflow: visible; }
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .form-field { gap: 5px; }
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .rich-text-editor {
  min-height: 115px;
  max-height: 150px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
}
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .rich-text-toolbar { padding: 5px; }
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .rich-text-tool { width: 28px; height: 27px; }
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .form-hint { font-size: 10px; }
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .file-picker { min-height: 34px; padding-inline: 11px; font-size: 11px; }
.modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .modal-actions { padding-top: 8px; }
.compose-step-lead { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.compose-person-grid, .compose-unit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 350px; overflow: auto; padding: 1px; }
.modal.compose-modal:has(form#notice-form) .compose-person-grid,
.modal.compose-modal:has(form#notice-form) .compose-unit-grid {
  align-content: start;
  grid-auto-rows: max-content;
  gap: 7px;
  max-height: 320px;
}
.compose-person-option, .compose-unit-option { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.66); text-align: left; cursor: pointer; }
.modal.compose-modal:has(form#notice-form) .compose-person-option { gap: 8px; min-height: 58px; padding: 7px 9px; border-radius: 11px; }
.modal.compose-modal:has(form#notice-form) .compose-person-option .avatar-lg { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; font-size: 11px; }
.compose-person-option:hover, .compose-unit-option:hover { border-color: var(--mint-strong); background: #fbfff8; }
.compose-person-option.is-selected, .compose-unit-option.is-selected { border-color: var(--mint-strong); background: var(--mint); box-shadow: 0 0 0 2px rgba(169,223,181,.18); }
.compose-person-option > span:not(.avatar), .compose-unit-option > span:not(.unit-card-icon) { display: grid; min-width: 0; gap: 2px; }
.compose-person-option strong, .compose-unit-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.modal.compose-modal:has(form#notice-form) .compose-person-option strong, .modal.compose-modal:has(form#notice-form) .compose-unit-option strong { font-size: 13px; }
.compose-person-option small, .compose-unit-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 9px; }
.modal.compose-modal:has(form#notice-form) .compose-person-option small, .modal.compose-modal:has(form#notice-form) .compose-unit-option small { font-size: 10px; }
.compose-person-option > svg, .compose-unit-option > svg { width: 15px; height: 15px; flex: 0 0 15px; margin-left: auto; color: #4f9b66; }
.compose-unit-option .unit-card-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; color: var(--ink); background: var(--cream); }
.modal.compose-modal:has(form#notice-form) .compose-unit-option { gap: 8px; min-height: 58px; padding: 8px 10px; border-radius: 11px; }
.modal.compose-modal:has(form#notice-form) .compose-unit-option .unit-card-icon { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; }
.compose-unit-option .unit-card-icon svg { width: 15px; height: 15px; }
.compose-selection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 11px; font-weight: 800; }
.btn-compact { min-height: 29px; padding: 0 9px; font-size: 9px; }
.compose-selected-count { margin: 0; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.compose-review { display: grid; gap: 10px; }
.compose-review-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.compose-review-row > span { color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.compose-review-person, .compose-review-units { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.compose-review-person strong { font-size: 11px; }
.compose-review-units .notice-type { max-width: 100%; font-size: 9px; }
.compose-review-card { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--mint-strong); border-radius: 12px; background: rgba(255,255,255,.72); }
.compose-review-card .eyebrow { margin: 0; font-size: 9px; }
.compose-review-card h3 { margin: 0; font: 800 18px/1.08 var(--font-display); letter-spacing: -.04em; }
.modal.compose-modal:has(form#notice-form) .compose-review-card h3 { font-size: 23px; }
.compose-preview-body { color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.65; }
.compose-preview-body p { margin: 0; }
.context-modal-list { display: grid; gap: 7px; }
.context-modal-section { margin: 0 0 8px; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.context-choice { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--paper); text-align: left; }
.context-choice > svg { width: 30px; height: 30px; flex: 0 0 30px; color: var(--ink); }
.context-choice:hover { border-color: var(--mint-strong); background: #fbfff8; }
.context-choice.active { border-color: var(--mint-strong); background: var(--mint); }
.context-choice h4 { margin: 0 0 2px; font-size: 11px; }
.context-choice p { margin: 0; color: var(--ink-soft); font-size: 9px; }
.context-choice .checkmark { display: grid; place-items: center; width: 19px; height: 19px; margin-left: auto; border-radius: 50%; color: var(--ink); background: var(--lime); }
.context-choice .checkmark svg { width: 13px; height: 13px; }
#toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid rgba(23,59,55,.08); border-radius: 13px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow-soft); font-size: 11px; line-height: 1.45; animation: toast-in 260ms cubic-bezier(.2,.8,.2,1) both; }
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; color: #5ca66d; }
.toast.error svg { color: var(--coral); }
#network-status-root { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; z-index: 70; pointer-events: none; transform: translateX(-50%); }
.network-status { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 13px; border: 1px solid rgba(23,59,55,.1); border-radius: 999px; color: var(--ink); background: rgba(255,254,250,.96); box-shadow: var(--shadow-soft); font-size: 10px; font-weight: 800; white-space: nowrap; animation: network-in 180ms ease both; }
.network-spinner, .button-spinner { display: inline-block; width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid rgba(23,59,55,.18); border-top-color: var(--ink); border-radius: 50%; animation: spin 720ms linear infinite; }
.button-spinner { width: 13px; height: 13px; flex-basis: 13px; border-width: 2px; }
.btn.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: 7px; pointer-events: none; opacity: .78; }
.notice-form[data-submitting="true"] .rich-text-editor,
.notice-form[data-submitting="true"] .rich-text-toolbar { cursor: wait; }
.roster-card.is-loading { pointer-events: none; opacity: .7; }

/* Rich notice editor */
.rich-text-toolbar { overflow-x: auto; scrollbar-width: thin; }
.rich-text-tool-group { flex: 0 0 auto; }
.rich-text-editor p, .notice-rich-body p { margin: 0 0 .55em; }
.rich-text-editor p:last-child, .notice-rich-body p:last-child { margin-bottom: 0; }
.rich-text-editor h1, .rich-text-editor h2, .rich-text-editor h3,
.notice-rich-body h1, .notice-rich-body h2, .notice-rich-body h3 { margin: .2em 0 .45em; line-height: 1.2; }
.rich-text-editor h1, .notice-rich-body h1 { font-size: 1.45em; }
.rich-text-editor h2, .notice-rich-body h2 { font-size: 1.25em; }
.rich-text-editor h3, .notice-rich-body h3 { font-size: 1.08em; }
.rich-text-editor a, .notice-rich-body a { color: #2c5f7b; text-decoration: underline; text-underline-offset: 2px; }
.rich-text-editor hr, .notice-rich-body hr { margin: .8em 0; border: 0; border-top: 1px solid var(--line); }
.notice-rich-body { overflow-wrap: anywhere; }
.notice-video-embed, .rich-video-node { display: grid; gap: 7px; margin: .8em 0; }
.notice-video-embed iframe, .rich-video-node iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 160px; border: 0; border-radius: 12px; background: #10252b; }
.notice-video-embed a, .rich-video-node-actions { font-size: 10px; font-weight: 800; }
.rich-video-node { position: relative; }
.rich-video-node.ProseMirror-selectednode { outline: 3px solid var(--lime); outline-offset: 4px; border-radius: 12px; }
.rich-video-node-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rich-video-node-actions a { color: #2c5f7b; text-decoration: underline; }
.rich-video-node-actions button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: var(--cream); cursor: pointer; }
.rich-video-node-actions button:hover { color: var(--ink); border-color: var(--mint-strong); background: var(--mint); }
.rich-image-node { display: grid; gap: 7px; margin: .8em 0; }
.rich-image-node img,
.notice-rich-body img[data-inline-image],
.notice-rich-body img[data-image-path] {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 12px;
  background: var(--cream);
}
.notice-rich-body img[data-inline-image],
.notice-rich-body img[data-image-path] { margin-block: .8em; }
.rich-image-node-placeholder { min-height: 120px; }
.rich-image-node-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; font-size: 10px; font-weight: 800; }
.rich-image-node-actions button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: var(--cream); cursor: pointer; }
.rich-image-node-actions button:hover { color: var(--ink); border-color: var(--mint-strong); background: var(--mint); }
.rich-editor-modal-backdrop { z-index: 45; }
.rich-editor-modal { width: min(100%, 520px); max-height: min(680px, calc(100dvh - 28px)); }
.rich-editor-modal .notice-form { gap: 14px; }
.rich-editor-modal .modal-head { margin-bottom: 4px; }
.radio-line { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.radio-line input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.radio-line input:disabled + * { opacity: .55; }
.rich-video-preview { display: grid; place-items: center; min-height: 92px; padding: 10px; border: 1px dashed #b9cec0; border-radius: 11px; color: var(--ink-soft); background: var(--cream); font-size: 11px; text-align: center; }
.rich-video-preview .notice-video-embed { width: 100%; margin: 0; }
.rich-video-preview .notice-video-embed iframe { min-height: 150px; }
.rich-video-local-preview { display: grid; gap: 8px; justify-items: center; max-width: 360px; }
.rich-video-local-preview p { margin: 0; }
.rich-video-local-preview a { color: var(--ink); font-weight: 800; text-decoration: underline; }
.rich-image-preview { display: grid; place-items: center; min-height: 120px; padding: 10px; border: 1px dashed #b9cec0; border-radius: 11px; color: var(--ink-soft); background: var(--cream); font-size: 11px; text-align: center; }
.rich-image-preview img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 8px; }

@media (max-width: 640px) {
  .rich-text-toolbar { flex-wrap: nowrap; }
  .rich-text-tool { width: 34px; height: 34px; flex: 0 0 34px; }
  .rich-text-editor { min-height: 180px; max-height: 330px; font-size: 16px; }
  .rich-video-node iframe, .notice-video-embed iframe { min-height: 150px; border-radius: 9px; }
  .rich-editor-modal-backdrop { padding: 10px; }
  .rich-editor-modal { width: 100%; max-height: calc(100dvh - 20px); padding: 16px; border-radius: 16px; }
}

@keyframes float-in { from { opacity: 0; transform: translateY(15px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes network-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .network-spinner, .button-spinner { animation: none; }
  .network-status { animation: none; }
}

@media (max-width: 960px) {
  #network-status-root { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; transform: none; text-align: center; }
  .network-status { max-width: 100%; }
  .unit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .sidebar .brand-word { font-size: 15px; }
  .page-content { margin-top: 48px; }
  .team-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .roster-list { grid-template-columns: 1fr; }
}

/* Keep landscape tablets compact while preserving the two-column access flow. */
@media (min-width: 861px) and (max-width: 1100px) {
  .unit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .unit-card { min-height: 125px; padding: 13px; border-radius: 15px; }
  .unit-card-arrow { width: 25px; height: 25px; border-radius: 8px; }
  .unit-card-arrow svg { width: 13px; height: 13px; }
  .unit-card h3 { font-size: 14px; }
  .unit-card p { font-size: 11px; }
  .access-screen { grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr); }
  .access-copy { padding: 28px clamp(24px, 4vw, 58px) 24px; }
  .access-copy-intro { padding: 34px 0; }
  .access-copy .display-title { font-size: clamp(2.25rem, 4.8vw, 3.25rem); }
  .access-copy-intro > p:not(.eyebrow) { margin-top: 15px; font-size: 13px; line-height: 1.55; }
  .access-panel-wrap { padding: 20px; }
  .access-panel { padding: 27px; }
  .access-panel h2 { font-size: 27px; }
  .access-panel > p { margin-bottom: 20px; }
  .access-demo { margin-top: 16px; padding-top: 13px; }
}

/* Portrait tablets and narrow screens use a compact vertical flow. */
@media (max-width: 960px) and (orientation: portrait), (max-width: 860px) {
  .access-screen { grid-template-columns: 1fr; min-height: 100vh; min-height: 100svh; overflow: auto; }
  .access-copy { min-height: auto; padding: 24px clamp(22px, 6vw, 48px) 16px; }
  .access-copy-intro { margin: 0; padding: 34px 0 24px; }
  .access-copy .display-title { font-size: clamp(2rem, 7vw, 3rem); }
  .access-copy-intro > p:not(.eyebrow) { margin-top: 14px; font-size: 13px; line-height: 1.5; }
  .access-panel-wrap { min-height: auto; padding: 16px; align-items: start; }
  .access-panel { padding: 24px; }
  .access-panel h2 { font-size: 27px; }
  .access-panel > p { margin: 9px 0 20px; }
  .access-form { gap: 12px; }
}

@media (max-width: 700px) {
  .access-copy { min-height: auto; padding: 20px 18px 12px; }
  .access-copy-intro { padding: 25px 0 18px; }
  .access-copy .display-title { font-size: clamp(1.8rem, 9.5vw, 2.7rem); }
  .access-copy-intro > p:not(.eyebrow) { margin-top: 12px; font-size: 12px; line-height: 1.5; }
  .access-footer { gap: 9px; font-size: 10px; }
  .access-panel-wrap { padding: 10px; }
  .access-panel { padding: 22px 18px 18px; border-radius: 22px; }
  .access-panel h2 { font-size: 25px; }
  .access-panel > p { margin: 8px 0 18px; font-size: 12px; }
  .access-demo { margin-top: 15px; padding-top: 12px; }
  .welcome-screen { padding: 22px 17px 45px; }
  .welcome-content { margin-top: 53px; }
  .welcome-content .display-title { font-size: 2.1rem; }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .unit-card { min-height: 118px; padding: 12px; border-radius: 14px; }
  .unit-card-arrow { width: 24px; height: 24px; border-radius: 8px; }
  .unit-card-arrow svg { width: 12px; height: 12px; }
  .unit-card h3 { font-size: 14px; }
  .unit-card p { font-size: 11px; }
  .caregiver-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .caregiver-card { padding: 11px; }
  .caregiver-card h3 { font-size: 11px; }
  .dashboard-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; display: block; width: 100%; height: auto; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-radius: 17px 17px 0 0; box-shadow: 0 -8px 28px rgba(14,43,40,.14); }
  .sidebar::before { display: none; }
  .sidebar > .brand-lockup, .sidebar-label, .sidebar-spacer, .sidebar-context, .logout-btn { display: none; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; }
  .nav-btn { justify-content: center; min-height: 43px; padding: 0 8px; border-radius: 11px; font-size: 10px; }
  .nav-btn svg { width: 16px; height: 16px; }
  .main-content { padding: 19px 15px calc(86px + env(safe-area-inset-bottom)); }
  .topbar { align-items: center; }
  .topbar-meta { font-size: 10px; }
  .topbar-meta .live-dot { width: 6px; height: 6px; }
  .topbar-actions { gap: 6px; }
  .language-btn { padding: 0 7px; }
  .language-btn strong { display: none; }
  .context-btn { min-height: 36px; padding: 0 7px; font-size: 10px; }
  .context-btn span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .context-btn .avatar { width: 22px; height: 22px; flex-basis: 22px; }
  .context-btn svg { display: none; }
  .topbar-unit-context { min-height: 36px; max-width: 42vw; padding: 0 8px; border-radius: 10px; font-size: 10px; }
  .topbar-unit-context svg { width: 14px; height: 14px; flex-basis: 14px; }
  .topbar-setup { min-height: 36px; padding: 0 8px; font-size: 10px; }
  .topbar-setup svg { width: 14px; height: 14px; }
  .topbar-logout { width: 36px; height: 36px; }
  .hero-row, .team-hero { display: block; }
  .page-content { margin-top: 46px; }
  .display-title { font-size: 2.05rem; }
  .hero-row .display-title { font-size: 1.8rem; }
  .hero-row p, .team-hero p { font-size: 11px; }
  .hero-row p { margin-top: 7px; }
  .hero-actions { margin-top: 19px; }
  .hero-actions .btn { flex: 1; }
  .team-hero-actions { margin-top: 19px; }
  .team-hero-actions .btn { flex: 1; }
  .stats-grid { gap: 7px; margin: 19px 0 23px; }
  .stat-card { min-height: 64px; padding: 10px 11px; }
  .stat-label { font-size: 9px; }
  .stat-card-icon { right: 3px; width: 40px; height: 40px; }
  .stat-card-icon svg { width: 40px; height: 40px; }
  .stat-value { margin-top: 4px; font-size: 24px; }
  .section-head { display: flex; }
  .section-title-actions { gap: 10px; margin-bottom: 10px; }
  .section-head h2 { margin-bottom: 0; font-size: 18px; }
  .home-section-actions { flex-wrap: wrap; }
  .section-title-actions .create-notice-btn, .sync-now-btn { flex: 0 0 auto; white-space: nowrap; }
  .latest-create-row { margin: -2px 0 12px; }
  .create-notice-btn { min-height: 32px; }
  .filter-row { width: max-content; }
  .filter-row { max-width: 100%; overflow-x: auto; }
  .filter-btn { flex: 0 0 auto; }
  .notice-card { padding: 16px; }
  .notice-card-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
  .read-btn { margin-left: auto; }
  .notice-card h3 { font-size: 14px; }
  .notice-card .notice-title-row h3 { font-size: 18px; }
  .notice-card .notice-card-body { font-size: 14px; line-height: 1.55; }
  .notice-title-row { display: block; }
  .translation-btn, .translation-loading { margin-top: 0; margin-bottom: 8px; }
  .notice-footer { margin-top: 15px; }
  .notice-people-wrap { align-items: flex-start; gap: 7px; }
  .notice-people-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 100%; max-width: 100%; overflow-x: visible; overflow-y: visible; }
  .notice-people-count { margin-left: auto; }
  .notice-person-mini { width: 100%; max-width: none; min-width: 0; }
  .attachment-file { width: 100%; }
  .notice-detail-modal { max-height: calc(100vh - 16px); padding: 16px; border-radius: 17px; }
  .notice-detail-title-row { display: block; }
  .notice-detail-title-row h3 { font-size: 21px; }
  .notice-detail-body { font-size: 14px !important; line-height: 1.7 !important; }
  .attachment-preview-backdrop { padding: 8px; }
  .attachment-preview { max-height: calc(100dvh - 16px); padding: 12px; border-radius: 15px; }
  .attachment-preview-head h2 { max-width: calc(100vw - 100px); font-size: 15px; }
  .attachment-preview-stage { max-height: calc(100dvh - 142px); margin-top: 9px; padding: 8px; }
  .attachment-preview-stage img, .attachment-preview-video { max-height: calc(100dvh - 220px); }
  .attachment-preview-frame { min-height: calc(100dvh - 220px); }
  .attachment-preview-actions { flex-direction: column-reverse; }
  .attachment-preview-actions .btn { width: 100%; }
  .reader-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-detail-footer { align-items: stretch; flex-direction: column; }
  .notice-detail-actions { justify-content: space-between; }
  .team-layout { display: block; }
  .team-units { margin-bottom: 12px; }
  .team-units h3 { margin-bottom: 9px; }
  .team-unit-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .team-unit-item { display: inline-flex; }
  .team-unit-btn { display: inline-flex; width: auto; min-height: 39px; margin: 0; padding: 0 10px; }
  .roster-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .profile-details { grid-template-columns: 1fr; }
  .employee-settings-grid { grid-template-columns: 1fr; }
  .employee-avatar-row { align-items: flex-start; flex-direction: column; }
  .compact-access-action { align-items: stretch; flex-direction: column; }
  .compact-access-action .btn { width: 100%; }
}

@media (max-width: 400px) {
  .caregiver-grid { grid-template-columns: 1fr; }
  .access-footer { font-size: 10px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 92px; }
  .reader-status-grid { grid-template-columns: 1fr; }
}

.access-issued-code { font: 600 1.05rem monospace; overflow-wrap: anywhere; padding: 16px; background: #eef3ef; border-radius: 10px; user-select: all; }
.access-record { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid #e2e8e2; }

/* Visual refresh: calm editorial care workspace */
html { background: #f4f3ee; }
body {
  background:
    radial-gradient(circle at 88% 4%, rgba(242, 211, 111, .15), transparent 28rem),
    #f4f3ee;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-word { letter-spacing: -.055em; }
.brand-note { color: #77858a; }
.eyebrow { letter-spacing: .16em; }
.eyebrow::before { width: 6px; height: 6px; background: var(--coral); }
.display-title { letter-spacing: -.065em; }

.btn {
  min-height: 44px;
  border-radius: 11px;
  letter-spacing: -.01em;
}
.btn-primary { color: var(--ink); background: var(--lime); box-shadow: 0 8px 18px rgba(204, 174, 75, .2); }
.btn-primary:hover { background: #f6dc83; box-shadow: 0 13px 24px rgba(204, 174, 75, .25); }
.btn-dark { color: #fff; background: var(--ink); box-shadow: 0 9px 19px rgba(32, 56, 68, .2); }
.btn-dark:hover { background: var(--ink-deep); }
.btn-ghost { border-color: #dfe3dd; background: rgba(255, 253, 250, .68); }
.btn-ghost:hover { border-color: var(--mint-strong); background: var(--paper); }

.access-screen {
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr);
  background: var(--ink-deep);
}
.access-screen::before { border-color: rgba(220, 239, 233, .14); }
.access-screen::after { border-color: rgba(242, 211, 111, .24); }
.access-copy {
  padding: 42px clamp(28px, 7vw, 110px) 36px;
  background: linear-gradient(148deg, #173541 0%, #203e48 58%, #294b52 100%);
}
.access-copy::before {
  opacity: .2;
  mix-blend-mode: screen;
  filter: saturate(.72) contrast(1.05);
}
.access-copy .display-title em { color: var(--lime); }
.access-copy-intro > p:not(.eyebrow) { color: rgba(255,255,255,.72); }
.access-footer { color: rgba(255,255,255,.5); }
.access-footer .dot { background: var(--lime); }
.access-panel-wrap {
  padding: clamp(24px, 4vw, 52px);
  background: linear-gradient(145deg, #f7f6f1 0%, #edf2ed 100%);
}
.access-panel {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(32,56,68,.08);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(32,56,68,.15);
}
.access-panel::before { top: -10px; right: 28px; width: 78px; height: 23px; border-radius: 0 0 8px 8px; background: var(--coral); }
.access-panel h2 { font-size: 30px; letter-spacing: -.065em; }
.access-panel > p { color: var(--ink-soft); }
.access-orb { border-radius: 12px; background: var(--mint); }

.welcome-screen { background: transparent; }
.unit-card, .caregiver-card { border-color: #e1e5df; background: rgba(255,253,250,.78); }
.unit-card { border-radius: 16px; }
.unit-card::after { background: var(--mint); }
.unit-card-arrow { background: var(--ink); }
.selected-context { background: var(--mint); }

.dashboard-shell { background: #f4f3ee; }
.sidebar {
  width: auto;
  padding: 30px 16px 18px;
  background: linear-gradient(180deg, #193641 0%, #203f49 100%);
}
.sidebar::before {
  background-image: linear-gradient(180deg, rgba(17,40,51,.36), rgba(17,40,51,.72)), url('./assets/sidebar/moshiokuri-sidebar-option-5-left.png');
  opacity: .30;
}
.sidebar .brand-note { color: rgba(255,255,255,.5); }
.sidebar-nav { margin-top: 58px; }
.nav-btn { border-radius: 11px; }
.nav-btn.active { color: var(--ink); background: var(--lime); box-shadow: 0 9px 20px rgba(0,0,0,.15); }
.sidebar-context { border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.07); }
.main-content { padding-top: 25px; }
.topbar-meta .live-dot { background: #71c9ad; box-shadow: 0 0 0 5px rgba(113,201,173,.14); }
.context-btn { border-color: #dfe3dd; border-radius: 11px; background: rgba(255,253,250,.85); }
.context-btn:hover { border-color: var(--mint-strong); }
.page-content { margin-top: 22px; }
.hero-row .display-title { letter-spacing: -.075em; }
.hero-row { gap: 12px; }
.hero-row .eyebrow { margin-bottom: 8px; font-size: 10px; letter-spacing: .13em; }
.hero-row .display-title { font-size: clamp(1.35rem, 2vw, 2rem); line-height: 1.08; }
.hero-row p { margin-top: 6px; font-size: 12px; line-height: 1.35; }
.stats-grid { gap: 10px; margin: 24px 0 28px; }
.stat-card { border: 1px solid #e1e5df; border-radius: 16px; box-shadow: 0 8px 24px rgba(32,56,68,.05); }
.stat-card-action:hover { box-shadow: 0 12px 28px rgba(32,56,68,.11); }
.stat-pending { border-color: #f0c2b3; background: #fff1eb; }
.stat-read { border-color: #bfddd1; background: #e1f0eb; }
.stat-global { border-color: #ccdce6; background: #edf3f7; }
.section-head h2 { letter-spacing: -.065em; }
.filter-row { border-color: #dfe3dd; background: rgba(255,253,250,.72); }
.filter-btn.active { box-shadow: 0 2px 8px rgba(32,56,68,.1); }
.notice-card {
  padding: 21px;
  border-color: #e1e5df;
  border-radius: 17px;
  box-shadow: 0 6px 22px rgba(32,56,68,.035);
}
.notice-card:hover { border-color: #b8d8cb; box-shadow: 0 12px 28px rgba(32,56,68,.09); }
.notice-card.latest-notice { border-color: var(--mint-strong); box-shadow: 0 12px 30px rgba(80,145,124,.13); }
.notice-type { border-radius: 6px; background: var(--mint); }
.notice-type.global { background: #f4dcd4; }
.read-btn { border-color: var(--ink); border-radius: 9px; }
.empty-state { border-color: #cbd9d2; background: rgba(255,253,250,.48); }

.team-hero { border-color: #dfe3dd; }
.admin-badge, .roster-count { border-color: rgba(166,211,197,.7); background: var(--mint); }
.team-units, .team-roster { border-color: #e1e5df; border-radius: 16px; box-shadow: 0 6px 22px rgba(32,56,68,.035); }
.team-unit-btn.active { background: var(--mint); }
.roster-row { border-color: #e1e5df; }
.roster-card.is-editable:hover { border-color: var(--mint-strong); background: #fbfefa; }

.modal-backdrop { background: rgba(17,40,51,.34); backdrop-filter: blur(5px); }
.modal { border: 1px solid rgba(32,56,68,.08); border-radius: 18px; box-shadow: 0 28px 80px rgba(17,40,51,.3); }
.modal-close { border-radius: 8px; }
.file-picker { border-color: #b8d0c5; background: #f4f6f1; }
.file-picker:hover { border-color: var(--mint-strong); background: var(--mint); }
.toast { border-color: rgba(32,56,68,.1); box-shadow: 0 10px 28px rgba(32,56,68,.11); }

@media (max-width: 700px) {
  .access-copy { padding: 22px 18px 13px; }
  .access-panel-wrap { padding: 12px; }
  .access-panel { border-radius: 20px; }
  .main-content { padding-top: 18px; }
  .page-content { margin-top: 43px; }
  .hero-row { gap: 10px; }
  .hero-row .eyebrow { margin-bottom: 6px; font-size: 9px; }
  .hero-row .display-title { font-size: 1.55rem; line-height: 1.08; }
  .hero-row p { margin-top: 5px; font-size: 10px; line-height: 1.35; }
  .sidebar { background: #193641; }
  .nav-btn.active { box-shadow: 0 5px 14px rgba(0,0,0,.15); }
  .notice-card { border-radius: 15px; }
}

/* Aura Bento refinement: layered surfaces with a calm operational hierarchy */
.dashboard-shell {
  background-color: #f4f3ee;
  background-image:
    radial-gradient(circle at 78% 0%, rgba(242, 211, 111, .13), transparent 23rem),
    radial-gradient(circle at 8% 44%, rgba(166, 211, 197, .12), transparent 27rem);
}
.main-content { position: relative; }
.topbar {
  padding: 8px 10px 8px 13px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 16px;
  background: rgba(255, 253, 250, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), inset 0 -1px 0 rgba(255, 255, 255, .22), 0 8px 24px rgba(32, 56, 68, .09);
  backdrop-filter: blur(4px) saturate(165%);
  -webkit-backdrop-filter: blur(4px) saturate(165%);
}
.context-btn {
  border-color: rgba(228, 229, 223, .9);
  background: rgba(255, 253, 250, .62);
  backdrop-filter: blur(14px);
}
.topbar-unit-context, .topbar-setup, .topbar-logout {
  border-color: rgba(255, 255, 255, .62);
  background: rgba(255, 253, 250, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56), 0 4px 14px rgba(32, 56, 68, .05);
  backdrop-filter: blur(2px) saturate(145%);
  -webkit-backdrop-filter: blur(2px) saturate(145%);
}
.topbar .language-btn { min-height: 42px; border-radius: 12px; }
.topbar-unit-context:hover, .topbar-setup:hover, .topbar-logout:hover { background: rgba(255, 253, 250, .62); }
.access-panel {
  background: rgba(255, 253, 250, .82);
  backdrop-filter: blur(20px);
}
.filter-row {
  border-color: rgba(228, 229, 223, .86);
  background: rgba(255, 253, 250, .58);
  backdrop-filter: blur(16px);
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  align-items: stretch;
}
.stats-grid .stat-pending,
.stats-grid .stat-read,
.stats-grid .stat-global { grid-row: auto; min-height: 72px; }
.stat-card {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(255, 253, 250, .66);
  box-shadow: 0 10px 30px rgba(32, 56, 68, .055);
  backdrop-filter: blur(20px);
}
.stat-card-action:hover {
  transform: translateY(-3px) scale(1.006);
  box-shadow: 0 16px 34px rgba(32, 56, 68, .12);
}
.stat-pending { background: rgba(255, 241, 235, .78); }
.stat-read { background: rgba(225, 240, 235, .78); }
.stat-global { background: rgba(237, 243, 247, .8); }
.stat-card::after { border-color: rgba(32, 56, 68, .1); }

.notice-card {
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 253, 250, .72);
  box-shadow: 0 9px 28px rgba(32, 56, 68, .055);
  backdrop-filter: blur(18px);
}
.notice-card.latest-notice {
  padding: 24px;
  background: rgba(255, 253, 250, .84);
}
.notice-card.latest-notice:hover { transform: translateY(-3px); }
.notice-type, .status-pill, .latest-badge, .reader-total {
  border: 1px solid rgba(255, 255, 255, .58);
}
.team-units, .team-roster {
  background: rgba(255, 253, 250, .78);
  backdrop-filter: blur(18px);
}
.modal {
  background: var(--paper);
  backdrop-filter: none;
}
.sidebar-context {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
}
.nav-btn, .context-btn, .filter-btn, .stat-card-action, .notice-card, .team-unit-btn {
  -webkit-tap-highlight-color: transparent;
}
.nav-btn:focus-visible,
.context-btn:focus-visible,
.topbar-unit-context:focus-visible,
.filter-btn:focus-visible,
.team-unit-btn:focus-visible {
  outline: 3px solid rgba(242, 211, 111, .85);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .topbar { padding: 6px 7px 6px 9px; border-radius: 13px; }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
  }
  .stats-grid .stat-pending,
  .stats-grid .stat-read,
  .stats-grid .stat-global { grid-row: auto; min-height: 64px; }
  .notice-card.latest-notice { padding: 18px; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid .stat-pending,
  .stats-grid .stat-read,
  .stats-grid .stat-global { min-height: 64px; }
}

/* Keep the mobile navigation compact after the visual theme overrides. */
@media (max-width: 700px) {
  .sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .sidebar-nav { margin: 0; }
  .nav-btn {
    min-height: 43px;
    padding: 0 8px;
    font-size: 10px;
  }
  .main-content { padding-bottom: 42px; }
}

/* Full-screen notice board */
.display-screen {
  --display-ink: #173b37;
  --display-soft: #6b7d7a;
  --display-paper: rgba(255,253,250,.93);
  --display-accent: #c4d957;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(18px, 3vw, 38px) clamp(16px, 5vw, 76px) 54px;
  color: var(--display-ink);
  background: radial-gradient(circle at 88% 0%, rgba(232,244,194,.85), transparent 34%), radial-gradient(circle at 6% 8%, rgba(204,232,225,.78), transparent 31%), #f5f3ec;
}
.display-screen button { font: inherit; }
.display-header { display: flex; align-items: center; gap: 22px; max-width: 1380px; margin: 0 auto; }
.display-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--display-ink); text-decoration: none; }
.display-brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px 13px 13px 4px; background: var(--display-accent); box-shadow: 0 8px 20px rgba(168,190,59,.22); }
.display-brand-mark svg { width: 22px; height: 22px; }
.display-brand strong { display: block; font: 800 17px var(--font-display); letter-spacing: -.05em; }
.display-brand small { display: block; margin-top: 2px; color: var(--display-soft); font-size: 10px; font-weight: 700; }
.display-header-context { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--display-ink); font-size: 13px; font-weight: 800; }
.display-header-context small { color: var(--display-soft); font-size: 10px; font-weight: 700; }
.display-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #60ba75; box-shadow: 0 0 0 6px rgba(96,186,117,.13); }
.display-header-actions { display: inline-flex; align-items: center; gap: 8px; }
.display-icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(23,59,55,.12); border-radius: 12px; color: var(--display-soft); background: rgba(255,255,255,.58); transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease; }
.display-icon-btn:hover { color: var(--display-ink); border-color: rgba(23,59,55,.28); background: #fffdfa; transform: translateY(-2px); }
.display-icon-btn svg { width: 17px; height: 17px; }
.display-app-btn, .display-outline-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 15px; border: 1px solid transparent; border-radius: 12px; color: var(--display-ink); font-size: 12px; font-weight: 800; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.display-app-btn { background: var(--display-accent); box-shadow: 0 9px 20px rgba(168,190,59,.22); }
.display-app-btn:hover { background: #d9ea78; box-shadow: 0 12px 24px rgba(168,190,59,.3); transform: translateY(-2px); }
.display-app-btn svg, .display-outline-btn svg { width: 16px; height: 16px; }
.display-app-btn-small { min-height: 42px; }
.display-outline-btn { border-color: rgba(23,59,55,.14); background: rgba(255,255,255,.58); }
.display-outline-btn:hover { background: #fffdfa; transform: translateY(-2px); }
.display-intro { display: flex; align-items: end; justify-content: space-between; gap: 22px; max-width: 1380px; margin: clamp(50px, 8vw, 112px) auto 30px; }
.display-kicker { display: inline-flex; align-items: center; gap: 8px; color: #71827f; font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.display-kicker::before { width: 7px; height: 7px; border-radius: 50%; background: #e78b72; content: ''; }
.display-intro h1 { max-width: 720px; margin: 12px 0 9px; font: 800 clamp(2.25rem, 5vw, 4.8rem)/.98 var(--font-display); letter-spacing: -.085em; }
.display-intro h1 em { color: #77a194; font-style: normal; }
.display-intro p { max-width: 600px; margin: 0; color: var(--display-soft); font-size: 14px; line-height: 1.55; }
.display-pending-card { display: grid; min-width: 145px; padding: 17px 19px; border: 1px solid #f0c3b3; border-radius: 18px; color: #8f5d4e; background: #fff0e9; text-align: right; }
.display-pending-card span { font: 800 35px/1 var(--font-display); letter-spacing: -.07em; }
.display-pending-card small { margin-top: 6px; font-size: 10px; font-weight: 800; }
.display-notices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 1380px; margin: 0 auto; }
.display-notice { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 17px; width: 100%; min-height: 216px; padding: 25px 26px; border: 1px solid rgba(23,59,55,.1); border-radius: 24px; color: var(--display-ink); background: var(--display-paper); box-shadow: 0 13px 40px rgba(23,59,55,.055); text-align: left; cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.display-notice:hover { border-color: #aac9bc; box-shadow: 0 18px 44px rgba(23,59,55,.11); transform: translateY(-3px); }
.display-notice.is-selected { border-color: #a6c8ba; background: #fffefa; box-shadow: 0 16px 45px rgba(23,59,55,.12); outline: 2px solid rgba(196,217,87,.7); outline-offset: 3px; }
.display-notice-index { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: var(--display-ink); background: #e4f0dc; font: 800 12px var(--font-display); }
.display-notice-content { min-width: 0; }
.display-notice-meta { display: flex; align-items: center; gap: 9px; color: var(--display-soft); font-size: 10px; font-weight: 700; }
.display-badge { padding: 5px 8px; border-radius: 7px; color: #47725e; background: #edf7e9; font-size: 9px; font-weight: 900; }
.display-notice-content strong { display: block; margin-top: 14px; font: 800 clamp(1.2rem, 2.1vw, 1.65rem)/1.17 var(--font-display); letter-spacing: -.05em; }
.display-notice-body { display: block; margin-top: 10px; color: var(--display-soft); font-size: 13px; line-height: 1.55; }
.display-notice-footer { display: flex; align-items: center; gap: 11px; margin-top: 21px; color: #7c8a87; font-size: 10px; font-weight: 800; }
.display-progress { width: 80px; height: 5px; overflow: hidden; border-radius: 99px; background: #e1e8e1; }
.display-progress i { display: block; height: 100%; border-radius: inherit; background: #8db59a; }
.display-notice-arrow { align-self: center; color: #a2b1ac; }
.display-notice-arrow svg { width: 18px; height: 18px; }
.display-readers { max-width: 1380px; margin: 34px auto 0; padding: 26px; border: 1px solid rgba(23,59,55,.09); border-radius: 24px; background: rgba(255,253,250,.72); box-shadow: 0 14px 34px rgba(23,59,55,.045); }
.display-readers-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.display-readers-head h2 { max-width: 800px; margin: 10px 0 0; font: 800 clamp(1.3rem, 2.4vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -.055em; }
.display-reader-count { padding: 9px 11px; border-radius: 9px; color: #47725e; background: #edf7e9; font-size: 11px; font-weight: 900; white-space: nowrap; }
.display-people-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.display-person { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 10px 11px; border-radius: 15px; text-align: left; transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease; }
.display-person:not(:disabled) { cursor: pointer; }
.display-person:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(23,59,55,.08); }
.display-person.is-unread { border: 2px dashed #b8c1bd; color: #84918d; background: rgba(245,246,241,.62); filter: grayscale(.65); }
.display-person.is-read { border: 2px solid #a8cdb7; color: #2e604e; background: #ecf8ed; }
.display-person.is-unavailable { border-color: #d8ddd8; color: #9ba6a2; background: #f1f2ee; }
.display-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; color: var(--display-ink); background: #d9e9d0; font-size: 10px; font-weight: 900; }
.display-person.is-unread .display-avatar { background: #e4e7e1; }
.display-person.is-read .display-avatar { background: #c7e7cf; }
.display-person-copy { min-width: 0; }
.display-person-copy strong { display: block; overflow: hidden; font-size: 11px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.display-person-copy small { display: block; margin-top: 4px; font-size: 9px; font-weight: 800; }
.display-person-status { display: grid; place-items: center; flex: 0 0 18px; margin-left: auto; }
.display-person-status svg { width: 15px; height: 15px; }
.display-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 21px 0 0; color: #84918d; font-size: 10px; font-weight: 800; }
.display-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.display-legend-swatch { width: 12px; height: 12px; border-radius: 4px; }
.display-legend-swatch.is-unread { border: 2px dashed #aab5b0; background: transparent; }
.display-legend-swatch.is-read { border: 2px solid #9cc4aa; background: #dff2e2; }
.display-legend-swatch.is-unavailable { border: 1px solid #d0d7d0; background: #e8eae5; }
.display-no-notices { max-width: 1380px; margin: 0 auto; padding: 70px 22px; border: 1px dashed #adc0b8; border-radius: 24px; color: var(--display-soft); background: rgba(255,253,250,.65); text-align: center; }
.display-no-notices > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 18px; color: #478161; background: #e5f3e3; }
.display-no-notices svg { width: 25px; height: 25px; }
.display-no-notices h2 { margin: 0; color: var(--display-ink); font: 800 25px var(--font-display); letter-spacing: -.05em; }
.display-no-notices p { margin: 8px 0 0; font-size: 13px; }
.display-no-members { grid-column: 1 / -1; margin: 0; color: var(--display-soft); font-size: 12px; }
.display-modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(14,43,40,.43); backdrop-filter: blur(8px); }
.display-modal { position: relative; width: min(100%, 480px); padding: 30px; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: #fffdfa; box-shadow: 0 28px 80px rgba(14,43,40,.3); animation: modal-in 220ms ease both; }
.display-modal-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; color: var(--display-soft); background: #f1f2ec; }
.display-modal-close:hover { color: var(--display-ink); background: #e3eee5; }
.display-modal-close svg { width: 16px; height: 16px; }
.display-modal-kicker { display: inline-flex; align-items: center; gap: 8px; color: #71827f; font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.display-modal-kicker::before { width: 7px; height: 7px; border-radius: 50%; background: #e78b72; content: ''; }
.display-modal h2 { margin: 12px 0 8px; font: 800 29px/1.05 var(--font-display); letter-spacing: -.06em; }
.display-modal > p { margin: 0; color: var(--display-soft); font-size: 13px; line-height: 1.5; }
.display-modal-notice { display: grid; gap: 6px; margin: 20px 0; padding: 14px; border-radius: 14px; color: var(--display-ink); background: #edf6e8; }
.display-modal-notice strong { font-size: 12px; }
.display-modal-notice span { color: #6b8274; font-size: 10px; font-weight: 700; }
.display-password-field { display: grid; gap: 7px; color: var(--display-ink); font-size: 11px; font-weight: 900; }
.display-password-field input { width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid #d8dfd8; border-radius: 13px; outline: 0; color: var(--display-ink); background: #fff; font-size: 16px; transition: border-color 180ms ease, box-shadow 180ms ease; }
.display-password-field input:focus { border-color: #8fb7a0; box-shadow: 0 0 0 4px rgba(143,183,160,.16); }
.display-confirm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 49px; margin-top: 16px; border: 0; border-radius: 13px; color: var(--display-ink); background: var(--display-accent); font-size: 12px; font-weight: 900; }
.display-confirm-btn:hover { background: #d9ea78; }
.display-confirm-btn svg { width: 17px; height: 17px; }
.display-confirm-btn.is-loading { opacity: .7; cursor: wait; }
.display-form-error { margin-top: 9px !important; color: #b25f4d !important; font-size: 11px !important; font-weight: 800; }
.display-modal-note { margin-top: 16px !important; color: #91a09b !important; font-size: 10px !important; }
.display-device-result { display: grid; gap: 7px; }
.display-device-result label { color: var(--display-ink); font-size: 11px; font-weight: 900; }
.display-device-result textarea { width: 100%; resize: vertical; padding: 11px 12px; border: 1px solid #d8dfd8; border-radius: 12px; outline: 0; color: var(--display-ink); background: #fbfcf8; font: 11px/1.45 var(--font-body); }
.display-device-result textarea:focus { border-color: #8fb7a0; box-shadow: 0 0 0 4px rgba(143,183,160,.16); }
.display-empty { display: grid; place-items: center; padding: 22px; }
.display-empty-card, .display-loading-card { width: min(100%, 520px); padding: 38px; border: 1px solid rgba(23,59,55,.09); border-radius: 25px; background: rgba(255,253,250,.86); box-shadow: 0 20px 60px rgba(23,59,55,.09); text-align: center; }
.display-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; color: var(--display-ink); background: #e4f0dc; }
.display-empty-icon.is-error { color: #a4604f; background: #fff0e9; }
.display-empty-icon svg { width: 27px; height: 27px; }
.display-empty-card h1 { margin: 0; font: 800 29px/1.05 var(--font-display); letter-spacing: -.065em; }
.display-empty-card p { margin: 14px 0 0; color: var(--display-soft); font-size: 13px; line-height: 1.6; }
.display-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.display-empty-card small { display: block; margin-top: 22px; color: #95a09c; font-size: 10px; }
.display-loading-card { display: grid; gap: 10px; color: var(--display-ink); }
.display-loading-card small { margin: 0; color: var(--display-soft); font-size: 11px; }
.display-loader { width: 30px; height: 30px; margin: 0 auto 4px; border: 3px solid #dfe8df; border-top-color: #80a78e; border-radius: 50%; animation: spin 720ms linear infinite; }

@media (max-width: 900px) {
  .display-header-context { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; }
  .display-header-context .display-live-dot { grid-row: span 2; }
  .display-header-context small { grid-column: 2; margin-top: 3px; }
  .display-notices { grid-template-columns: 1fr; }
  .display-people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .display-screen { padding: 15px 12px 35px; }
  .display-header { gap: 9px; }
  .display-brand-mark { width: 34px; height: 34px; }
  .display-brand strong { font-size: 15px; }
  .display-brand small, .display-header-context small, .display-header-context .display-live-dot { display: none; }
  .display-header-context { display: block; max-width: 110px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .display-header-actions { margin-left: auto; }
  .display-icon-btn { width: 35px; height: 35px; border-radius: 10px; }
  .display-app-btn-small { width: 35px; min-height: 35px; padding: 0; font-size: 0; border-radius: 10px; }
  .display-app-btn-small svg { width: 15px; height: 15px; }
  .display-intro { align-items: start; display: block; margin-top: 52px; }
  .display-intro h1 { margin-top: 10px; font-size: clamp(2.05rem, 11vw, 3.5rem); }
  .display-intro p { font-size: 12px; }
  .display-pending-card { display: inline-grid; min-width: 0; margin-top: 17px; padding: 10px 13px; text-align: left; }
  .display-pending-card span { font-size: 25px; }
  .display-pending-card small { margin-top: 3px; }
  .display-notice { grid-template-columns: 32px minmax(0, 1fr) 18px; gap: 10px; min-height: 200px; padding: 18px 16px; border-radius: 18px; }
  .display-notice-index { width: 29px; height: 29px; border-radius: 9px; font-size: 10px; }
  .display-notice-content strong { margin-top: 11px; font-size: 19px; }
  .display-notice-body { font-size: 12px; }
  .display-notice-footer { display: grid; gap: 7px; margin-top: 16px; }
  .display-progress { width: 100%; }
  .display-readers { margin-top: 18px; padding: 18px 14px; border-radius: 18px; }
  .display-readers-head { display: block; }
  .display-readers-head h2 { margin-top: 8px; font-size: 20px; }
  .display-reader-count { display: inline-flex; margin-top: 10px; }
  .display-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 17px; }
  .display-person { min-height: 66px; padding: 8px; gap: 7px; border-radius: 12px; }
  .display-avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 9px; }
  .display-person-copy strong { font-size: 10px; }
  .display-person-copy small { font-size: 8px; }
  .display-person-status { flex-basis: 14px; }
  .display-person-status svg { width: 13px; height: 13px; }
  .display-legend { display: grid; gap: 8px; margin-top: 17px; }
  .display-modal { padding: 25px 18px 20px; border-radius: 19px; }
  .display-empty-card, .display-loading-card { padding: 30px 21px; border-radius: 20px; }
  .display-empty-card h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .display-notice, .display-person, .display-app-btn, .display-outline-btn, .display-icon-btn { transition: none; }
  .display-loader { animation: none; }
}

/* Compact per-notice reader cards. They stay inside each message so the
   confirmation state is visible without opening a separate reader panel. */
.display-notice-people { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(23,59,55,.08); }
.display-mini-person { display: inline-flex; align-items: center; gap: 5px; width: auto; max-width: 136px; min-height: 30px; padding: 3px 7px 3px 4px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; color: var(--display-soft); background: transparent; font: inherit; text-align: left; }
.display-mini-person:not(:disabled) { cursor: pointer; }
.display-mini-person:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(23,59,55,.09); }
.display-mini-person.is-unread { border: 1px dashed #b8c1bd; color: #84918d; background: transparent; filter: grayscale(.65); }
.display-mini-person.is-read { border: 1px solid #a8cdb7; color: #2e604e; background: #ecf8ed; }
.display-mini-person.is-unavailable { border-color: #d8ddd8; color: #9ba6a2; background: #f1f2ee; }
.display-mini-person.is-reading { opacity: .55; }
.display-mini-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; color: var(--display-ink); background: #d9e9d0; font-size: 8px; font-weight: 900; }
.display-mini-person.is-unread .display-mini-avatar { background: #e4e7e1; }
.display-mini-person.is-read .display-mini-avatar { background: #c7e7cf; }
.display-mini-name { display: block; min-width: 0; overflow: hidden; font-size: 9px; font-weight: 900; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.display-mini-lock { display: grid; place-items: center; flex: 0 0 auto; color: #9ba6a2; }
.display-mini-lock svg { width: 12px; height: 12px; }
.display-notice-people .display-no-members { margin: 0; }

@media (max-width: 640px) {
  .modal.compose-modal:has(form#notice-form) { width: 100%; height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); padding: 20px 18px; border-radius: 18px; }
  .modal.compose-modal:has(form#notice-form) .modal-head h2 { font-size: 23px; }
  .modal.compose-modal:has(form#notice-form) .modal-head p { font-size: 12px; }
  .modal.compose-modal:has(form#notice-form) .compose-step-content { min-height: 220px; }
  .modal.compose-modal:has(form#notice-form) .form-field input,
  .modal.compose-modal:has(form#notice-form) .form-field textarea,
  .modal.compose-modal:has(form#notice-form) .form-field select { font-size: 16px; }
  .modal.compose-modal:has(form#notice-form) .rich-text-editor { min-height: 220px; max-height: 340px; font-size: 17px; }
  .modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .compose-step-content { gap: 7px; overflow: visible; }
  .modal.compose-modal:has(form#notice-form) #notice-form[data-compose-step="3"] .rich-text-editor { min-height: 110px; max-height: 145px; font-size: 16px; line-height: 1.5; }
  .compose-steps { gap: 3px; }
  .compose-steps li { grid-template-columns: 1fr; justify-items: center; gap: 3px; padding: 5px 3px; text-align: center; }
  .compose-steps li strong { max-width: 100%; font-size: 8px; }
  .compose-person-grid, .compose-unit-grid { grid-template-columns: 1fr; max-height: 300px; }
  .compose-step-content { min-height: 220px; }
  .compose-review-row { grid-template-columns: 84px minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .display-notice-people { flex-wrap: nowrap; margin-top: 13px; padding-top: 10px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: thin; }
  .display-mini-person { flex: 0 0 auto; max-width: 122px; }
}

@media (prefers-reduced-motion: reduce) {
  .display-mini-person { transition: none; }
}

/* Keep the display introduction informative without taking over the board. */
.display-intro {
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  margin-bottom: 18px;
}
.display-intro > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  column-gap: 16px;
  min-width: 0;
}
.display-intro .display-kicker {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  font-size: 8px;
}
.display-intro h1 {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: .98;
}
.display-intro p {
  max-width: 390px;
  padding-bottom: 2px;
  font-size: 11px;
  line-height: 1.35;
}
.display-pending-card {
  min-width: 92px;
  padding: 9px 12px;
  border-radius: 12px;
}
.display-pending-card span { font-size: 25px; }
.display-pending-card small { margin-top: 3px; font-size: 8px; }

@media (max-width: 900px) {
  .display-intro > div:first-child { grid-template-columns: 1fr; row-gap: 5px; }
  .display-intro p { grid-column: 1; max-width: 500px; padding-bottom: 0; }
}

@media (max-width: 640px) {
  .display-intro { margin-top: 22px; margin-bottom: 14px; }
  .display-intro h1 { font-size: clamp(1.7rem, 9vw, 2.45rem); }
  .display-intro p { font-size: 11px; }
  .display-pending-card { margin-top: 0; }
}

.display-language-control { position: relative; }
.display-language-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 48px; height: 42px; padding: 0 8px; border: 1px solid rgba(23,59,55,.12); border-radius: 12px; color: var(--display-soft); background: rgba(255,255,255,.58); font-size: 9px; font-weight: 900; }
.display-language-btn:hover, .display-language-btn[aria-expanded="true"] { color: var(--display-ink); border-color: rgba(23,59,55,.28); background: #fffdfa; }
.display-language-btn svg { width: 15px; height: 15px; }
.display-language-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 25; display: grid; gap: 3px; width: 184px; padding: 8px; border: 1px solid rgba(23,59,55,.12); border-radius: 13px; background: #fffdfa; box-shadow: 0 16px 36px rgba(23,59,55,.16); }
.display-language-menu-title { padding: 4px 8px 6px; color: var(--display-soft); font-size: 9px; font-weight: 900; }
.display-language-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 30px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--display-ink); background: transparent; text-align: left; }
.display-language-option:hover, .display-language-option.is-active { background: #edf6e8; }
.display-language-option > span { width: 23px; color: #47725e; font-size: 9px; font-weight: 900; }
.display-language-option small { color: var(--display-soft); font-size: 10px; font-weight: 800; }

@media (max-width: 640px) {
  .display-language-btn { width: 35px; height: 35px; border-radius: 10px; padding: 0 4px; }
  .display-language-btn svg { width: 13px; height: 13px; }
  .display-language-btn span { font-size: 8px; }
  .display-language-menu { right: -4px; }
}

/* Keep the home controls visible while the notices themselves can be browsed. */
.home-page-content .notice-list {
  max-height: clamp(260px, calc(100dvh - 300px), 760px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #bfd4c8 transparent;
  gap: 14px;
  padding: 10px 10px 14px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 18px;
  background: rgba(255, 253, 250, .42);
}

.home-page-content .notice-list::-webkit-scrollbar { width: 7px; }
.home-page-content .notice-list::-webkit-scrollbar-track { background: transparent; }
.home-page-content .notice-list::-webkit-scrollbar-thumb { border-radius: 999px; background: #bfd4c8; }
.home-page-content .notice-list::-webkit-scrollbar-thumb:hover { background: #9fbead; }

@media (max-width: 700px) {
  .home-page-content .notice-list {
    max-height: calc(100dvh - 255px);
    padding: 8px 6px 12px;
    border-radius: 15px;
  }
}

@media (max-height: 600px) {
  .home-page-content .notice-list { max-height: calc(100dvh - 250px); }
}

/* Bring the home content closer to the topbar. */
.home-page-content { margin-top: 34px; }

@media (max-width: 700px) {
  .home-page-content { margin-top: 28px; }
}

/* Let the notice list fill the remaining viewport without moving the topbar. */
.main-content-home {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 24px;
}

/* Subtle top illustration for the handover wall. It stays behind the UI,
   never captures pointer events, and uses the Japanese hero asset. */
.main-content-home::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  width: auto;
  height: clamp(165px, 20vw, 270px);
  background:
    linear-gradient(180deg, rgba(244, 243, 238, 0) 48%, rgba(244, 243, 238, .18) 68%, rgba(244, 243, 238, .86) 89%, #f4f3ee 100%),
    url('./assets/hero/moshiokuri-top-hero-japan.png') no-repeat center 32% / cover;
  content: '';
  opacity: .25;
  pointer-events: none;
}

.main-content-home > * { position: relative; z-index: 1; }

.main-content-home .home-page-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.main-content-home .home-page-content .notice-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

@media (max-width: 700px) {
  .main-content-home { padding-bottom: 16px; }
  .main-content-home::before {
    height: clamp(140px, 38vw, 190px);
    opacity: .18;
  }
}

/* Use wide screens better while keeping the layout fluid on smaller devices. */
.topbar,
.page-content {
  width: 100%;
  max-width: 1500px;
}

@media (max-width: 700px) {
  .topbar,
  .page-content {
    max-width: 100%;
  }

  .topbar-company-name { font-size: .95rem; }
}

@media (max-width: 540px) {
  .topbar { flex-wrap: wrap; row-gap: 5px; }
  .topbar-leading { order: 1; }
  .topbar-actions { order: 2; }
  .topbar-company-name {
    position: static;
    order: 3;
    flex: 0 0 100%;
    margin-top: -1px;
    color: #a91252;
    font-size: .88rem;
    text-align: center;
    transform: none;
  }
}

/* Clean responsive access screen: one focused surface without decorative imagery. */
.access-screen {
  grid-template-columns: 1fr;
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(22px, 5vw, 64px);
  overflow: auto;
  background:
    radial-gradient(circle at 12% 8%, rgba(166, 211, 197, .38), transparent 28rem),
    radial-gradient(circle at 88% 92%, rgba(242, 211, 111, .22), transparent 24rem),
    #f4f3ee;
}

.access-screen::before,
.access-screen::after { display: none; }

.access-shell {
  display: grid;
  gap: 26px;
  width: min(100%, 760px);
  margin: 0 auto;
}

.access-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.access-topbar .brand-note { color: var(--ink-soft); }
.access-language { border-color: #dfe3dd; color: var(--ink-soft); background: rgba(255, 253, 250, .78); }
.access-language strong { color: var(--ink); }
.access-language:hover { border-color: var(--mint-strong); color: var(--ink); background: var(--paper); }

.access-panel {
  width: min(100%, 540px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(32, 56, 68, .1);
  border-radius: 24px;
  background: rgba(255, 253, 250, .92);
  box-shadow: 0 24px 70px rgba(32, 56, 68, .12);
  backdrop-filter: blur(18px);
}

.access-panel::before { display: none; }
.access-panel h1 { margin: 0; font: 800 clamp(1.9rem, 4vw, 2.55rem)/1.05 var(--font-display); letter-spacing: -.07em; }
.access-panel > p[role="status"] { min-height: 22px; margin: 12px 0 28px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.access-panel .access-form > p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.access-panel .btn-block { width: 100%; }
.access-panel > .btn { width: 100%; margin-top: 16px; }
.access-footer { justify-content: center; color: var(--ink-soft); }
.access-footer .dot { background: var(--mint-strong); }

@media (max-width: 640px) {
  .access-screen { place-items: start center; padding: 16px; }
  .access-shell { gap: 18px; width: min(100%, 540px); }
  .access-topbar { align-items: flex-start; gap: 12px; }
  .access-panel { padding: 26px 20px 22px; border-radius: 20px; }
  .access-panel > p[role="status"] { margin: 10px 0 22px; font-size: 13px; }
  .access-footer { font-size: 11px; }
}

@media (max-width: 390px) {
  .access-topbar .brand-note { display: none; }
  .access-language { min-height: 34px; padding: 0 8px; }
  .access-language strong { font-size: 9px; }
  .access-panel { padding-inline: 17px; }
}

/* Keep login and first-access forms compact enough for short screens. */
.access-screen { padding-block: clamp(14px, 3vh, 34px); }
.access-shell { gap: 15px; }
.access-panel { padding: clamp(22px, 3vw, 34px); }
.access-panel h1 { font-size: clamp(1.8rem, 3.4vw, 2.35rem); }
.access-panel > p[role="status"] { margin: 9px 0 18px; font-size: 13px; }
.access-panel .access-form { gap: 10px; }
.access-panel .access-form > p { font-size: 13px; line-height: 1.4; }
.access-panel .form-field { gap: 5px; }
.access-panel .form-field label { font-size: 11px; }
.access-panel .form-field input { min-height: 42px; padding: 10px 12px; border-radius: 11px; }
.access-panel .form-field input::placeholder { color: #9aa9ad; opacity: 1; }
.access-panel .form-hint { font-size: 10px; line-height: 1.35; }
.access-panel > .btn { margin-top: 10px; }

@media (max-width: 640px) {
  .access-screen { padding: 12px 14px; }
  .access-shell { gap: 12px; }
  .access-panel { padding: 20px 17px 18px; }
  .access-panel > p[role="status"] { margin-bottom: 15px; }
  .access-panel .access-form { gap: 8px; }
  .access-panel .form-field input { min-height: 40px; padding-block: 9px; }
}

/* Toolbar inspired by the compact grouped reference control. */
.rich-text-editor-shell { overflow: visible; }
.rich-text-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  min-height: 52px;
  padding: 7px 9px;
  overflow-x: auto;
  border-bottom: 1px solid #e8edf2;
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fa 100%);
  scrollbar-width: thin;
}
.rich-text-tool-group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding-right: 7px;
}
.rich-text-tool-group + .rich-text-tool-group { padding-left: 7px; border-left: 1px solid #e2e8ee; }
.rich-text-tool {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 1px solid #e4eaf0;
  border-radius: 10px;
  color: #1d2c3b;
  background: rgba(255,255,255,.82);
  box-shadow: 0 2px 7px rgba(45, 67, 91, .07);
  font: 800 13px var(--font-body);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.rich-text-tool svg { width: 19px; height: 19px; }
.rich-text-tool:hover { border-color: #b8c9d9; color: #173b55; background: #fff; box-shadow: 0 4px 11px rgba(45, 67, 91, .12); transform: translateY(-1px); }
.rich-text-tool:focus-visible { outline: 3px solid rgba(126, 174, 220, .36); outline-offset: 2px; }
.rich-text-tool.is-active { border-color: #7eaedc; color: #183d62; background: #eaf3fd; box-shadow: inset 0 0 0 1px rgba(126,174,220,.24); }
.rich-text-tool.is-highlight { color: #172434; }
.rich-text-tool.is-highlight .rich-text-highlight-letter { text-decoration: underline 5px #f3d51c; text-underline-offset: 2px; }
.rich-text-color-letter { color: var(--tool-color); font-size: 18px; line-height: 1; }
.rich-heading-label { font-size: 16px; letter-spacing: -.08em; }
.rich-heading-label small { margin-left: 1px; font-size: 10px; vertical-align: 3px; }
.rich-clear-label { font-size: 16px; letter-spacing: -.12em; }
.rich-clear-label span { color: #c45a58; font-size: 13px; }
.rich-text-color-group .rich-text-tool { width: 32px; flex-basis: 32px; border-color: transparent; box-shadow: none; background: transparent; }
.rich-text-color-group .rich-text-tool:hover { border-color: #d8e1e9; background: #fff; }
.rich-text-insert-group .rich-text-tool[data-rich-command="video"] { color: #e3343a; }
.rich-text-insert-group .rich-text-tool[data-rich-command="video"]:hover { color: #c6202a; }
.rich-text-history-group .rich-text-tool { color: #506273; }
.rich-text-editor { border-radius: 0 0 10px 10px; }

@media (max-width: 640px) {
  .rich-text-toolbar { min-height: 58px; padding: 8px; gap: 8px; }
  .rich-text-tool { width: 40px; height: 40px; flex-basis: 40px; border-radius: 11px; }
  .rich-text-tool svg { width: 20px; height: 20px; }
  .rich-text-color-group .rich-text-tool { width: 36px; flex-basis: 36px; }
}

/* The first compose step uses a compact unit selector before the employee list. */
.compose-step-section { display: grid; gap: 8px; }
.compose-step-section + .compose-step-section { padding-top: 4px; border-top: 1px solid var(--line); }
.compose-inline-label { color: var(--ink); font-size: 14px; font-weight: 800; }
.compose-author-unit-picker { position: relative; display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--paper); cursor: pointer; transition: border 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.compose-author-unit-picker:focus-within { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(169, 223, 181, 0.26); }
.compose-author-unit-picker > svg:first-child { width: 17px; height: 17px; flex: 0 0 17px; color: var(--ink-soft); }
.compose-author-unit-picker .compose-author-unit-value { min-width: 0; flex: 1; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.compose-author-unit-picker select { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; min-width: 0; border: 0; outline: 0; padding: 0; opacity: 0; cursor: pointer; }
.compose-author-unit-picker > svg:last-child { width: 16px; height: 16px; flex: 0 0 16px; color: var(--ink-soft); pointer-events: none; }
.compose-step-section .compose-person-grid { max-height: 230px; }

@media (max-width: 640px) {
  .compose-author-unit-picker { min-height: 50px; }
  .compose-step-section .compose-person-grid { max-height: 260px; }
  .compose-selection-toolbar { align-items: flex-start; flex-direction: column; gap: 3px; }
}
