@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/manrope-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/manrope-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/manrope-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/manrope-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/manrope-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #07131f;
  --sidebar: #061019;
  --card: rgba(255, 255, 255, 0.035);
  --line: rgba(160, 201, 255, 0.16);
  --text: #f4f7fb;
  --muted: #c5d4e2;
  --faint: #9eb4c8;
  --sky: #a0c9ff;
  --blue: #1568a3;
  --danger: #ffb4ae;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --font: Manrope, Inter, sans-serif;
  --ui: Inter, Manrope, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(980px 520px at -10% -20%, rgba(21, 104, 163, 0.42), transparent 58%),
    radial-gradient(760px 460px at 110% -12%, rgba(14, 124, 120, 0.28), transparent 52%),
    radial-gradient(680px 420px at 80% 120%, rgba(15, 76, 129, 0.22), transparent 50%);
  background-attachment: fixed;
}
body.has-stars {
  background-image:
    radial-gradient(circle at 8% 14%, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 2.4px),
    radial-gradient(circle at 16% 62%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.72) 0 1.1px, transparent 2.2px),
    radial-gradient(circle at 33% 78%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.8px),
    radial-gradient(circle at 41% 18%, rgba(255, 255, 255, 0.9) 0 1.4px, transparent 2.8px),
    radial-gradient(circle at 48% 46%, rgba(255, 255, 255, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 57% 72%, rgba(255, 255, 255, 0.62) 0 1.1px, transparent 2.2px),
    radial-gradient(circle at 63% 22%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 58%, rgba(255, 255, 255, 0.85) 0 1.3px, transparent 2.6px),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 38%, rgba(255, 255, 255, 0.66) 0 1.1px, transparent 2.2px),
    radial-gradient(circle at 91% 68%, rgba(255, 255, 255, 0.58) 0 1px, transparent 2px),
    radial-gradient(circle at 12% 86%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 88%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.8px),
    radial-gradient(circle at 94% 84%, rgba(255, 255, 255, 0.75) 0 1.2px, transparent 2.4px),
    radial-gradient(980px 520px at -10% -20%, rgba(21, 104, 163, 0.42), transparent 58%),
    radial-gradient(760px 460px at 110% -12%, rgba(14, 124, 120, 0.22), transparent 52%),
    radial-gradient(680px 420px at 80% 120%, rgba(15, 76, 129, 0.18), transparent 50%);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
