:root {
  --navy: #002a4e;
  --navy-2: #073c68;
  --sky: #97caeb;
  --sky-soft: #e9f5fc;
  --ink: #0c0d0e;
  --gray: #515254;
  --muted: #706f6f;
  --line: #d6d5d5;
  --surface: #ffffff;
  --canvas: #f7fafc;
  --success: #2f6b57;
  --success-soft: #e8f4ee;
  --danger: #9c3434;
  --danger-soft: #fff0ef;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(0, 42, 78, .08);
  --admin-head-gap: 28px;
  --admin-section-gap: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Proxima Nova", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, textarea, select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(151, 202, 235, .35);
}
input::placeholder, textarea::placeholder {
  color: #767a7e;
  opacity: 1;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
textarea { resize: vertical; line-height: 1.5; }
label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
label small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.4; }

.ui-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.ui-icon--arrow-right { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E"); }
.ui-icon--arrow-left { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m12 19-7-7 7-7'/%3E%3C/svg%3E"); }
.ui-icon--plus { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ui-icon--menu { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); }
.ui-icon--logout { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3C/svg%3E"); }
.ui-icon--home { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1Z'/%3E%3C/svg%3E"); }
.ui-icon--check { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); }
.ui-icon--upload { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M5 20h14'/%3E%3C/svg%3E"); }
.ui-icon--photo { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-5-5L5 20'/%3E%3C/svg%3E"); }
.ui-icon--settings { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h2M10 12h10M4 18h7M15 18h5'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='13' cy='18' r='2'/%3E%3C/svg%3E"); }
.ui-icon--search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); }

.brand { display: inline-flex; align-items: baseline; gap: 7px; color: var(--navy); }
.brand-word { font-size: 17px; font-weight: 800; letter-spacing: .13em; }
.brand-product { color: var(--gray); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.brand--light { color: #fff; }
.brand--light .brand-product { color: var(--sky); }
.kicker {
  margin: 0 0 8px;
  color: var(--navy-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}
.primary-button, .secondary-button, .small-button, .danger-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--navy);
  border-radius: 7px;
  cursor: pointer;
  color: #fff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 700;
  transition: background .15s, transform .15s;
}
.primary-button:hover { background: var(--navy-2); transform: translateY(-1px); }
.primary-button--wide { width: 100%; }
.secondary-button { color: var(--navy); background: #fff; }
.secondary-button:hover { background: var(--sky-soft); }
.danger-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #d7adad;
  border-radius: 7px;
  cursor: pointer;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
  font-weight: 700;
}
.danger-button:hover { border-color: var(--danger); }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}
.text-button {
  min-height: 44px;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  color: inherit;
  background: transparent;
  font-size: 20px;
}
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; color: var(--navy-2); font-size: 12px; font-weight: 700; }

.flash-stack {
  position: fixed;
  z-index: 100;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  left: 16px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.flash {
  max-width: 440px;
  margin-left: auto;
  padding: 13px 15px;
  border: 1px solid #b7d8c7;
  border-radius: 8px;
  color: #235240;
  background: var(--success-soft);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
  transition: opacity .3s, transform .3s;
}
.flash--error { border-color: #efc1bc; color: var(--danger); background: var(--danger-soft); }
.flash--fade { opacity: 0; transform: translateY(-5px); }
.maintenance-admin-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -42px calc(clamp(25px, 4vw, 60px) * -1) 30px;
  padding: 11px 18px;
  color: #fff;
  background: var(--danger);
  font-size: 11px;
  font-weight: 800;
}

/* Login */
.login-main { min-height: 100vh; }
.login-panel { min-height: 100vh; background: #fff; }
.login-brand { display: none; }
.login-form-wrap { display: grid; min-height: 100vh; place-items: center; padding: 28px 20px; }
.login-form-card { width: min(100%, 390px); }
.private-access-label { color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.login-form-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 38px;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.form-intro { margin: 14px 0 30px; color: var(--gray); font-size: 14px; line-height: 1.55; }
.login-maintenance-note { margin: -14px 0 24px; padding: 12px 14px; border: 1px solid #efc1bc; border-radius: 8px; color: var(--danger); background: var(--danger-soft); font-size: 11px; line-height: 1.5; }
.form-stack { display: grid; gap: 12px; }
.form-stack .primary-button { margin-top: 12px; }
#pin { font-size: 22px; font-weight: 700; letter-spacing: .28em; }
.recovery-link { display: block; margin-top: 18px; color: var(--navy); font-size: 11px; font-weight: 800; text-align: center; }
.recovery-page { display: grid; min-height: 100vh; place-items: center; padding: 28px 20px; background: #fff; }
.recovery-card { width: min(100%, 430px); }
.recovery-card .back-link { margin-bottom: 34px; }
.recovery-card h1 { margin: 0; color: var(--navy); font-size: 38px; letter-spacing: -.035em; line-height: 1.05; }
.recovery-card > p:not(.kicker) { margin: 14px 0 28px; color: var(--gray); font-size: 13px; line-height: 1.6; }
.recovery-card .recovery-help { margin: 20px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
/* Member */
.member-body { padding-bottom: calc(75px + env(safe-area-inset-bottom)); background: #fff; }
.member-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #e8edf0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.member-name {
  max-width: 48vw;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 5px;
  color: var(--navy);
  background: var(--sky-soft);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-main { width: min(100%, 760px); margin: 0 auto; padding: 28px 18px 50px; }
.member-hero { padding: 24px 0 28px; }
.member-hero h1, .order-mobile-head h1, .section-detail-head h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 10vw, 48px);
  letter-spacing: -.045em;
  line-height: 1.02;
}
.section-detail-head h1 { letter-spacing: .015em; }
.member-hero > p:last-child { max-width: 520px; margin: 15px 0 0; color: var(--gray); font-size: 14px; line-height: 1.6; }
.entry-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.order-entry-form { display: grid; gap: 9px; }
.entry-control { display: grid; gap: 10px; }
.entry-control input {
  height: 58px;
  border-width: 2px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.entry-control .primary-button { min-height: 56px; }
.entry-help { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 9px;
  background: var(--sky-soft);
}
.privacy-icon { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: 12px; }
.privacy-note strong { display: block; color: var(--navy); font-size: 12px; }
.privacy-note p { margin: 4px 0 0; color: var(--gray); font-size: 11px; line-height: 1.45; }
.member-bottom-nav {
  position: fixed;
  z-index: 30;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 66px;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #e4eaed;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
}
.member-bottom-nav a, .member-bottom-nav button {
  display: grid;
  min-height: 65px;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 0;
  color: var(--navy);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}
.member-bottom-nav span { font-size: 17px; line-height: 1; }
.member-bottom-nav form { display: grid; }

.order-mobile-head, .section-detail-head {
  margin: -28px -18px 30px;
  padding: 27px 18px 28px;
  color: #fff;
  background: var(--navy);
}
.order-mobile-head .back-link, .section-detail-head .back-link { color: var(--sky); }
.order-id-line { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.order-id-line span { color: var(--sky); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.order-id-line strong { padding: 4px 7px; border-radius: 4px; color: var(--navy); background: var(--sky); font-size: 11px; letter-spacing: .04em; }
.order-mobile-head h1, .section-detail-head h1 { color: #fff; }
.order-description, .section-detail-head > p:last-of-type { margin: 14px 0 0; color: #ccdae4; font-size: 13px; line-height: 1.55; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.section-title-row h2 { margin: 0; color: var(--navy); font-size: 25px; }
.section-title-row > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--sky-soft); font-size: 11px; font-weight: 800; }
.section-list { display: grid; gap: 12px; }
.section-card {
  position: relative;
  overflow: hidden;
  padding: 20px 48px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,42,78,.055);
}
.section-card:active { background: var(--canvas); }
.section-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-index { color: var(--navy); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.section-progress { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.section-card h3 { margin: 12px 0 5px; color: var(--navy); font-size: 21px; letter-spacing: .018em; line-height: 1.15; }
.section-card > p { margin: 0; color: var(--gray); font-size: 12px; line-height: 1.45; }
.section-contributors { margin-top: 17px; padding-top: 15px; border-top: 1px solid #edf0f1; }
.contributor-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.people-row { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 3px;
  border-radius: 20px;
  color: var(--navy);
  background: var(--sky-soft);
  font-size: 9px;
  font-weight: 700;
}
.person-chip i { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: 8px; font-style: normal; }
.person-chip--blue { color: #fff; background: rgba(151,202,235,.14); }
.person-chip--blue i { color: var(--navy); background: var(--sky); }
.more-people { display: grid; min-width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--navy); background: #edf0f1; font-size: 9px; font-weight: 700; }
.empty-contributors { color: var(--muted); font-size: 10px; font-style: italic; }
.card-arrow { position: absolute; right: 17px; top: 50%; color: var(--navy); font-size: 20px; transform: translateY(-50%); }
.leave-order-form { display: grid; place-items: center; margin: 26px 0 5px; }
.empty-card { padding: 35px 22px; border: 1px dashed #bdc8ce; border-radius: var(--radius); text-align: center; }
.empty-card strong { color: var(--navy); font-size: 15px; }
.empty-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.section-detail-head .kicker { color: var(--sky); }
.section-history { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.13); }
.section-history > span { display: block; margin-bottom: 8px; color: #aac0cf; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.point-list { display: grid; gap: 14px; }
.point-group { display: grid; gap: 14px; }
.point-group-heading {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.point-group-heading strong {
  padding: 5px 9px;
  border-radius: 5px;
  color: var(--navy);
  background: var(--sky-soft);
  font-size: 9px;
  letter-spacing: .12em;
}
.point-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 6px 18px rgba(0,42,78,.05); }
.point-card--complete { border-color: #bcd5c9; }
.point-card-head { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 18px; }
.point-number { color: var(--navy); font-size: 10px; font-weight: 800; }
.point-state { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.point-card--complete .point-state { color: var(--success); }
.point-card h2 { margin: 0; color: var(--navy); font-size: 18px; line-height: 1.2; }
.point-card-head p { margin: 7px 0 0; color: var(--gray); font-size: 12px; line-height: 1.5; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; border-top: 1px solid var(--line); background: var(--line); }
.photo-item { min-width: 0; background: #fff; }
.photo-tile { position: relative; display: block; overflow: hidden; min-height: 150px; background: #dbe6ec; }
.photo-preview-shell { display: block; min-height: 150px; aspect-ratio: 1/1; background: linear-gradient(135deg, #dbe6ec, #edf4f7); }
.photo-tile img { width: 100%; height: 100%; min-height: 150px; aspect-ratio: 1/1; object-fit: cover; }
.photo-meta {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  padding: 28px 9px 9px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,20,37,.82));
}
.photo-meta strong { font-size: 9px; }
.photo-meta small { margin-top: 2px; color: #cde0ea; font-size: 7px; }
.photo-meta em { overflow: hidden; margin-top: 4px; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.photo-delete-button { width: 100%; min-height: 40px; border: 0; border-top: 1px solid #ead1d1; color: var(--danger); background: var(--danger-soft); cursor: pointer; font-size: 9px; font-weight: 800; }
.photo-delete-button:hover { background: #ffe4e2; }
.photo-drawer, .upload-drawer { border-top: 1px solid #e8ecee; }
.photo-drawer summary, .upload-drawer summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.photo-drawer summary::-webkit-details-marker, .upload-drawer summary::-webkit-details-marker { display: none; }
.photo-help { margin: 0; padding: 10px 14px 12px; color: var(--muted); background: #fff; font-size: 9px; text-align: center; }
.upload-form {
  display: grid;
  gap: 11px;
  padding: 16px 18px 18px;
  border-top: 1px solid #e8ecee;
  background: #fff;
}
.camera-input {
  position: relative;
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 12px;
  border: 1px dashed #8aaabe;
  border-radius: 8px;
  cursor: pointer;
  color: var(--navy);
  background: var(--sky-soft);
  text-align: center;
  touch-action: manipulation;
}
.camera-input > span {
  font-size: 12px;
  font-weight: 800;
}
.camera-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.rework-drawer summary, .rework-upload-drawer summary { color: #6f4b0e; background: #fffaf0; }
.rework-upload-drawer .upload-form { border-top-color: #e6cf9f; }
.rework-drawer summary strong {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 20px;
  color: #6f4b0e;
  background: #f6e7c7;
  font-size: 8px;
}
.photo-item--rework { border-color: #e6cf9f; }
.camera-input--rework {
  border-color: #759db5;
  color: var(--navy);
  background: #f1f8fc;
}

/* Admin */
.admin-body { background: #f5f7f8; }
.admin-sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: 230px;
  flex-direction: column;
  padding: 28px 18px 18px;
  color: #fff;
  background: var(--navy);
}
.admin-nav { display: grid; gap: 4px; margin-top: 52px; }
.admin-nav a {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 6px;
  color: #aac0cf;
  font-size: 12px;
  font-weight: 700;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-nav a.is-current { color: var(--navy); background: var(--sky); }
.nav-symbol { width: 20px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.admin-release { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; margin-bottom: 13px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #aac0cf; font-size: 8px; font-weight: 700; }
.admin-release:hover { color: #fff; border-color: rgba(255,255,255,.22); }
.admin-release strong { padding: 3px 5px; border-radius: 4px; color: var(--navy); background: var(--sky); font-size: 7px; letter-spacing: .08em; }
.admin-account { display: grid; grid-template-columns: 35px 1fr 35px; gap: 9px; align-items: center; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--sky); font-size: 11px; font-weight: 800; }
.admin-account > span:nth-child(2) { display: grid; min-width: 0; }
.admin-account strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account small { margin-top: 3px; color: #8fa9bb; font-size: 8px; }
.admin-account .icon-button { color: #9cb3c2; }
.admin-main { min-height: 100vh; margin-left: 230px; padding: 42px clamp(25px, 4vw, 60px) 70px; }
.admin-mobile-bar, .nav-scrim { display: none; }
.admin-page-head, .admin-order-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: var(--admin-head-gap); }
.admin-page-head h1, .admin-order-head h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -.045em;
  line-height: 1;
}
.admin-page-head > div > p:last-child, .admin-order-head > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-page-head .back-link, .admin-order-head .back-link { margin-bottom: 28px; }
.admin-head-actions { display: flex; gap: 9px; }
.admin-head-actions form { display: flex; }
.admin-head-actions form button { width: 100%; }
.project-search-panel { margin-bottom: var(--admin-section-gap); padding: 18px; border: 1px solid #dfe5e8; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,42,78,.04); }
.project-search-form { display: grid; gap: 7px; }
.project-search-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 8px; }
.project-search-controls input { min-height: 48px; }
.project-search-meta { margin: 2px 0 0; padding-left: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.user-groups { display: grid; min-width: 0; gap: var(--admin-section-gap); }
.user-groups > * { min-width: 0; }
.user-group--admins { border-color: #c8dfed; }
.inactive-user-group {
  overflow: hidden;
  border: 1px solid #dfe5e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,42,78,.04);
}
.inactive-user-group > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.inactive-user-group > summary small { color: var(--muted); font-size: 9px; font-weight: 600; }
.inactive-user-group[open] > summary { border-bottom: 1px solid #e6ebed; }
.inactive-user-group .data-panel { border: 0; border-radius: 0; box-shadow: none; }
.admin-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: var(--admin-section-gap); }
.admin-metrics article { padding: 20px; border: 1px solid #e0e5e7; border-radius: 9px; background: #fff; }
.admin-metrics small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.admin-metrics strong { display: block; margin-top: 8px; color: var(--navy); font-size: 29px; }
.data-panel, .form-panel { min-width: 0; border: 1px solid #dfe5e8; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,42,78,.04); }
.data-panel-head { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #e6ebed; }
.data-panel-head h2 { margin: 0; color: var(--navy); font-size: 17px; }
.data-panel-head > span { color: var(--muted); font-size: 10px; }
.table-scroll { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.admin-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.admin-table th { padding: 12px 16px; color: var(--muted); background: #f8fafb; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.admin-table td { height: 59px; padding: 10px 16px; border-top: 1px solid #edf0f1; color: var(--gray); font-size: 11px; }
.admin-table td strong { color: var(--navy); }
.admin-table tbody tr:hover { background: #fbfdfe; }
.status-badge, .role-badge { display: inline-flex; padding: 5px 7px; border-radius: 20px; color: var(--success); background: var(--success-soft); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.status-badge--muted { color: var(--muted); background: #eef0f1; }
.role-badge--admin { color: var(--navy); background: var(--sky-soft); }
.row-action { display: inline-flex; align-items: center; gap: 5px; color: var(--navy); font-size: 10px; font-weight: 800; }
.table-empty { padding: 40px; color: var(--muted); text-align: center; }
.form-panel { padding: 24px; }
.form-panel--narrow { max-width: 840px; }
.admin-form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: var(--admin-section-gap); }
.form-field { display: grid; align-self: start; gap: 7px; }
.form-field > label { display: block; }
.form-field > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.form-span { grid-column: 1 / -1; }
.toggle-field {
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}
.toggle-field input, .mini-toggle input { width: 18px; min-height: 18px; margin: 0; box-shadow: none; accent-color: var(--navy); }
.toggle-field span { display: grid; }
.toggle-field strong { font-size: 12px; }
.toggle-field small { margin-top: 3px; }
.toggle-field--locked { color: var(--muted); background: #f3f5f6; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 18px; border-top: 1px solid #e7ebed; }
.security-notice {
  max-width: 840px;
  margin: -10px 0 18px;
  padding: 15px 17px;
  border: 1px solid #c8dfed;
  border-radius: 8px;
  color: var(--navy);
  background: var(--sky-soft);
}
.security-notice strong { font-size: 12px; }
.security-notice p { margin: 5px 0 0; color: var(--gray); font-size: 11px; line-height: 1.5; }
.form-security-copy { margin: -4px 0 0; padding: 12px 14px; border-radius: 7px; color: var(--gray); background: #f3f6f7; font-size: 10px; line-height: 1.5; }
.admin-credential-panel { padding: 17px; border: 1px solid #c8dfed; border-radius: 8px; background: #f6fafc; }
.admin-credential-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.admin-credential-heading > span { color: var(--navy-2); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.admin-credential-heading > small { padding: 4px 6px; border-radius: 4px; color: var(--navy); background: var(--sky-soft); font-size: 8px; font-weight: 800; }
.project-name-line { margin: 7px 0 9px; color: var(--sky); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.order-context { margin: -10px 0 24px; padding: 15px 18px; border-left: 3px solid var(--sky); color: var(--gray); background: #fff; font-size: 12px; line-height: 1.55; }
.setup-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -10px 0 24px;
  padding: 14px 17px;
  border: 1px solid #c8dfed;
  border-radius: 8px;
  color: var(--navy);
  background: var(--sky-soft);
  font-size: 11px;
  line-height: 1.5;
}
.setup-notice a { font-weight: 800; white-space: nowrap; }
.archive-list-panel { margin-top: var(--admin-section-gap); }
.system-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--admin-section-gap); }
.system-card { display: grid; min-height: 330px; align-content: space-between; gap: 26px; padding: 26px; border: 1px solid #dfe5e8; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,42,78,.04); }
.system-card--danger { border-color: #ead1d1; }
.system-card--release { border-color: #c8dfed; }
.system-card-head { display: flex; align-items: center; justify-content: space-between; }
.system-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 8px; color: var(--navy); background: var(--sky-soft); }
.system-icon--danger { color: var(--danger); background: var(--danger-soft); }
.system-card h2 { margin: 0; color: var(--navy); font-size: 24px; }
.system-card p:last-child { margin: 10px 0 0; color: var(--gray); font-size: 12px; line-height: 1.6; }
.system-card form { display: flex; }
.system-card form button { width: 100%; }
.system-updated { margin: 14px 0 0; color: var(--muted); font-size: 9px; text-align: right; }
.maintenance-card { max-width: 560px; margin: 12vh auto 0; padding: 40px 28px; border: 1px solid #dfe5e8; border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.maintenance-mark { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 24px; border-radius: 50%; color: var(--navy); background: var(--sky-soft); }
.maintenance-card h1 { margin: 0; color: var(--navy); font-size: clamp(32px, 8vw, 45px); letter-spacing: -.04em; }
.maintenance-card > p:last-child { max-width: 420px; margin: 14px auto 0; color: var(--gray); font-size: 13px; line-height: 1.6; }
.archive-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin: -10px 0 20px;
  padding: 22px;
  border: 1px solid #c8dfed;
  border-radius: 10px;
  background: var(--sky-soft);
}
.archive-panel h2 { margin: 0; color: var(--navy); font-size: 20px; }
.archive-panel p:last-child { max-width: 650px; margin: 8px 0 0; color: var(--gray); font-size: 12px; line-height: 1.55; }
.archive-facts { display: flex; gap: 24px; margin: 0; }
.archive-facts div { min-width: 105px; }
.archive-facts dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.archive-facts dd { margin: 6px 0 0; color: var(--navy); font-size: 12px; font-weight: 800; }
.archive-structure { overflow: hidden; }
.archived-section-list { display: grid; }
.archived-section-list article {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 20px;
  border-top: 1px solid #edf0f1;
}
.archived-section-list article:first-child { border-top: 0; }
.archived-section-list strong { color: var(--navy); font-size: 13px; }
.archived-section-list p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.archived-section-list ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.archived-section-list li { display: inline-flex; align-items: center; gap: 7px; color: var(--gray); font-size: 10px; }
.muted-copy { color: var(--muted) !important; }
.structure-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--admin-section-gap); align-items: start; }
.structure-heading { min-height: 58px; padding: 0; border: 0; }
.structure-heading .kicker { margin-bottom: 4px; }
.section-order-form { display: flex; align-items: center; gap: 9px; }
.section-order-form > span { color: var(--muted); font-size: 9px; }
.admin-section-list { display: grid; gap: 13px; }
.admin-section-card { overflow: hidden; border: 1px solid #dce3e6; border-radius: 9px; background: #fff; }
.section-editor { padding: 18px; background: #f8fafb; }
.section-editor--bundle { padding: 0; }
.section-editor--bundle > .section-editor-head { margin: 0; padding: 18px; }
.section-editor--bundle > .section-editor-fields { padding: 0 18px 18px; }
.section-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.section-identity, .key-point-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.section-identity > div { display: grid; gap: 2px; }
.section-identity small, .key-point-list-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-identity strong { color: var(--navy); font-size: 13px; }
.section-editor-actions, .key-point-editor-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.section-editor-fields, .key-point-editor-fields {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(240px, 1fr);
  gap: 12px;
}
.section-editor-fields input, .section-editor-fields select, .key-point-editor-fields input, .key-point-editor-fields select, .inline-add-form input {
  min-height: 42px;
  padding: 9px 11px;
  font-size: 11px;
}
.small-input { width: 65px; }
.mini-toggle { display: flex; min-height: 38px; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 9px; }
.small-button { min-height: 38px; padding: 0 11px; font-size: 9px; }
.small-button--quiet { color: var(--navy); background: #fff; }
.order-button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}
.order-button:hover { border-color: #9fb5c2; background: var(--sky-soft); }
.order-button--remove { color: var(--danger); }
.key-point-admin-list { display: grid; }
.key-point-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid #edf0f1;
  background: #fff;
}
.key-point-list-head small { color: var(--muted); font-size: 8px; }
.key-point-editor { display: grid; gap: 12px; padding: 15px 18px; border-top: 1px solid #edf0f1; background: #fff; }
.key-point-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.key-point-identity strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-manage-link { white-space: nowrap; }
.photo-count-empty { display: grid; min-height: 38px; place-items: center; color: var(--muted); font-size: 8px; white-space: nowrap; }
.key-dot { width: 7px; height: 7px; align-self: center; border-radius: 50%; background: #bdc5c8; }
.key-dot--done { background: var(--success); }
.inline-empty { padding: 20px; border-top: 1px solid #edf0f1; color: var(--muted); font-size: 10px; text-align: center; }
.key-point-editor--new { background: #f8fcfe; }
.add-point-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid #e5eaec;
  background: #fff;
}
.add-point-actions small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.add-point-drawer { border-top: 1px solid #e5eaec; }
.add-point-drawer summary { display: flex; min-height: 44px; align-items: center; gap: 7px; padding: 14px 17px; color: var(--navy); cursor: pointer; font-size: 10px; font-weight: 800; list-style: none; }
.add-point-drawer summary::-webkit-details-marker { display: none; }
.inline-add-form { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(220px, 1fr) auto; gap: 9px; align-items: end; padding: 0 15px 15px; }
.inline-add-form .primary-button { min-height: 38px; }
.section-delete-form { display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid #edf0f1; background: #fff; }
.section-delete-button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}
.section-delete-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.project-delete-panel {
  margin-top: 28px;
  border: 1px solid #ead1d1;
  border-radius: 10px;
  background: #fff;
}
.project-delete-panel > summary {
  padding: 17px 20px;
  color: var(--danger);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.project-delete-panel > div { padding: 0 20px 20px; border-top: 1px solid #f0dddd; }
.project-delete-panel p { max-width: 760px; margin: 17px 0; color: var(--gray); font-size: 11px; line-height: 1.55; }
.project-delete-form { display: grid; grid-template-columns: minmax(240px, 360px) auto; gap: 10px; align-items: end; }
.project-delete-form input { min-height: 46px; }
.project-delete-form .danger-button { min-height: 46px; }
.sticky-panel { position: sticky; top: 25px; }
.sticky-panel h2 { margin: 0 0 18px; color: var(--navy); font-size: 22px; }
.section-types-complete { margin: 0; padding: 15px; border-radius: 8px; color: var(--gray); background: #f3f6f7; font-size: 11px; line-height: 1.55; }

@media (min-width: 620px) {
  .entry-control { grid-template-columns: 1fr auto; }
  .entry-control .primary-button { min-width: 130px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  .login-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }
  .login-brand {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(42px, 6vw, 82px);
    color: #fff;
    background:
      radial-gradient(circle at 85% 85%, rgba(151,202,235,.2), transparent 35%),
      linear-gradient(145deg, #002a4e, #073c68);
  }
  .login-brand-copy { max-width: 600px; }
  .login-brand-copy .kicker { color: var(--sky); }
  .login-brand-copy h1 { margin: 0; font-size: clamp(48px, 5vw, 76px); letter-spacing: -.055em; line-height: .98; }
  .login-brand-copy > p:last-child { max-width: 480px; margin: 24px 0 0; color: #c8dae6; font-size: 15px; line-height: 1.65; }
  .login-form-wrap { padding: 50px; }
  .mobile-login-brand { display: none; }
  .member-main { padding-top: 45px; }
  .order-mobile-head, .section-detail-head { margin-right: 0; margin-left: 0; border-radius: 14px; padding: 35px; }
  .member-bottom-nav { right: calc(50% - 380px); left: calc(50% - 380px); border-right: 1px solid #e4eaed; border-left: 1px solid #e4eaed; }
}

@media (max-width: 1120px) {
  .admin-sidebar { width: 205px; }
  .admin-main { margin-left: 205px; }
  .structure-layout { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
}

@media (max-width: 760px) {
  .admin-body { padding-top: 60px; }
  .admin-sidebar { width: min(290px, 86vw); transform: translateX(-100%); transition: transform .2s ease; }
  .admin-nav-open .admin-sidebar { transform: translateX(0); }
  .admin-mobile-bar {
    position: fixed;
    z-index: 40;
    inset: 0 0 auto;
    display: flex;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid #dfe5e8;
    background: #fff;
  }
  .nav-scrim { position: fixed; z-index: 45; inset: 0; visibility: hidden; display: block; opacity: 0; background: rgba(0,25,45,.5); transition: opacity .2s, visibility .2s; }
  .admin-nav-open .nav-scrim { visibility: visible; opacity: 1; }
  .admin-main { margin-left: 0; padding: 28px 15px 50px; }
  .maintenance-admin-banner { margin: -28px -15px 24px; }
  .admin-page-head, .admin-order-head { align-items: flex-start; flex-direction: column; }
  .admin-page-head > .primary-button { width: 100%; }
  .admin-head-actions { width: 100%; }
  .admin-head-actions > * { flex: 1; }
  .project-search-controls { grid-template-columns: 1fr; }
  .project-search-controls > * { width: 100%; }
  .admin-metrics { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .admin-metrics article { padding: 14px 10px; }
  .admin-metrics small { font-size: 7px; }
  .admin-metrics strong { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-span { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions > * { width: 100%; }
  .setup-notice { align-items: flex-start; flex-direction: column; }
  .archive-panel, .archived-section-list article { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
  .archive-facts { justify-content: space-between; }
  .section-editor-head, .key-point-editor-head { align-items: stretch; flex-direction: column; }
  .section-editor-actions, .key-point-editor-actions { flex-wrap: wrap; }
  .section-editor-actions > *, .key-point-editor-actions > * { flex: 1; }
  .section-order-form { align-items: stretch; flex-direction: column; }
  .section-editor-fields, .key-point-editor-fields { grid-template-columns: 1fr; }
  .add-point-actions { align-items: stretch; flex-direction: column; }
  .inline-add-form { grid-template-columns: 1fr; }
  .project-delete-form { grid-template-columns: 1fr; }
}

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