:root {
  --void: #020805;
  --panel: #06140a;
  --panel-2: #0a1c10;
  --line: rgba(57, 255, 90, 0.28);
  --line-strong: rgba(57, 255, 90, 0.55);
  --green: #39ff5a;
  --green-dim: #1d9a38;
  --green-deep: #0c3d18;
  --amber: #f0c14a;
  --ink: #b8ffc4;
  --muted: #5d9a68;
  --danger: #ff4a3a;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --tap: 44px;
  --glow: 0 0 12px rgba(57, 255, 90, 0.35);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--void);
}

body {
  color: var(--ink);
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

.page {
  height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(57, 255, 90, 0.08), transparent 55%),
    var(--void);
  padding: 0;
  position: relative;
}

.page::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: repeating-linear-gradient(
    to bottom,
    rgba(2, 8, 5, 0) 0,
    rgba(2, 8, 5, 0) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
}

.page::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 601;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

.app {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  height: 100svh;
  background:
    linear-gradient(180deg, rgba(57, 255, 90, 0.04), transparent 28%),
    var(--panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--line);
  animation: boot 0.7s var(--ease) both;
}

.app::before, .app::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 2;
  border-color: var(--green);
  border-style: solid;
  opacity: 0.7;
}
.app::before { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.app::after { top: 8px; right: 8px; border-width: 2px 2px 0 0; }

.header {
  flex-shrink: 0;
  background: transparent;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--sat) + 12px) max(16px, var(--sar)) 10px max(16px, var(--sal));
  min-height: calc(var(--tap) + var(--sat));
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
  color: var(--green);
  filter: drop-shadow(0 0 6px rgba(57, 255, 90, 0.55));
}

.brand-copy { min-width: 0; line-height: 1; }
.brand-sep { display: none; }

.logo {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: var(--glow);
}

.logo-sub {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(57, 255, 90, 0.05);
  color: var(--green);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: none;
  align-items: center;
  gap: 6px;
}
.chip.visible { display: inline-flex; }
.chip.active {
  background: var(--green);
  color: var(--void);
  box-shadow: var(--glow);
}
.chip svg { width: 16px; height: 16px; }

.chip-icon {
  display: inline-flex;
  justify-content: center;
  width: 36px;
  padding: 0;
}
.chip-icon svg { width: 18px; height: 18px; }

.body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 8px;
  gap: 10px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  flex-shrink: 0;
}

.ticket {
  background: linear-gradient(180deg, rgba(57, 255, 90, 0.09), rgba(57, 255, 90, 0.02));
  color: var(--green);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: inset 0 0 24px rgba(57, 255, 90, 0.05), var(--glow);
  padding: 14px 16px 15px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--green);
  border-style: solid;
}
.ticket::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.ticket::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.ticket:active { transform: translateY(1px); filter: brightness(1.15); }

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-countdown {
  background: transparent;
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 3px 8px;
  white-space: nowrap;
  box-shadow: var(--glow);
}

.ticket-date {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.ticket-time {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.7rem, 7vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--glow);
}

.ticket-facts {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.fact { min-width: 0; }
.fact-shop { text-align: right; }

.fact-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fact-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  margin-bottom: 4px;
  white-space: nowrap;
}

.ticket-empty {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.ticket.live {
  animation: pulse 1.8s ease-in-out infinite;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  min-height: var(--tap);
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green);
  margin-top: 2px;
  text-shadow: var(--glow);
}
.stat-sub {
  font-size: 12px;
  color: var(--muted);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  flex-shrink: 0;
}
.weekday {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 0;
}
.weekday.weekend { color: #c9a24a; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.day-cell {
  background: rgba(8, 28, 14, 0.7);
  border-radius: 0;
  padding: 5px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 0;
  overflow: hidden;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), transform 0.12s var(--ease);
}
.day-cell.other-month:not(.has-shift) { opacity: 0.28; }
.day-cell.today {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green), var(--glow);
}
.day-cell.has-shift {
  background: rgba(57, 255, 90, 0.12);
  cursor: pointer;
}
.day-cell.has-shift:active { transform: scale(0.96); }