::selection { background: #1a6eae; color: white; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}
.login-hero {
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.logo-lockup { display: flex; align-items: center; gap: 14px; }
.logo-lockup img { height: 64px; width: auto; }
.logo-lockup strong { display: block; font-size: 28px; letter-spacing: -0.04em; }
.logo-lockup small {
  color: var(--faint);
  font-family: var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}
.login-hero h1 {
  margin: 28px 0 10px;
  max-width: 12ch;
  font-size: 58px;
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.login-hero .intro { max-width: 42ch; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.points li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.points i {
  width: 8px; height: 8px; border-radius: 99px; background: var(--sky); display: block; flex: none;
}
.deco { position: relative; height: 230px; margin-top: 36px; max-width: 520px; }
.deco .mark, .deco .sheet, .deco .glyph { position: absolute; }
.deco .a { left: 8px; top: 46px; transform: rotate(-8deg); }
.deco .b { left: 168px; top: 8px; transform: rotate(5deg); }
.deco .c { left: 318px; top: 78px; transform: rotate(-3deg); }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card {
  width: min(440px, 100%);
  background: rgba(8, 22, 36, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-card h2 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.login-card .lead { margin: 6px 0 18px; color: var(--muted); }
.stack { display: grid; gap: 8px; }
.stack[hidden] { display: none; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--faint); font-family: var(--ui); }
label.field[hidden] { display: none; }
input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="datetime-local"], textarea, select {
  width: 100%;
  background: #07131f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(160, 201, 255, 0.16); }
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--blue);
  color: white;
  font-family: var(--ui);
  font-weight: 650;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn:hover { background: #1b78bb; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.secondary, .btn.ghost {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.secondary:hover, .btn.ghost:hover { border-color: rgba(160, 201, 255, 0.45); background: rgba(255, 255, 255, 0.03); }
.btn.danger { background: transparent; box-shadow: none; border: 1px solid rgba(255, 180, 174, 0.45); color: var(--danger); }
.btn.full { width: 100%; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.demo { margin-top: 18px; color: var(--muted); }
.demo summary { cursor: pointer; font-size: 14px; color: #d5e4f2; }
.demo p { margin: 10px 0; font-size: 14px; line-height: 1.45; }
code.pw {
  font-family: var(--ui);
  background: #07131f;
  border-radius: 7px;
  padding: 1px 6px;
  color: white;
}
.accounts { display: grid; gap: 6px; }
.account {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
}
.account span { min-width: 0; }
.account strong, .account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account:hover { border-color: rgba(160, 201, 255, 0.45); }
.account strong, .account small { display: block; }
.account small { color: var(--faint); font-size: 12px; }
.local-note { margin: 14px 0 0; color: var(--faint); font-size: 12px; }

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.sidebar {
  background: rgba(6, 16, 25, 0.92);
  border-right: 1px solid rgba(160, 201, 255, 0.1);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 4px 8px 8px;
  text-align: left;
}
.brand img { height: 40px; width: auto; max-width: 168px; object-fit: contain; object-position: left center; }
.brand strong:empty { display: none; }
.brand span { min-width: 0; }
.brand strong { display: block; font-size: 16px; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small {
  color: var(--faint);
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker {
  margin: 12px 10px 6px;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fb4d6;
}
.nav { display: flex; flex-direction: column; gap: 4px; overflow: auto; padding-bottom: 8px; flex: 1; }
.kicker.in-nav { margin-left: 10px; margin-right: 10px; }
.nav-btn {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  font-weight: 650;
  font-size: 14.5px;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.04); }
.nav-btn.is-active { background: rgba(160, 201, 255, 0.12); }
.nav-btn .dot { width: 10px; height: 10px; border-radius: 99px; flex: none; }
.nav-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; }
.me { display: flex; gap: 10px; align-items: center; padding: 4px 6px 8px; }
button.me {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}
button.me:hover { background: rgba(255, 255, 255, 0.05); }
.me strong, .me em { display: block; font-style: normal; }
.me em { color: var(--faint); font-size: 12px; font-family: var(--ui); }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.side-actions .wide { grid-column: 1 / -1; }

.main { min-width: 0; min-height: 0; height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(160, 201, 255, 0.08);
}
.topbar .crumbs { flex: 1 1 180px; }
.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 280px;
  min-width: 180px;
}
.meter[hidden] { display: none; }
.meter-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.meter-track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(160, 201, 255, 0.16);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #7eabf0;
}
.meter.is-tight .meter-fill { background: #e2b657; }
.license-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(160, 201, 255, 0.1);
}
.license-line .bill-row { margin-top: 0; flex: 1 1 220px; }
.topbar input[type="search"] { width: min(240px, 100%); flex: none; }
.actions { margin-left: auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.crumb, .sep { background: transparent; border: 0; color: var(--faint); padding: 4px; font-size: 14px; }
.crumb.current { color: var(--text); font-weight: 700; }
button.crumb:hover { color: white; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.body { flex: 1; min-height: 0; overflow: auto; padding: 8px 22px 48px; }
.hello { margin: 18px 0 18px; }
.hello h1 { margin: 0; font-size: 40px; letter-spacing: -0.045em; font-weight: 800; }
.hello p { margin: 8px 0 0; color: var(--muted); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}
.section-head .section-title { margin: 0; }
.filter { display: inline-flex; gap: 4px; }
.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--faint);
  border-radius: 999px;
  padding: 3px 8px;
  font-family: var(--ui);
  font-size: 11px;
}
.filter-btn.is-on {
  color: var(--text);
  border-color: rgba(160, 201, 255, 0.5);
  background: rgba(160, 201, 255, 0.12);
}
.profile-preview { display: flex; align-items: center; gap: 12px; }
.section-title {
  margin: 18px 0 12px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ec0dc;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
  gap: 14px;
}
.main, .body, .content { min-width: 0; }
.card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 236px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  color: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.card:hover { z-index: 2; transform: translateY(-3px); border-color: rgba(160, 201, 255, 0.42); background: rgba(255, 255, 255, 0.05); }
.card.is-folder { box-shadow: inset 5px 0 0 #1d6eae; }
.card.is-file { box-shadow: inset 5px 0 0 var(--accent, #3d5a80); }
.card.is-selected { border-color: var(--sky); box-shadow: inset 5px 0 0 var(--accent, #1d6eae), 0 0 0 1px var(--sky); }
.card.is-drop, .body.is-hot { border-color: var(--sky); box-shadow: inset 0 0 0 1px var(--sky); }
.icon-slot { height: 112px; width: 100%; display: grid; place-items: center; }
.card-name {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta, .quiet { color: var(--faint); font-size: 13px; font-family: var(--ui); }
.card-foot { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
button.chip { border: 0; }
.nav-btn span { min-width: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(160, 201, 255, 0.1);
  color: var(--sky);
  font-family: var(--ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.faces { display: flex; align-items: center; }
.face {
  position: relative;
  width: 26px;
  height: 26px;
  margin-left: -6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 0 0 2px #0b1a28;
  background-position: center;
  background-size: cover;
}
.faces .face:hover, .faces .face:focus-visible { z-index: 3; }
.face .tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  max-width: 180px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #12324a;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
.face:hover .tip, .face:focus-visible .tip { opacity: 1; }
.faces .face:first-child, .me .face { margin-left: 0; }
.face.more { background: #12324a; color: var(--sky); }

.mark {
  width: 84px;
  height: 98px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 24px rgba(0, 0, 0, 0.22);
}
.mark-letters { font-weight: 800; font-size: 28px; letter-spacing: -0.04em; line-height: 1; }
.mark-badge {
  background: rgba(7, 19, 31, 0.28);
  border-radius: 999px;
  padding: 4px 7px;
  font-family: var(--ui);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.sheet {
  width: 84px;
  height: 104px;
  position: relative;
  flex: none;
  background: linear-gradient(180deg, #f7fafc 0%, #e7eef5 100%);
  border-radius: 8px 16px 10px 10px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.sheet-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, transparent 50%, #c5d2e0 50%);
}
.sheet-lines {
  position: absolute;
  left: 12px;
  right: 16px;
  top: 28px;
  display: grid;
  gap: 6px;
}
.sheet-lines i {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: rgba(16, 32, 51, 0.18);
}
.sheet-lines i:nth-child(2) { width: 86%; }
.sheet-lines i:nth-child(3) { width: 58%; }
.sheet-type {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 4px;
  background: var(--sheet, #3d5a80);
  color: white;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1;
}
.sheet.is-custom, .glyph.is-custom {
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: grid;
  place-items: center;
}
.sheet.is-custom img, .glyph.is-custom img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.glyph-kind {
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0 6px;
  text-align: center;
}
.glyph-kind.is-long { font-size: 13px; letter-spacing: 0; }
.result .glyph-kind, .name-row .glyph-kind { font-size: 12px; letter-spacing: 0.02em; }
.field small { display: block; margin-top: 6px; color: var(--faint); font-size: 12px; font-weight: 500; }
.glyph { width: 92px; height: 74px; position: relative; }
.glyph-tab, .glyph-body { background: var(--folder, #1568a3); }
.glyph-tab {
  position: absolute; left: 8px; top: 0; width: 36px; height: 14px;
  border-radius: 8px 10px 0 0;
}
.glyph-body {
  position: absolute; inset: 12px 0 0 0;
  border-radius: 8px 16px 16px 16px;
  display: grid; place-items: center;
  color: white;
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: inset 0 -14px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.note {
  background: rgba(160, 201, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: #d5e4f2;
  margin-bottom: 8px;
}
.empty {
  border: 1px dashed rgba(160, 201, 255, 0.32);
  border-radius: 22px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty strong { display: block; color: var(--text); font-size: 22px; margin-bottom: 6px; }
.content.with-drawer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}
.drawer {
  position: sticky;
  top: 8px;
  min-width: 0;
  background: #0c1c2e;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.drawer h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  background: #07131f;
}
iframe.preview { height: 320px; border: 0; }
.text-preview {
  margin: 0;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  background: #07131f;
  border-radius: 14px;
  padding: 12px;
  font-family: var(--ui);
  font-size: 13px;
  line-height: 1.5;
}
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { margin: 0; color: var(--faint); font-size: 13px; }

.result {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  color: inherit;
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 8px;
}
.result .mark { width: 56px; height: 66px; border-radius: 14px; }
.result .mark-letters { font-size: 18px; }
.result .sheet { width: 48px; height: 62px; }
.result .sheet-type { font-size: 11px; padding: 4px 2px; }
.result .sheet-lines { top: 14px; gap: 4px; }
.result .glyph { width: 68px; height: 54px; transform: none; }
.result strong, .result small { display: block; overflow-wrap: anywhere; }
.result small { color: var(--faint); }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 8, 14, 0.64);
  display: grid;
  place-items: center;
  padding: 24px;
}
.dialog {
  width: min(560px, 100%);
  max-height: min(86vh, 840px);
  overflow: auto;
  background: #0d2133;
  border: 1px solid rgba(160, 201, 255, 0.2);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.dialog.wide { width: min(780px, 100%); }
.dialog h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.dialog .lead { margin: 0 0 16px; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.name-list { display: grid; gap: 12px; }
.name-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: center; }
.name-row .mark { width: 64px; height: 74px; border-radius: 14px; }
.name-row .mark-letters { font-size: 20px; }
.name-row .sheet { width: 58px; height: 74px; }
.name-row .sheet-type { font-size: 11px; padding: 5px 2px; }
.name-row .glyph { width: 74px; height: 58px; }
.name-row small { display: block; margin-top: 6px; color: var(--faint); overflow-wrap: anywhere; }
.person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(160, 201, 255, 0.1);
}
.person { display: flex; gap: 10px; align-items: center; min-width: 0; }
.person strong, .person .card-meta { display: block; }
.seg { display: flex; flex-wrap: wrap; background: #07131f; border-radius: 11px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button {
  border: 0;
  background: transparent;
  color: var(--faint);
  border-radius: 8px;
  padding: 7px 8px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
}
.seg button.is-on { background: var(--blue); color: white; }
.seg button:disabled { opacity: 0.7; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.team-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(160, 201, 255, 0.1);
}
.team-row .card-meta { margin-top: 2px; }
.quota {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--faint);
  font-size: 13px;
}
.quota input { width: 88px; padding: 8px 10px; }
.drop-banner {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 30;
  background: #12324c;
  border: 1px solid rgba(160, 201, 255, 0.45);
  color: white;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.drop-banner.is-blocked { border-color: rgba(255, 180, 174, 0.7); color: #ffd7d3; }
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 70;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #12324c;
  border: 1px solid rgba(160, 201, 255, 0.35);
  color: white;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

@keyframes stamp {
  0% { transform: scale(1.22) rotate(-7deg); opacity: 0; }
  62% { transform: scale(0.96) rotate(1deg); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.card.is-fresh .mark, .card.is-fresh .sheet, .card.is-fresh .glyph { animation: stamp 0.55s cubic-bezier(.2, 1.25, .4, 1) both; }
@keyframes floaty {
  from { translate: 0 0; }
  to { translate: 0 -8px; }
}
.deco .mark, .deco .sheet, .deco .glyph { animation: floaty 4.5s ease-in-out infinite alternate; }
.deco .b { animation-delay: -1.4s; }
.deco .c { animation-delay: -2.4s; }

.time-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 8px 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}
.time-card strong { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.time-card p { margin: 4px 0 0; }
.time-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.bill-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 12px; }
.bill-row .field { flex: 1 1 180px; margin: 0; }
.time-list { display: grid; gap: 8px; }
.time-row, .suggestion {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.suggestions { display: grid; gap: 8px; margin-bottom: 18px; }
.suggestion p { margin: 4px 0 0; color: var(--faint); font-size: 13px; }
.row-hello { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.month-nav { display: flex; gap: 8px; }
.agenda { display: none; }
.weekdays, .month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays { margin-bottom: 6px; color: var(--faint); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.weekdays span, .day { min-width: 0; }
.day {
  min-height: 92px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
}
.day.is-out { background: transparent; cursor: default; }
.day.has { border-color: var(--line); }
.day.is-closed {
  background: rgba(176, 48, 42, 0.32);
  border-color: rgba(255, 170, 162, 0.55);
}
.day-num {
  display: block;
  margin-bottom: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.holiday-name {
  display: block;
  color: #ffc7c2;
  font-size: 11px;
  line-height: 1.25;
}
.event-pill {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: #3d5a80;
  color: white;
  text-align: left;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-pill[data-category="team"] { background: #1568a3; }
.event-pill[data-category="talk"] { background: #0e7c86; }
.event-pill[data-category="external"] { background: #8a5a12; }
.event-pill[data-category="vacation"] { background: #2f6b4f; }
.team-time { margin-top: 28px; display: grid; gap: 12px; }
.day-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.time-row.is-off { opacity: 0.62; }
.mark-list { display: grid; gap: 8px; }
.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.design-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.design-preview-slot {
  height: 120px;
  display: grid;
  place-items: center;
}
.design-preview {
  max-width: 104px;
  max-height: 104px;
  object-fit: contain;
}
.design-card input[type="file"] { max-width: 100%; font-size: 12px; color: var(--muted); }
.design-card .time-actions { justify-content: flex-start; }
.space-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.space-tabs button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.space-tabs button.is-on { background: var(--blue); border-color: transparent; color: white; }
.format-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 16px; }
.format-add .field { margin: 0; min-width: 180px; }
.sky-form { margin-bottom: 22px; }
.sky-form .time-actions { justify-content: flex-start; flex-wrap: wrap; }
.mark-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.swatch { width: 16px; height: 16px; border-radius: 6px; flex: 0 0 auto; }
.otp { margin-top: 4px; color: var(--sky); }
.otp-big {
  margin: 8px 0 0;
  font-size: 32px;
  letter-spacing: 0.12em;
  font-weight: 750;
}
.check-grid { display: grid; gap: 8px; }
.db-form {
  max-width: 720px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.card .btn { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 32px 24px 0; }
  .login-hero h1 { font-size: 42px; }
  .deco { display: none; }
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .main { height: auto; }
  .sidebar { border-right: 0; border-bottom: 1px solid rgba(160, 201, 255, 0.1); }
  .person-row { grid-template-columns: minmax(0, 1fr); }
  .topbar, .content.with-drawer { grid-template-columns: 1fr; }
  .drawer { position: static; }
  .hello h1 { font-size: 32px; }
  .time-card, .row-hello, .suggestion, .time-row { display: grid; }
  .day { min-height: 72px; padding: 4px; }
  .event-pill, .holiday-name { font-size: 10px; }
  .agenda { display: grid; gap: 8px; margin-top: 14px; }
}
