:root {
  --ink: #1c1915;
  --ink-soft: #4a433b;
  --muted: #7d7468;
  --paper: #f3eee6;
  --paper-2: #fffdf8;
  --line: #e3d9cb;
  --pine: #1f6a4a;
  --pine-deep: #143d2d;
  --sidebar: #17241f;
  --seal: #c44536;
  --gold: #a67c3d;
  --gold-soft: #f3e6cf;
  --ok: #1d6b45;
  --warn: #8a5a10;
  --shadow: 0 18px 40px rgba(48, 36, 20, 0.08);
  --sans: "Pretendard", "Malgun Gothic", sans-serif;
  --serif: "Nanum Myeongjo", "Batang", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
html { height: 100dvh; }
body {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.01em;
  overflow: hidden;
}
#app { height: 100%; min-height: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
svg { width: 15px; height: 15px; display: block; }

.login {
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
}
.login-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(243, 230, 207, 0.16), transparent 28%),
    linear-gradient(165deg, #1b3b30 0%, #12261f 55%, #1a1814 100%);
  color: #f6f1e8;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.brand-lockup { display: flex; gap: 14px; align-items: center; }
.mark {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  border: 1.5px solid #e7d3a8;
  color: #f3e2c2;
  font-family: var(--serif);
  font-size: 24px;
  background: rgba(255, 255, 255, 0.03);
}
.brand-lockup h1 { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -0.04em; }
.brand-lockup p, .login-hero .lead { margin: 4px 0 0; color: #d9d0c3; }
.login-hero .lead { font-size: 14px; line-height: 1.5; max-width: 460px; }
.login-board {
  width: min(520px, 100%);
  max-height: min(46vh, 420px);
  overflow: auto;
  margin: 8px 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(231, 211, 168, 0.4);
}
.login-board h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: -0.03em; }
.login-board article { padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.login-board article:first-of-type { border-top: 0; padding-top: 0; }
.login-board strong { display: block; }
.login-board p {
  margin: 4px 0;
  color: #efe7db;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.login-board small, .login-board-empty { color: #d9d0c3; font-size: 12px; }
.login-board-empty { margin: 0; }
.post-list { display: grid; gap: 12px; margin-top: 12px; }
.post-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.post-card h2 { margin: 0; font-size: 16px; }
.post-card p { white-space: pre-wrap; margin: 8px 0; }
.post-card small { color: var(--muted); }
.feature-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.feature-list li {
  display: flex; gap: 10px; align-items: center;
  color: #efe7db;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: #e7d3a8; flex: 0 0 auto;
}
.login-panel { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(440px, 100%); }
.login-card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.04em; }
.sub { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.account {
  text-align: left; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.account:hover { border-color: #c9b89a; }
.account b { display: block; }
.account span { color: var(--muted); font-size: 12px; }
.login-actions { display: grid; gap: 8px; }
.login-actions .btn { width: 100%; }
.form-ok {
  background: #e7f3ec; color: #1d5c3d; border-radius: 10px;
  padding: 8px 10px; margin-bottom: 10px; font-size: 12px;
}
.form-error {
  background: #fdeceb; color: var(--seal); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 10px; font-size: 12px;
}

.shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(168px, 15vw, 200px) minmax(0, 1fr);
}
.side {
  background: var(--sidebar); color: #efe8dc;
  display: flex; flex-direction: column; padding: 12px 8px 10px;
  min-width: 0; min-height: 0; overflow: auto;
}
.side-brand { display: flex; gap: 8px; align-items: center; padding: 2px 6px 10px; }
.side-brand .mark { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.side-brand strong { display: block; font-size: 14px; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: white; flex: 0 0 auto; }
.brand-logo.large, .brand-lockup .brand-logo { width: 52px; height: 52px; border-radius: 12px; }
.org-logo { width: 18px; height: 18px; object-fit: contain; }
.side-brand span { color: #b7c2ba; font-size: 11px; }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.menu-tree { display: flex; flex-direction: column; gap: 2px; }
.menu-tree button, .tree-children a {
  color: inherit; text-decoration: none; border-radius: 8px;
  padding: 5px 8px; display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0; font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.menu-tree button:hover, .tree-children a:hover { background: rgba(255, 255, 255, 0.05); }
.tree-children { display: flex; flex-direction: column; }
.side .tree-children a, .side .tree-children .menu-tree > button { padding-left: 28px; }
.side .tree-children .tree-children a { padding-left: 46px; }
.menu-tree button.active { background: rgba(243, 230, 207, 0.12); color: #fff; }
.tree-children a.active { background: rgba(243, 230, 207, 0.12); color: #fff; }
.menu-tree .caret { margin-left: auto; color: #b7c2ba; font-style: normal; }
.side a {
  color: inherit; text-decoration: none; border-radius: 8px;
  padding: 5px 8px; display: flex; align-items: center; gap: 8px;
  position: relative;
}
.side a:hover { background: rgba(255, 255, 255, 0.05); }
.side a.active { background: rgba(243, 230, 207, 0.12); color: #fff; }
.side a.active::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  border-radius: 3px; background: #e7d3a8;
}
.badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--seal); color: white;
  font-style: normal; font-size: 11px; display: grid; place-items: center;
}
.me {
  margin-top: auto; display: flex; gap: 8px; align-items: center;
  padding: 12px 8px 4px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px;
  background: #23483a; color: #f3e2c2; font-weight: 700;
}
.me div { min-width: 0; }
.me b, .me small { display: block; }
.me small { color: #b7c2ba; font-size: 11px; }
.me a { color: #d7c4a2; font-size: 11px; }
.me button {
  margin-left: auto; border: 0; background: transparent; color: #d9d0c3; cursor: pointer;
}

.main {
  container-type: inline-size;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 24px;
}
.page-head, .row-between { display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.page-head h1, .block-title { margin: 0; font-size: 18px; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.eyebrow { margin: 0 0 2px; color: var(--gold); font-size: 11px; font-weight: 700; }
.sub { font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 8px; margin: 10px 0; }
.leave-mine { margin: 8px 0 0; }
.leave-mine h2 { margin: 0; font-size: 13px; }
.leave-mine .stats { margin-bottom: 0; }
.stat, .card, .panel {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
}
.stat { padding: 8px 10px; text-decoration: none; color: inherit; display: block; }
button.stat { font: inherit; text-align: left; cursor: pointer; width: 100%; }
button.stat:disabled { cursor: default; opacity: 0.72; }
.stat:hover { border-color: #d3c3a8; }
.stat span { color: var(--muted); font-size: 11px; }
.stat strong { display: block; margin-top: 2px; font-size: 18px; letter-spacing: -0.04em; line-height: 1.2; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip, .type-switch a, .tabs a {
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  border-radius: 999px; padding: 4px 9px; text-decoration: none; cursor: pointer; font-size: 12px;
}
.type-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.type-switch a.on, .tabs a.on { background: var(--pine); color: white; border-color: var(--pine); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.leave-board { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px; align-items: start; }
.leave-org { display: flex; flex-direction: column; gap: 4px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.leave-org button { border: 0; background: transparent; text-align: left; border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--ink); }
.leave-org button.on, .leave-org button:hover { background: #e7f0ea; }
.leave-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.leave-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 12px; }
.leave-panes h2 { margin: 0; padding: 12px 14px 0; font-size: 16px; }
.leave-panes .table-wrap, .leave-panes .empty { margin: 8px; }
table.data tr.on td { background: #e7f2eb; }
.leave-panes input { min-width: 7.5rem; width: 100%; }
.leave-panes td, .tenure-table td { white-space: nowrap; }
.tenure-panel { margin: 0 0 14px; padding: 14px 16px; }
.tenure-panel h2 { margin: 0; font-size: 18px; }
.tenure-wrap { max-height: 280px; overflow: auto; margin-top: 8px; }
.tenure-table input { width: 4.5rem; padding: 6px 8px; }
.text-btn { border: 0; background: transparent; color: var(--pine); padding: 0; cursor: pointer; font: inherit; }
.row-actions { white-space: nowrap; }
input[readonly] { background: #f6f1e8; color: var(--ink-soft); }
.panel { padding: 10px 12px; }
.panel h2 { margin: 0 0 8px; font-size: 14px; }
.link-list { display: grid; gap: 6px; }
.link-list a {
  text-decoration: none; color: inherit; display: grid; grid-template-columns: auto 1fr auto;
  gap: 8px; align-items: center; padding: 8px; border-radius: 10px;
}
.link-list a:hover { background: #f7f3ec; }
.link-list span { color: var(--muted); font-size: 12px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { width: auto; flex: 1 1 180px; min-width: 0; max-width: 100%; }
.table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 16px; background: var(--paper-2); }
table.data { width: 100%; border-collapse: collapse; min-width: 0; font-size: 12px; }
table.data th, table.data td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
table.data th { font-size: 11px; color: var(--muted); font-weight: 700; background: #faf7f2; white-space: nowrap; }
table.data tr[data-href] { cursor: pointer; }
table.data tr[data-href]:hover td { background: #fbf8f3; }
table.data td.title { font-weight: 650; }
.pill, .type {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 3px 8px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill.draft { background: #ece7df; color: #5c564c; }
.pill.pending { background: #f8ecd4; color: var(--warn); }
.pill.approved { background: #e5f2ea; color: var(--ok); }
.pill.rejected { background: #f8e4e1; color: var(--seal); }
.pill.circulated { background: #e6eef6; color: #2d5278; }
.type.expense { background: #f8e8e4; color: #8d342c; }
.type.proposal { background: #f8efdd; color: #7d5a1e; }
.type.journal { background: #e5f0f4; color: #21596d; }
.type.draft { background: #e6f2eb; color: #1d6b45; }
.type.circular { background: #eeeaf6; color: #53407a; }
.type.outgoing { background: #e7eef8; color: #27456f; }
.type.incoming { background: #f3eee4; color: #6d5424; }
.type.leave { background: #e5f4f1; color: #1d6a62; }
.kind-block { display: grid; gap: 8px; margin-bottom: 12px; }
.kind-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: start; }
.kind-row > span { font-size: 13px; font-weight: 750; padding-top: 8px; }
.kind-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; background: #f7f4ee; border-radius: 12px; padding: 8px 12px; }
.kind-bar label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.kind-bar input { width: auto; }
.leave-title { margin: 4px 0 8px; text-align: center; font-family: var(--serif); font-size: clamp(16px, 2vw, 22px); color: #2d6f9f; font-weight: 700; }
.cabinets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 12px; margin-top: 16px; }
.cabinet-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 14px; box-shadow: var(--shadow); min-width: 0;
}
.cabinet-card:hover { border-color: #d3c3a8; }
.cabinet-card span { color: var(--gold); font-size: 12px; font-weight: 700; }
.cabinet-card b { display: block; margin-top: 4px; font-size: 14px; letter-spacing: -0.03em; }
.cabinet-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.cabinet-card strong { display: block; margin-top: 8px; font-size: 18px; letter-spacing: -0.04em; }
.eyebrow a { color: inherit; }

.btn, button.btn {
  border: 1px solid transparent; background: #efe8dc; color: var(--ink);
  border-radius: 8px; padding: 5px 10px; cursor: pointer; text-decoration: none; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 650;
}
.btn:hover { filter: brightness(0.98); }
.btn-primary { background: var(--pine); color: white; }
.btn-seal { background: var(--seal); color: white; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: transparent; border-color: #efc7c2; color: var(--seal); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.field > span, .picker header b { font-size: 12px; font-weight: 750; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 8px;
  padding: 6px 8px;
}
.date-field { position: relative; display: block; width: 100%; min-width: 0; }
.date-field input { padding-right: 32px; }
.date-cal {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  display: grid; place-items: center;
}
.date-cal:hover { background: #f3eee6; color: var(--ink); }
.date-pop {
  position: fixed; z-index: 40; width: 280px; padding: 10px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(28, 25, 21, 0.18);
}
.date-pop-head, .date-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.date-pop-head b { font-size: 14px; }
.date-pop-head button, .date-pop-foot button {
  border: 1px solid var(--line); background: white; border-radius: 8px; cursor: pointer; color: var(--ink);
}
.date-pop-head button { width: 28px; height: 28px; padding: 0; font-size: 16px; }
.date-pop-foot { margin-top: 8px; }
.date-pop-foot button { padding: 4px 10px; font-size: 12px; }
.date-pop-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 8px; text-align: center; }
.date-pop-grid .dow { color: var(--muted); font-size: 11px; padding: 4px 0; }
.date-pop-grid > :nth-child(7n+1) { color: #b42318; }
.date-pop-grid > :nth-child(7n) { color: #1d4e89; }
.date-pop-grid .day {
  height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.date-pop-grid .day:hover { background: #f3eee6; }
.date-pop-grid .day.out { color: #c4baae; }
.date-pop-grid .day.today { box-shadow: inset 0 0 0 1px var(--pine); }
.date-pop-grid .day.on { background: var(--pine); color: white; }
.time-pop {
  position: fixed; z-index: 40; width: 220px; padding: 10px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(28, 25, 21, 0.18);
}
.time-pop-head { text-align: center; margin-bottom: 8px; }
.time-pop-head b { font-size: 14px; letter-spacing: 0.04em; }
.time-pop-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-pop-cols span { display: block; text-align: center; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.time-pop-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; max-height: 180px; overflow: auto; }
.time-pop-list button {
  height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
}
.time-pop-list button:hover { background: #f3eee6; }
.time-pop-list button.on { background: var(--pine); color: white; }
textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.compose, .doc-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 18px; align-items: start; }
.preview-wrap, .doc-side { position: sticky; top: 12px; }
.picker { border: 1px dashed #d9cdb8; border-radius: 14px; padding: 12px; margin: 12px 0; background: #fffaf3; }
.picker header p, .muted, .empty p { color: var(--muted); margin: 4px 0 0; }
.picker ol { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.picker li, .inline, .file-row, .check-list label {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.inline select { flex: 1 1 160px; width: auto; min-width: 0; }
.inline input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.cancel-list { display: grid; gap: 8px; }
.cancel-item {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white;
}
.cancel-item input { width: auto; flex: 0 0 auto; margin-top: 3px; }
.cancel-item em { color: var(--muted); font-style: normal; font-size: 12px; }
.picker li { background: white; border-radius: 10px; padding: 8px; }
.picker li div { flex: 1; min-width: 0; }
.picker li span, .file-row small { color: var(--muted); font-size: 12px; }
.picker li em {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pine); color: white; font-style: normal; font-size: 12px;
}
.picker button, .mini {
  border: 1px solid var(--line); background: white; border-radius: 8px; padding: 6px 8px; cursor: pointer;
}
.item-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(72px, 0.5fr) minmax(88px, 0.7fr) auto auto; gap: 8px; margin-bottom: 8px; }
.item-row b { align-self: center; font-size: 13px; white-space: nowrap; }
.card-pad { padding: 10px 12px; }
.banner {
  border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
  background: #f8ecd4; color: #6d4a0d;
}
.banner.bad { background: #f8e4e1; color: #8d342c; }
.banner strong { display: block; margin-bottom: 4px; }

.paper {
  position: relative; background: white; color: #221e19;
  border: 1px solid #ddd4c6; outline: 1px solid #ddd4c6; outline-offset: -7px;
  padding: clamp(16px, 3vw, 28px) clamp(14px, 2.4vw, 26px) 36px;
  box-shadow: var(--shadow); overflow: auto; max-width: 100%;
}
.paper::after {
  content: "결재모아"; position: absolute; right: 22px; bottom: 16px;
  font-family: var(--serif); font-size: 42px; color: rgba(31, 106, 74, 0.06); pointer-events: none;
}
.paper-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; min-width: 0; }
.org { margin: 0; color: var(--pine); font-size: 12px; font-weight: 750; letter-spacing: 0.08em; display: flex; align-items: center; gap: 6px; }
.paper h2 {
  font-family: var(--serif); font-weight: 700;
  letter-spacing: clamp(0.08em, 1.1vw, 0.28em);
  margin: 6px 0 0; font-size: clamp(16px, 2vw, 22px);
  overflow-wrap: anywhere;
}
.sign-scroll { max-width: 100%; overflow-x: auto; margin-left: auto; }
.signs { border-collapse: collapse; font-size: 12px; width: max-content; max-width: 100%; }
.signs th, .signs td { border: 1px solid #cfc5b6; min-width: 64px; text-align: center; padding: 4px; }
.signs th { background: #faf7f2; font-weight: 650; }
.signs .slot { height: 74px; vertical-align: middle; }
.stamp {
  width: 48px; height: 48px; margin: 0 auto; border: 2px solid var(--seal); color: var(--seal);
  border-radius: 50%; display: grid; place-items: center; font-family: var(--serif);
  transform: rotate(-14deg); font-size: 13px; font-weight: 700; letter-spacing: -0.04em;
}
.stamp.wait { border-color: var(--gold); color: var(--gold); transform: none; font-family: var(--sans); font-size: 11px; }
.signs img.seal-img, .seal-preview img.seal-img { width: 52px; height: 52px; object-fit: contain; }
.signs img.sign-img, .seal-preview img.sign-img { width: 78px; height: 36px; object-fit: contain; }
.seal-preview { min-height: 64px; display: grid; place-items: center; margin: 8px 0 12px; background: white; border: 1px dashed var(--line); border-radius: 12px; }
.seal-choice { display: flex; gap: 16px; margin-bottom: 12px; }
.seal-choice label { display: flex; gap: 6px; align-items: center; }
.seal-choice input { width: auto; }
.line-launch { margin-left: auto; align-self: flex-end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 16px; }
.line-launch-item { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
.line-launch p { margin: 0; color: var(--muted); font-size: 13px; max-width: 16rem; text-align: right; }
.line-dialog {
  width: min(1080px, 100%); height: min(86dvh, 760px);
  background: var(--paper-2); border-radius: 18px; padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.line-dialog > header b { font-size: 16px; }
.line-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 148px minmax(200px, 0.9fr) minmax(340px, 1.45fr); gap: 10px; }
.line-pane { border: 1px solid var(--line); border-radius: 12px; background: white; min-width: 0; min-height: 0; overflow: auto; padding: 8px; }
.line-pane .table-wrap { border: 0; border-radius: 0; background: transparent; }
.line-table { min-width: 0 !important; }
.line-pane:last-child .line-table { min-width: 0 !important; }
.line-table th, .line-table td { padding: 6px 4px; font-size: 12px; white-space: nowrap; }
.line-table tr.blank td { height: 32px; }
.line-table select { width: auto; min-width: 76px; padding: 4px 4px; font-size: 12px; }
.line-table .order { white-space: nowrap; }
.line-table .order button, .line-table td > button {
  width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); background: white; border-radius: 6px; cursor: pointer;
}
.line-table tr[data-action] { cursor: pointer; }
.line-table tr[data-action]:hover td { background: #f3f7f4; }
.line-search { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.line-search label { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; font-size: 13px; font-weight: 750; }
.line-search input { width: auto; flex: 1; min-width: 0; padding: 8px 10px; }
.pane-title { margin: 0 0 8px; font-weight: 750; }
.org-pane { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.org-pane button { text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 8px; cursor: pointer; color: var(--ink); }
.org-pane button.on { background: #e7f0ea; color: var(--pine-deep); font-weight: 750; }
.org-child { margin-left: 16px; }
.line-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.meta { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.meta th, .meta td { border: 1px solid #e4dccf; padding: 8px 10px; overflow-wrap: anywhere; }
.meta th { width: 88px; background: #faf7f2; text-align: left; color: #5c564c; }
.subject { margin: 14px 0; padding: 10px 0; border-top: 1px solid #e4dccf; border-bottom: 1px solid #e4dccf; overflow-wrap: anywhere; }
.subject b { margin-right: 8px; }
.block h3 { margin: 16px 0 6px; font-size: 14px; }
.block p { margin: 0; white-space: pre-wrap; line-height: 1.65; }
table.lines { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
table.lines th, table.lines td { border: 1px solid #e4dccf; padding: 7px 8px; }
table.lines th { background: #faf7f2; }
table.lines td.num, table.lines th.num { text-align: right; }
.total { text-align: right; font-weight: 750; margin-top: 8px; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.people span { background: #f6f1e8; border-radius: 999px; padding: 4px 8px; font-size: 12px; }
.file-list { display: grid; gap: 8px; margin-top: 8px; }
.file-row { justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-row a { color: var(--pine-deep); }

.ftp-bar, .crumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { margin: 12px 0; }
.crumbs a, .crumbs span { color: var(--ink-soft); text-decoration: none; }
.crumbs a { color: var(--pine); }
.ftp-table td.tools { white-space: normal; }
.ftp-table a, .ftp-table button.linkish {
  background: none; border: 0; color: var(--pine); cursor: pointer; padding: 0 6px 0 0; text-decoration: none;
}

.check-list { display: grid; gap: 6px; max-height: 280px; overflow: auto; margin: 8px 0 12px; }
.check-list label { gap: 8px; }
.check-list input { width: auto; }

.backdrop {
  position: fixed; inset: 0; background: rgba(28, 25, 21, 0.48);
  display: grid; place-items: center; padding: 18px; z-index: 20;
}
.dialog {
  width: min(480px, 100%); background: var(--paper-2); border-radius: 18px;
  padding: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}
.dialog h3 { margin: 0 0 12px; }
.dialog .allday {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.dialog .allday input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; padding: 0; }
.dialog .allday span { font-size: 13px; font-weight: 650; }
.dialog .allday em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pdf-dialog {
  width: min(960px, 100%); height: min(86dvh, 900px);
  background: var(--paper-2); border-radius: 18px; padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.pdf-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pdf-dialog header b { overflow-wrap: anywhere; }
.pdf-pages {
  flex: 1; min-height: 0; overflow: auto; background: #ece6dc;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.pdf-pages canvas { width: 100%; height: auto; background: white; box-shadow: 0 1px 6px rgba(28, 25, 21, 0.12); }
.pdf-status { margin: auto; color: var(--muted); }
#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(12px);
  background: #1c1915; color: white; padding: 12px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: 0.2s ease; z-index: 30; max-width: min(520px, calc(100% - 24px));
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--seal); }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.page-error { background: #f8e4e1; color: #8d342c; padding: 12px 14px; border-radius: 12px; }
.help { font-size: 12px; color: var(--ink-soft); line-height: 1.45; margin: 0 0 8px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.help-toc button {
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit;
}
.help-page h2 { margin: 0 0 8px; font-size: 16px; }
.help-page ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.help-page li { line-height: 1.5; }
.help-block { scroll-margin-top: 12px; }
.help-shot { margin: 12px 0 0; }
.help-shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.help-shot figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-soft); }
.mono { font-variant-numeric: tabular-nums; }

.main-fill { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 16px; }
.cal-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.cal-toolbar, .cal-nav, .cal-views, .cal-search, .mini-head { display: flex; align-items: center; gap: 8px; }
.cal-toolbar { justify-content: space-between; flex-wrap: wrap; }
.cal-views { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.cal-views button, .cal-nav > button, .mini-head button, .mini-day, .cal-day {
  border: 0; background: transparent; cursor: pointer; font: inherit;
}
.cal-views button { border-radius: 9px; padding: 6px 10px; color: var(--ink-soft); }
.cal-views button.on { background: var(--pine); color: white; }
.cal-nav strong { min-width: 0; white-space: nowrap; text-align: center; font-size: 15px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cal-nav > button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); }
.cal-search { margin-left: auto; }
.cal-search input { width: min(220px, 46vw); border: 1px solid var(--line); background: var(--paper-2); border-radius: 10px; padding: 8px 10px; }
.cal-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); gap: 12px; }
.cal-side, .cal-board { min-width: 0; min-height: 0; }
.cal-side { overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.mini-cal, .cal-board { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; }
.mini-cal { padding: 12px; }
.mini-head { justify-content: space-between; }
.mini-head b { font-size: 14px; }
.mini-head button { width: 28px; height: 28px; border-radius: 8px; }
.mini-dow, .mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mini-dow span, .cal-dow span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.mini-dow span { padding: 6px 0 2px; }
.mini-day { position: relative; height: 28px; border-radius: 8px; color: var(--ink); }
.mini-day.out { color: #b3aa9e; }
.mini-day.sun { color: #c44536; }
.mini-day.sat { color: #2a5f9e; }
.mini-day.today { background: var(--pine); color: white; }
.mini-day.selected { box-shadow: inset 0 0 0 1.5px var(--pine); }
.mini-day i { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
.mini-day.today i { background: white; }
.cal-folders { display: grid; gap: 6px; }
.cal-folders > b { font-size: 13px; }
.cal-folder { display: flex; align-items: center; gap: 6px; }
.cal-folder > button:first-child {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; padding: 4px 0;
}
.cal-folder i { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.cal-folder.off { opacity: 0.55; }
.cal-folder.off i { background: transparent !important; box-shadow: inset 0 0 0 2px var(--swatch); }
.cal-folder span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-board { overflow: auto; display: flex; flex-direction: column; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: sticky; top: 0; background: var(--paper-2); z-index: 2; }
.cal-dow span { padding: 8px 0; }
.cal-dow .sun { color: #c44536; }
.cal-dow .sat { color: #2a5f9e; }
.cal-weeks { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cal-week {
  flex: 1; min-height: 92px; display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(22px, auto);
  border-top: 1px solid var(--line);
}
.cal-weeks.week .cal-week { min-height: 280px; }
.cal-day { grid-row: 1 / -1; z-index: 0; text-align: left; padding: 4px; border-right: 1px solid var(--line); min-width: 0; }
.cal-day:last-of-type { border-right: 0; }
.cal-day.out { background: #faf7f2; }
.cal-day.selected { background: #f6f1e6; }
.day-num { width: 1.7em; height: 1.7em; display: inline-grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 700; }
.day-num.sun { color: #c44536; }
.day-num.sat { color: #2a5f9e; }
.cal-day.today .day-num { background: var(--pine); color: white; }
.cal-bar {
  z-index: 1; margin: 1px 3px; border: 0; border-radius: 4px; padding: 1px 6px;
  font-size: 12px; line-height: 1.45; text-align: left; cursor: pointer; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cal-bar.cont-left { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.cal-bar.cont-right { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cal-day-list { display: grid; gap: 8px; padding: 14px; }
.cal-chip {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  border: 1px solid var(--line); background: white; border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.cal-chip i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.cal-chip span { min-width: 0; display: grid; gap: 2px; }
.cal-chip small { color: var(--muted); }
.punch-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.punch-actions .btn { min-width: 108px; min-height: 40px; font-size: 14px; }
.kind-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 14px; }
.date-pair { display: flex; align-items: center; gap: 8px; }
.date-pair .date-field, .date-pair input { flex: 1; min-width: 0; }
.attend-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #4d5b68; color: #fff; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dash-punch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-punch .btn { min-width: 64px; }
.dash-punch span { color: var(--muted); font-size: 12px; }
.bell {
  position: relative; width: 44px; height: 44px; border-radius: 14px; color: inherit;
  display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--line);
}
.bell em {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--seal); color: white; font-style: normal; font-size: 11px;
  display: grid; place-items: center;
}
.bell.on svg { transform-origin: 50% 4px; animation: bell-ring 1.4s ease-in-out infinite; }
@keyframes bell-ring {
  0%, 55%, 100% { transform: rotate(0); }
  65% { transform: rotate(14deg); }
  75% { transform: rotate(-12deg); }
  85% { transform: rotate(8deg); }
  95% { transform: rotate(-4deg); }
}
.file-add { display: grid; gap: 10px; margin-bottom: 16px; }
.todo-add { display: flex; gap: 8px; flex-wrap: wrap; }
.todo-add input { flex: 1; min-width: 12rem; }
.todo-list { display: grid; gap: 8px; margin-top: 12px; }
.todo-item { display: flex; gap: 8px; align-items: flex-start; }
.todo-panel { margin: 16px 0; }
.dash-half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 12px 0; align-items: stretch; }
.dash-half > .panel { margin: 0; min-width: 0; }
.note-to { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.note-to p { margin: 0; color: var(--muted); font-size: 13px; }
.sticky-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px 12px;
  margin-top: 12px;
  align-items: start;
}
.sticky {
  --tilt: -1.2deg;
  position: relative;
  min-height: 148px;
  padding: 18px 12px 12px;
  background: #fff4b8;
  color: #3d3422;
  border-radius: 2px;
  box-shadow: 1px 2px 0 rgba(90, 70, 20, 0.08), 0 8px 14px rgba(70, 50, 15, 0.1);
  transform: rotate(var(--tilt));
}
.sticky-b { --tilt: 1.1deg; background: #ffe7a3; }
.sticky-c { --tilt: -0.4deg; background: #fff8cf; }
.sticky.on { --tilt: 0deg; box-shadow: 0 12px 22px rgba(70, 50, 15, 0.16); z-index: 1; }
.sticky::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 46px;
  height: 14px;
  margin-left: -23px;
  background: rgba(255, 250, 230, 0.78);
  border: 1px solid rgba(180, 150, 70, 0.28);
  transform: rotate(-2deg);
}
.sticky.unread .sticky-face b::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--seal);
}
button.sticky-face {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.sticky-face b { display: block; margin: 0 0 6px; font-size: 13px; line-height: 1.35; word-break: break-word; }
.sticky-face p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sticky.on .sticky-face p { display: block; -webkit-line-clamp: unset; }
.sticky-face small { display: block; margin-top: 8px; color: #8a7344; font-size: 11px; }
.sticky-files { display: grid; gap: 6px; margin-top: 10px; }
.sticky-file {
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  color: #1f4d38;
  text-decoration: none;
}
.sticky-file span { font-size: 10px; color: #8a7344; }
.sticky-file b { font-size: 12px; font-weight: 650; word-break: break-all; text-decoration: underline; }
.year-grant { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-bottom: 12px; }
.year-grant form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.year-grant .field { margin: 0; min-width: 7.5rem; }
.year-grant .help { flex: 1 1 16rem; margin: 0; }
.grant-result { margin: 8px 0 0; padding-left: 18px; }
.note-search { display: flex; gap: 8px; margin: 0 0 10px; }
.note-search input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--paper-2); border-radius: 10px; padding: 8px 10px; }
.note-histories { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.note-histories .panel { margin: 0; min-width: 0; }
.note-histories h2 small { color: var(--muted); font-size: 12px; font-weight: 650; }
.history-list { display: grid; gap: 8px; margin-top: 10px; }
.history-day { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.history-item {
  border: 1px solid #ead9a2;
  background: #fff8d6;
  border-radius: 4px;
  padding: 8px 10px;
  box-shadow: 2px 2px 0 rgba(90, 70, 20, 0.06);
}
.history-item.unread { box-shadow: inset 3px 0 0 var(--seal), 2px 2px 0 rgba(90, 70, 20, 0.06); }
.history-item.on { background: #fff3b0; }
button.history-face {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.history-face time { color: #8a7344; font-size: 11px; }
.history-face b { font-size: 13px; line-height: 1.35; word-break: break-word; }
.history-face span { grid-column: 1 / -1; color: #6d5b3a; font-size: 12px; }
.history-body { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
.history-files { display: grid; gap: 6px; margin-top: 8px; }
.history-files .sticky-file { background: rgba(255, 255, 255, 0.84); }
.tabs button { border: 0; background: transparent; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.tabs button.on { background: #23483a; color: white; }

@container (max-width: 920px) {
  .compose, .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-wrap, .doc-side { position: static; }
}
@media (max-width: 1100px) {
  .compose, .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-wrap, .doc-side { position: static; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-hero { padding: 28px 22px; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side { flex-direction: row; flex-wrap: wrap; align-items: flex-start; overflow: auto; gap: 8px; padding: 10px; max-height: 42dvh; }
  .side nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .menu-tree { flex: 1 0 100%; }
  .menu-tree button, .tree-children a { width: auto; }
  .tree-children { flex-direction: row; flex-wrap: wrap; display: flex; }
  .side .tree-children a { padding-left: 12px; }
  .side a { white-space: nowrap; padding: 8px 10px; }
  .side a.active::before { display: none; }
  .me { margin-top: 0; flex: 0 0 auto; }
  .me small, .side-brand span { display: none; }
  .accounts, .item-row { grid-template-columns: minmax(0, 1fr); }
  .page-head { align-items: flex-start; flex-direction: column; }
  .line-body { grid-template-columns: minmax(0, 1fr); }
  .kind-row { grid-template-columns: minmax(0, 1fr); }
  .leave-board, .leave-panes, .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .main-fill { overflow: auto; }
  .cal-page, .cal-board, .cal-weeks { min-height: auto; overflow: visible; }
  .cal-side { max-height: none; }
  .cal-search { margin-left: 0; width: 100%; }
  .cal-search input { flex: 1; width: auto; }
  .line-pane { max-height: 240px; }
  .link-list a { grid-template-columns: auto minmax(0, 1fr); }
  .link-list a span { grid-column: 2; }
  .dash-half, .note-histories { grid-template-columns: minmax(0, 1fr); }
}
.portal { height: 100%; overflow: auto; max-width: 1080px; margin: 0 auto; padding: 28px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.portal.promo { max-width: none; padding: 0 0 28px; gap: 0; background: #f5f7fb; color: #16181f; }
.promo-wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.site-nav {
  position: sticky; top: 0; z-index: 3; width: 100%; max-width: none;
  background: rgba(245, 247, 251, 0.92); backdrop-filter: blur(10px);
}
.site-nav-inner { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 0; }
.site-nav nav { display: flex; align-items: center; gap: 6px; }
.site-nav nav > button { border: 0; background: transparent; cursor: pointer; color: #3a4154; padding: 8px 12px; border-radius: 999px; font-weight: 650; }
.site-nav nav > button.site-pill { background: #4453f2; color: white; padding: 10px 16px; }
.site-brand { display: flex; align-items: center; gap: 8px; color: #16181f; text-decoration: none; font-weight: 750; font-size: 18px; letter-spacing: -0.04em; white-space: nowrap; }
.site-brand span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #4453f2; color: white; font-family: var(--serif); }
.site-pill { border: 0; background: #4453f2; color: white; border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.site-pill-lg { padding: 14px 20px; font-size: 15px; }
.site-kicker { display: flex; align-items: center; gap: 8px; margin: 0; color: #4453f2; font-size: 12px; font-weight: 750; letter-spacing: 0.08em; }
.site-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4453f2; }
.site-hero { padding: 18px 0 56px; background: radial-gradient(circle at 78% 30%, rgba(120, 140, 255, 0.22), transparent 28%), linear-gradient(#f7f8ff, #f5f7fb 70%); }
.site-hero h1 { margin: 14px 0 28px; font-size: clamp(40px, 5.4vw, 64px); line-height: 1.2; letter-spacing: -0.055em; font-weight: 750; }
.site-hero-grid { display: grid; grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr); gap: 28px; align-items: end; }
.site-lead { margin: 0 0 22px; color: #5c6478; font-size: 16px; line-height: 1.6; }
.site-hero-visual { position: relative; }
.site-float-list { position: absolute; left: 0; top: 0; z-index: 1; margin: 0; padding: 14px 16px; list-style: none; width: 168px; background: white; border-radius: 18px; box-shadow: 0 16px 40px rgba(40, 52, 110, 0.14); display: grid; gap: 8px; }
.site-float-shot { margin: 36px 0 0 72px; background: white; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 50px rgba(40, 52, 110, 0.12); border: 1px solid #e6e9f4; }
.site-hero em { font-style: normal; color: #4453f2; }
.site-float-shot img { display: block; width: 100%; height: auto; }
.site-float-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.site-float-list li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #e8ecff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2 6.4 10.6 12 5' fill='none' stroke='%234453f2' stroke-width='1.6'/%3E%3C/svg%3E") center / 14px no-repeat; flex: 0 0 auto; }
.site-dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.site-block { padding: 28px 0 64px; scroll-margin-top: 76px; }
#promo-home { scroll-margin-top: 72px; }
.site-dash article { background: white; border: 1px solid #e6e9f4; border-radius: 18px; padding: 16px; display: grid; gap: 6px; }
.site-dash b { font-size: 16px; letter-spacing: -0.03em; }
.site-dash span { color: #5c6478; line-height: 1.45; }
.site-work { background: white; }
.site-stores { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.site-stores b { margin-right: 4px; font-size: 14px; }
.site-stores span { background: #eef0ff; color: #4453f2; border-radius: 999px; padding: 8px 14px; font-weight: 750; }
.site-block-head, .site-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.site-block h2, .site-about h2, .site-enter h2 { margin: 8px 0; font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.05em; line-height: 1.25; }
.site-block-head p, .site-about p, .site-enter p { margin: 0; color: #5c6478; line-height: 1.55; }
.site-block-head > b { color: #8b93a7; font-weight: 650; letter-spacing: 0.04em; }
.site-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.site-cards button { text-align: left; background: white; border: 1px solid #e6e9f4; border-radius: 20px; padding: 16px; cursor: pointer; display: grid; gap: 6px; min-height: 168px; }
.site-cards button.is-on { border-color: #4453f2; box-shadow: 0 10px 24px rgba(68, 83, 242, 0.12); }
.site-cards i { font-style: normal; color: #8b93a7; font-size: 12px; }
.site-cards small { color: #4453f2; letter-spacing: 0.06em; font-size: 11px; font-weight: 750; }
.site-cards b { font-size: 18px; letter-spacing: -0.03em; }
.site-cards span { color: #5c6478; line-height: 1.45; }
.site-stage { margin: 16px 0 0; background: white; border: 1px solid #e6e9f4; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px rgba(40, 52, 110, 0.08); }
.site-stage img { display: block; width: 100%; height: auto; }
.site-stage figcaption { padding: 12px 16px; color: #3a4154; }
.site-about { background: #1b2340; color: white; padding: 64px 0; }
.site-about .site-kicker, .site-about h2 { color: white; }
.site-about .site-kicker::before { background: #9aa6ff; }
.site-about p { color: #c9d0e4; }
.site-about-grid { grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr); align-items: center; }
.site-about ol { margin: 0; padding: 0; list-style: none; }
.site-about li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 10px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.site-about li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.site-about i { grid-row: 1 / span 2; align-self: center; font-style: normal; color: #9aa6ff; }
.site-about b { display: block; }
.site-about li span { color: #c9d0e4; }
.site-enter { padding: 28px 0 48px; scroll-margin-top: 76px; }
.site-enter-card { background: white; border-radius: 28px; padding: 28px; box-shadow: 0 16px 40px rgba(40, 52, 110, 0.06); }
.site-enter .portal-list { margin-top: 18px; }
.site-foot { padding: 8px 0 28px; }
.site-foot .promo-wrap { display: flex; gap: 14px; align-items: center; color: #8b93a7; }
.site-foot a { margin-left: auto; color: #8b93a7; text-decoration: none; font-size: 12px; }
@media (max-width: 860px) {
  .site-nav-inner { align-items: flex-start; flex-wrap: wrap; }
  .site-nav nav { width: 100%; flex-wrap: wrap; }
  .site-hero-grid, .site-block-head, .site-about-grid, .site-cards, .site-dash { grid-template-columns: minmax(0, 1fr); }
  .site-float-shot { margin: 18px 0 0; }
  .site-float-list { position: static; width: auto; margin-bottom: -12px; }
  .site-block, .site-enter { scroll-margin-top: 96px; }
}
.portal-head, .ops-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.portal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.portal-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  padding: 16px; border-radius: 16px; background: var(--paper-2); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.portal-card code, .ops-row code { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.portal-card small, .ops-row small { color: var(--ink-soft); }
.ops-list { display: flex; flex-direction: column; gap: 12px; }
.ops-row { align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ops-row .field { min-width: 9rem; margin: 0; }
.pill.read, .pill.demo, .pill.approved, .pill.withdrawn { display: inline-flex; }
.pill.approved { background: #e5f2ea; color: #1f6a4a; }
.pill.demo { background: #f8ecd4; color: #6d4a0d; }
.pill.read { background: #ece7df; color: #5c564e; }
.pill.withdrawn { background: #f8e4e1; color: #8d342c; }
@media print {
  html, body, #app { height: auto; overflow: visible; }
  .side, .actions, .doc-side, #toast, #modal, .noprint { display: none !important; }
  .shell, .main { display: block; height: auto; overflow: visible; }
  .paper { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