.day-number {
  font-size: 13px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.day-cell.today .day-number { color: var(--green); }

.shift-info {
  width: 100%;
  flex-shrink: 0;
  margin: auto 0;
  padding-top: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.shift-dot { display: none; }
.shift-time {
  display: inline-block;
  max-width: 100%;
  background: var(--green);
  color: var(--void);
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  border-radius: 0;
  padding: 2px 6px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shift-end { display: none; }
.shift-duration { display: none; }

.dock {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #031009;
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(var(--sab) + 10px);
}
.dock-nav, .dock-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--green);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}
.dock-nav { font-size: 22px; line-height: 1; border: 0; }
.dock-nav:active, .dock-btn:active { transform: scale(0.96); }
.dock-label {
  flex: 1;
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}

.modal-overlay, .panel-overlay, .coach-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 100;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-overlay { align-items: center; justify-content: center; padding: 20px; }
.panel-overlay { align-items: flex-end; justify-content: center; }
.coach-overlay { align-items: flex-end; justify-content: center; padding: 16px; }
.modal-overlay.active, .panel-overlay.active, .coach-overlay.active {
  opacity: 1; pointer-events: auto;
}

.modal, .panel, .coach {
  background: var(--panel);
  width: 100%;
  max-width: 420px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--glow);
}
.modal {
  border-radius: 0;
  padding: 22px 20px 20px;
  transform: translateY(12px);
  transition: transform 0.35s var(--spring);
}
.modal-overlay.active .modal { transform: none; }

.modal-date {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}
.modal-subtitle {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 0 16px;
}
.modal-block {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-row { display: flex; justify-content: space-between; align-items: center; }
.modal-row .label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.modal-row .value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
}
.modal-divider { height: 1px; background: var(--line); }
.modal-location {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.loc-dot { width: 8px; height: 8px; border-radius: 0; background: var(--green); flex-shrink: 0; box-shadow: var(--glow); }

.panel {
  border-radius: 0;
  max-height: min(85dvh, 720px);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s var(--spring);
  padding-bottom: var(--sab);
}
.panel-overlay.active .panel { transform: none; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.panel-close {
  width: var(--tap); height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--green);
  font-size: 22px;
}
.panel-body {
  overflow: auto;
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.segmented {
  display: flex;
  gap: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
}
.seg {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 0;
  min-height: 36px;
}
.seg.active {
  background: var(--green);
  color: var(--void);
}

.totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.total-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
}
.total-card.wide {
  grid-column: 1 / -1;
  background: rgba(57, 255, 90, 0.1);
  border-color: var(--line-strong);
}
.total-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.total-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.15;
}
.total-card.wide .total-value { color: var(--green); }
.total-sub { font-size: 12px; color: var(--muted); }
.total-card.wide .total-sub { color: var(--ink); }

.packet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
}
.packet.current { box-shadow: inset 0 0 0 1px var(--green); }
.packet-range { font-weight: 400; color: var(--ink); }
.packet-hours { font-size: 12px; color: var(--muted); }
.packet-right { text-align: right; flex-shrink: 0; }
.packet-amount {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green);
}
.packet-payday { font-size: 12px; color: var(--muted); }
.packet-payday.due { color: var(--amber); }

.change {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.change-top { display: flex; align-items: center; gap: 8px; }
.change-badge {
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 3px 8px;
  line-height: 1.2;
  border: 1px solid var(--line);
}
.change-badge.added { background: var(--green); color: var(--void); border-color: var(--green); }
.change-badge.removed { background: var(--danger); color: #fff; border-color: var(--danger); }
.change-badge.moved { background: transparent; color: var(--amber); border-color: var(--amber); }
.change-day { font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-line { display: flex; align-items: baseline; gap: 8px; }
.change-tag {
  flex-shrink: 0;
  width: 30px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.change-val {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.change-val.gone { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.change-shop { font-size: 12px; color: var(--muted); }

.seg { position: relative; }
.seg-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--danger);
  display: none;
}
.seg-dot.on { display: block; }
.seg.active .seg-dot { background: var(--void); }

.dock-btn { position: relative; }
.dock-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--danger);
  display: none;
  box-shadow: 0 0 8px var(--danger);
}
.dock-dot.on { display: block; }

.field { display: block; margin-bottom: 12px; }
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.field-input {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 14px;
  min-height: var(--tap);
}
.field-input:focus-within { border-color: var(--green); box-shadow: var(--glow); }
.field-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 16px;
  color: var(--green);
  outline: none;
  padding: 10px 0;
}
.field-fix {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}
.field-group-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 8px;
}
.save-btn {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--green);
  border-radius: 0;
  background: var(--green);
  color: var(--void);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 4px;
}
.save-btn:active { transform: scale(0.98); }
.save-btn[disabled] { opacity: 0.55; }
.save-btn.ghost {
  background: transparent;
  color: var(--green);
}
.save-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
  padding-top: 8px;
}
.save-note.error { color: var(--danger); }

.list-month {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 2px 0;
}
.shift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  min-height: var(--tap);
}
.shift-item.next {
  background: rgba(57, 255, 90, 0.1);
  box-shadow: inset 0 0 0 1px var(--green);
}
.si-date { font-weight: 400; }
.si-right { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.si-range { font-family: 'Rajdhani', sans-serif; font-weight: 700; color: var(--green); }
.si-dur { color: var(--muted); font-size: 12px; }
.list-summary { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0 4px; }

.coach {
  border-radius: 0;
  padding: 18px 18px 16px;
  margin-bottom: var(--sab);
}
.coach h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.coach p { font-size: 14px; color: var(--muted); line-height: 1.45; }
.coach-actions { display: flex; gap: 8px; margin-top: 14px; }
.coach-actions button {
  flex: 1; min-height: var(--tap); border: 1px solid var(--line); border-radius: 0; letter-spacing: 0.1em; text-transform: uppercase;
}
.coach-ok { background: var(--green); color: var(--void); border-color: var(--green); }
.coach-later { background: transparent; color: var(--green); }

@keyframes boot {
  from { filter: brightness(3) saturate(0.2); opacity: 0.4; }
  30% { filter: brightness(0.6); opacity: 1; }
  to { filter: none; opacity: 1; }
}
@keyframes pulse {
  0%, 100% { box-shadow: inset 0 0 24px rgba(57, 255, 90, 0.05), 0 0 12px rgba(57, 255, 90, 0.25); }
  50% { box-shadow: inset 0 0 24px rgba(57, 255, 90, 0.12), 0 0 22px rgba(57, 255, 90, 0.55); }
}

@media (max-width: 390px) {
  .ticket-time { font-size: 1.55rem; }
  .brand-mark { width: 26px; height: 26px; }
  .logo { font-size: 1.15rem; }
  .brand { gap: 8px; }
  #notifyBtn { width: 36px; padding: 0; justify-content: center; }
  #notifyLabel { display: none; }
  .ticket-facts { gap: 12px; }
  .fact-value { font-size: 1rem; }
  .fact-label { font-size: 9.5px; letter-spacing: 0.1em; }
  .shift-time { font-size: 10px; padding: 2px 4px; }
  .dock-btn { font-size: 11px; padding: 0 8px; }
  .chip { padding: 0 10px; }
  .chip-text { display: none; }
  #installBtn.visible { width: 36px; padding: 0; justify-content: center; }
  .seg { padding: 8px 13px; font-size: 11px; }
}

@media (min-width: 430px) {
  .body { padding: 14px 14px 10px; gap: 12px; }
  .calendar-grid { gap: 6px; }
  .weekdays { gap: 6px; }
}

@media (max-height: 780px) {
  .body { gap: 8px; padding: 10px 12px 6px; }
  .hero { gap: 6px; }
  .ticket { padding: 11px 14px 12px; }
  .ticket-date { font-size: 1.15rem; }
  .ticket-time { font-size: clamp(1.45rem, 6vw, 1.75rem); }
  .ticket-facts { margin-top: 7px; padding-top: 8px; }
  .fact-value { font-size: 1rem; }
  .stat { padding: 9px 12px; min-height: 0; }
  .stat-value { font-size: 1.05rem; }
  .stat-sub { font-size: 12px; }
  .weekday { font-size: 10px; }
}

@media (max-height: 700px) and (orientation: portrait) {
  .ticket-label { font-size: 10px; }
  .ticket-date { font-size: 1rem; }
  .ticket-time { font-size: 1.35rem; }
  .ticket { padding: 9px 12px 10px; }
  .ticket-facts { margin-top: 6px; padding-top: 6px; gap: 10px; }
  .fact-value { font-size: 0.9rem; }
  .fact-label { font-size: 9px; margin-bottom: 2px; }
  .stat { padding: 7px 10px; }
  .stat-value { font-size: 0.95rem; }
  .stat-label { font-size: 10px; }
  .stat-sub { display: none; }
  .day-number { font-size: 12px; padding: 0 1px; }
}

.calendar-grid.cells-tight .day-cell { padding: 3px 2px; }
.calendar-grid.cells-tight .day-number { font-size: 11px; }
.calendar-grid.cells-tight .shift-info { padding-top: 2px; gap: 1px; }
.calendar-grid.cells-tight .shift-time {
  font-size: 9px;
  padding: 1px 4px;
  line-height: 1.25;
}
.calendar-grid.cells-dots .shift-time { display: none; }
.calendar-grid.cells-dots .shift-dot {
  display: block;
  width: 6px;
  height: 6px;
  margin: 1px 0 0 1px;
  border-radius: 0;
  background: var(--green);
  box-shadow: var(--glow);
}
.calendar-grid.cells-dots .day-cell.today .shift-dot {
  background: var(--amber);
}

@media (min-width: 768px) {
  .page { padding: 16px; align-items: center; }
  .app {
    max-width: 720px;
    height: min(920px, calc(100dvh - 32px));
    border-radius: 0;
    box-shadow: 0 0 0 1px var(--line), 0 24px 80px rgba(0, 0, 0, 0.65), var(--glow);
  }
  .header { padding-top: 16px; }
  .hero { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
  .shift-end { display: inline; }
  .shift-duration {
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.1;
  }
  .day-cell { padding: 6px; }
  .day-number { font-size: 16px; }
  .shift-time { font-size: 12px; padding: 3px 8px; }
  .shift-info { padding-top: 4px; }
  .panel-overlay { align-items: center; padding: 24px; }
  .panel {
    max-height: 70dvh;
    transform: translateY(12px);
    padding-bottom: 0;
  }
  .panel-overlay.active .panel { transform: none; }
}

@media (min-width: 1024px) {
  .page { padding: 24px; }
  .app {
    max-width: 430px;
    height: min(860px, calc(100dvh - 48px));
  }
  .hero { grid-template-columns: 1fr; }
  .shift-end { display: none; }
  .shift-duration { display: none; }
}

@media (min-width: 1024px) and (min-height: 900px) {
  .app { max-width: 720px; }
  .hero { grid-template-columns: 1.4fr 1fr; }
  .shift-end { display: inline; }
  .shift-duration { display: block; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .page { padding: 0; }
  .app { max-width: none; height: 100dvh; flex-direction: row; flex-wrap: wrap; }
  .header { width: 100%; padding: 8px 16px 8px calc(var(--sal) + 16px); }
  .body {
    flex: 1;
    flex-direction: row;
    padding: 8px 8px 8px calc(var(--sal) + 8px);
  }
  .hero { width: 34%; align-content: start; }
  .ticket { padding: 10px 12px; }
  .ticket-time { font-size: 1.15rem; }
  .ticket-date { font-size: 1.05rem; }
  .ticket-facts { margin-top: 6px; padding-top: 7px; gap: 10px; }
  .fact-value { font-size: 0.9rem; }
  .fact-label { font-size: 9px; margin-bottom: 2px; }
  .header { min-height: 0; }
  .stat { padding: 8px 10px; }
  .weekdays, .calendar-grid { width: auto; }
  .day-cell { min-height: 0; padding: 3px; }
  .cal-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 4px;
  }
  .dock { width: 100%; padding: 6px 10px calc(var(--sab) + 6px); }
}

.lock-gate {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: calc(20px + var(--sat));
  padding-bottom: calc(20px + var(--sab));
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(57, 255, 90, 0.1), transparent 60%),
    var(--void);
}
.lock-gate.active { display: flex; }
.lock-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: var(--glow);
  position: relative;
}
.lock-card::before, .lock-card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--green);
  border-style: solid;
}
.lock-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.lock-card::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.lock-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--green);
}
.lock-brand .brand-mark { width: 34px; height: 34px; }
.lock-card h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}
.lock-card .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.lock-card input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--void);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.28em;
  color: var(--green);
  outline: none;
  padding: 0 14px;
  box-shadow: inset 0 0 16px rgba(57, 255, 90, 0.06);
}
.lock-card input:focus { border-color: var(--green); box-shadow: var(--glow); }
.lock-card button[type="submit"] {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 1px solid var(--green);
  border-radius: 0;
  background: var(--green);
  color: var(--void);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lock-card button[type="submit"]:active { filter: brightness(1.1); }
.lock-card button[disabled] { opacity: 0.6; }
.lock-note {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.lock-note.error { color: var(--danger); }

@media (display-mode: standalone), (display-mode: fullscreen) {
  .page { padding: 0; background: var(--void); }
  .app {
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: inset 0 0 0 1px var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
