:root {
  color-scheme: light;
  --bg: #f7f6f1;
  --paper: #fffefa;
  --ink: #1e3029;
  --muted: #54645b;
  --green: #205d48;
  --deep: #153b31;
  --mint: #daf2d3;
  --line: #dce3d9;
  --danger: #9a302b;
  --shadow: 0 2px 5px #1c3c2710;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button[disabled] { opacity: .52; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #527b56; outline-offset: 3px; }
svg { width: 21px; height: 21px; flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 6.5vw, 2.7rem); line-height: 1.1; letter-spacing: -.055em; }
h2 { font-size: 1.16rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }

.top { padding-top: env(safe-area-inset-top); background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner {
  max-width: 1000px;
  margin: auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 1.24rem; font-weight: 780; letter-spacing: -.05em; }
.brand img { width: 37px; height: 37px; border-radius: 12px; }
.brand b { color: var(--green); }
.private { font-size: .81rem; color: #395c4c; background: #e8efe7; border-radius: 999px; padding: 5px 10px; }

.page {
  max-width: 1000px;
  min-width: 0;
  margin: auto;
  padding: 19px 16px calc(104px + env(safe-area-inset-bottom));
  display: grid;
  gap: 15px;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pos-layout { display: grid; gap: 15px; }
.pos-layout > * { min-width: 0; }
.pos-catalog { align-content: start; }
.stack { display: grid; gap: 10px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions.equal > * { flex: 1 1 132px; }

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 134px;
  padding: 17px 18px;
  color: #fff;
  background: linear-gradient(112deg, #133d31, #205840 76%, #2a674f);
  border-radius: 23px;
  box-shadow: 0 7px 16px #173f3226;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at calc(100% - 38px) 37px, transparent 56px, #f2ffd812 57px, transparent 58px),
    radial-gradient(circle at calc(100% - 38px) 37px, transparent 78px, #f2ffd812 79px, transparent 80px),
    radial-gradient(circle at calc(100% - 38px) 37px, transparent 100px, #f2ffd812 101px, transparent 102px);
}
.hero > svg {
  position: absolute;
  top: 17px;
  right: 17px;
  box-sizing: content-box;
  width: 23px;
  height: 23px;
  padding: 10px;
  color: var(--mint);
  background: #dcf6cc20;
  border: 1px solid #dcf6cc30;
  border-radius: 15px;
}
.hero-label { max-width: calc(100% - 57px); font-size: .95rem; font-weight: 650; color: var(--mint); }
.hero-value { max-width: calc(100% - 47px); font-size: clamp(2.05rem, 9vw, 3rem); line-height: 1; font-weight: 780; letter-spacing: -.055em; overflow-wrap: anywhere; }
.hero .muted { color: #e0eee6; }
.hero .btn { margin-top: 4px; justify-self: start; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: .875rem; }

.btn, .category, .row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  font-weight: 650;
  text-align: center;
}
.btn, .category, .row-button, .card { box-shadow: var(--shadow); }
.primary { color: white; background: var(--green); border-color: var(--green); }
.light { color: var(--deep); background: var(--mint); border-color: var(--mint); }
.danger { color: var(--danger); }
.small { min-height: 41px; padding: 6px 10px; }
.icon-button { width: 44px; padding: 8px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.category {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  gap: 8px;
  min-height: 96px;
  padding: 11px 12px;
  border-radius: 16px;
  font-size: .93rem;
  line-height: 1.18;
  text-align: left;
  overflow-wrap: anywhere;
}
.category-icon { display: grid; width: 35px; height: 35px; place-items: center; color: var(--green); background: #e2efe7; border-radius: 10px; }
.category-icon.amber { color: #7e501d; background: #f8ead2; }
.category-icon.blue { color: #2b5b7e; background: #e5eef8; }
.category-icon.rose { color: #854a40; background: #f7e7df; }
.category-icon.violet { color: #684982; background: #eee8f8; }
.row-button svg { color: var(--green); }
.card { display: grid; gap: 10px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.row-button { justify-content: space-between; width: 100%; text-align: left; }
.row-button > span { min-width: 0; overflow-wrap: anywhere; }
.row-button strong, .row-button small { display: block; }
.row-button small { margin-top: 4px; color: var(--muted); font-size: .84rem; font-weight: 450; }
@media (hover: hover) {
  .category:hover, .row-button:hover, .btn:hover:not(.primary):not(.light) { background: #edf4eb; }
  .primary:hover { background: #184a3b; }
}

.field, .search { display: grid; gap: 5px; font-size: .88rem; font-weight: 620; }
.field span, .search span { overflow-wrap: anywhere; }
.field input, .field select, .search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  background: var(--paper);
  border: 1px solid #bccdc2;
  border-radius: 11px;
  font-size: 1rem;
  font-weight: 450;
}
.field select {
  appearance: none;
  padding-right: 25px;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.search { position: relative; }
.search input { min-height: 48px; padding-left: 42px; border-color: var(--line); box-shadow: var(--shadow); }
.search > svg { position: absolute; left: 13px; top: 13px; color: var(--muted); pointer-events: none; }
.pair { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pair strong { text-align: right; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trail { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.trail .btn { min-height: 40px; }

.dock {
  position: fixed;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: #fffefa;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 22px #244c3212;
}
.dock a { display: grid; flex: 1 1 0; justify-items: center; gap: 4px; min-width: 0; max-width: 150px; padding: 7px 2px; border-radius: 12px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.dock a[aria-current=page] { color: #164e38; background: #e1efdf; font-weight: 760; }

dialog {
  width: min(520px, calc(100% - 22px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 16px 60px #122a2870;
}
dialog::backdrop { background: #132f2899; }
.dialog-body { display: grid; gap: 13px; padding: 16px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head button { border-radius: 50%; }
.dialog-head h2 { font-size: 1.25rem; }
.notice { color: var(--danger); font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 3; bottom: calc(76px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 10px 14px; color: white; background: var(--deep); border-radius: 12px; box-shadow: 0 4px 15px #132f2844; }
.code { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.reader-frame { position: relative; overflow: hidden; border-radius: 14px; background: #122820; }
.reader { display: block; width: 100%; height: clamp(150px, 33dvh, 300px); object-fit: contain; }
.reader-guide {
  position: absolute;
  inset: 33% 12%;
  border: 2px solid #f4fff1d9;
  border-radius: 10px;
  box-shadow: 0 0 3px #000a;
  pointer-events: none;
}
.field input[type=range] { padding-inline: 0; background: transparent; border: 0; accent-color: var(--green); }
.nowrap { white-space: nowrap; }
.separator { margin: 2px 0; border: 0; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[hidden] { display: none !important; }

@media (min-width: 620px) {
  .page { padding: 24px 20px 100px; }
  .top-inner { padding-inline: 20px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cash-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}

@media (min-width: 790px) {
  .pos-layout { grid-template-columns: minmax(270px, .72fr) minmax(0, 1fr); align-items: start; gap: 20px; }
}

.count-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.count-meta { display: grid; gap: 3px; font-size: .9rem; }
.count-meta .pair { gap: 6px; }
.count-total {
  display: grid;
  gap: 2px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #e7f2e6;
  color: var(--deep);
  font-size: .875rem;
  font-weight: 650;
}
.count-total strong { font-size: clamp(1.55rem, 6vw, 2.1rem); line-height: 1.05; }
.count-breakdown { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 10px; }
.count-breakdown h3 { padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.count-breakdown ul { padding: 0; margin: 0; list-style: none; }
.count-breakdown li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.count-breakdown li:last-child { border-bottom: 0; }
.count-breakdown .pair { gap: 4px; font-size: .81rem; }
.count-detail { font-size: .78rem; line-height: 1.2; color: var(--muted); }

.count-difference { color: var(--danger); font-size: .82rem; font-weight: 700; }
.count-difference.balanced { color: var(--green); }
.payment-change { background: #e7f2e6; }
.payment-change .pair strong { font-size: 1.23rem; }

.backup-code textarea {
  width: 100%;
  min-height: 70px;
  padding: 9px 10px;
  resize: vertical;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #bccdc2;
  border-radius: 11px;
  font: 1rem system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.roll-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coin-detail { display: grid; gap: 4px; }
.coin-detail:empty { display: none; }
.coin-detail .pair:last-of-type { padding-top: 4px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 650; }
.coin-detail .btn { justify-self: start; }

.btn[aria-pressed="true"] { color: var(--deep); background: var(--mint); border-color: #b7d5b6; }
.ticket-status { justify-self: start; padding: 4px 8px; border-radius: 8px; font-size: .86rem; font-weight: 680; }
.ticket-status.registered { color: #24533b; background: #e3f1e3; }
.ticket-status.pending { color: #714918; background: #f6ecda; }

.outlet-settings { margin: 0; }
.outlet-settings legend { padding: 0 4px; font-weight: 670; }
.outlet-row + .outlet-row { padding-top: 10px; border-top: 1px solid var(--line); }
.outlet-available { display: flex; align-items: center; gap: 8px; font-weight: 620; }
.outlet-available input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }

.notice-card { margin-top: 14px; }
.notice-card form { display: grid; gap: 12px; }
.notice-card .muted:empty { display: none; }
.notice-card .btn:disabled { opacity: .6; cursor: default; }

.other-payment-fields { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.other-payment-fields legend { padding: 0 4px; font-weight: 650; }

.transport-card h2 { margin: 0; }
.transport-status { flex-shrink: 0; padding: .32em .68em; border-radius: 1em; font-size: .875rem; background: #eef0ec; }
.transport-status.pending { background: #fbefd2; color: #744913; }
.transport-status.ready { background: #dceedd; color: #184e35; }
.transport-status.dispatched { background: #e0edfa; color: #234e72; }
.transport-reminder { background: #f8efd8; color: #61471f; }
.transport-settings { margin-top: 16px; }
.transport-settings summary { cursor: pointer; font-weight: 650; }
.transport-settings[open] summary { margin-bottom: 10px; }
.transport-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.transport-photo { display: block; }
.transport-photo img { max-width: 100%; max-height: 520px; object-fit: contain; border-radius: 12px; }
.transport-timeline { padding-left: 1.2em; }
[data-form="transport-list"] textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
[data-form="transport-list"] input[type="file"] { min-width: 0; }
@media (max-width: 390px) { .dock a { font-size: .7rem; } }

.top-team,.team-identity,.team-contact { display: flex; align-items: center; gap: 12px; }
.team-shortcut,.team-chat-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.team-chat-link { color: var(--deep); font-weight: 700; }
.team-avatar { display: inline-flex; flex-shrink: 0; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.team-initial { color: var(--deep); background: var(--mint); font-weight: 750; }
.team-identity .team-avatar { width: 58px; height: 58px; }
.team-identity { margin-bottom: 16px; }
.team-identity h2,.team-identity p,.team-message p { margin: 0; }
.team-contact { width: 100%; text-align: left; color: inherit; font: inherit; }
.team-contact small { display: block; color: var(--muted); }
.team-settings summary { font-weight: 700; cursor: pointer; }
.team-settings[open] summary { margin-bottom: 12px; }
.team-messages { max-height: min(52dvh,600px); overflow: auto; display: grid; gap: 8px; align-content: start; padding: 4px; }
.team-message { max-width: 90%; justify-self: start; background: #f2f3ef; border-radius: 12px; padding: 10px 12px; }
.team-message.own { justify-self: end; background: var(--mint); }
.team-message header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.team-message small { color: var(--muted); font-size: .79rem; }
.team-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
[data-form^="team-"] textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }

[data-form="share-content"] textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.team-message .btn { margin-top: 6px; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101613;
  --paper: #1a231e;
  --ink: #edf4eb;
  --muted: #b4c6b9;
  --green: #367f63;
  --deep: #c4efd7;
  --mint: #263e31;
  --line: #38483e;
  --danger: #ff9b94;
  --shadow: 0 2px 6px #0003;
}
[data-theme="dark"] .brand b { color: #96d8b4; }
[data-theme="dark"] .dock,[data-theme="dark"] .count-summary { background: var(--paper); }
[data-theme="dark"] .dock a[aria-current=page],
[data-theme="dark"] .count-total,
[data-theme="dark"] .payment-change,
[data-theme="dark"] .btn[aria-pressed="true"],
[data-theme="dark"] .transport-status.ready,
[data-theme="dark"] .ticket-status.registered { color: var(--deep); background: var(--mint); border-color: var(--line); }
[data-theme="dark"] .category-icon { color: #b8e8ce; background: #263f33; }
[data-theme="dark"] .category-icon.amber,
[data-theme="dark"] .transport-reminder,
[data-theme="dark"] .ticket-status.pending,
[data-theme="dark"] .transport-status.pending { color: #ffdda8; background: #41341f; }
[data-theme="dark"] .category-icon.blue,
[data-theme="dark"] .transport-status.dispatched { color: #bddcf6; background: #263d50; }
[data-theme="dark"] .category-icon.rose { color: #ffc8bc; background: #482d28; }
[data-theme="dark"] .category-icon.violet { color: #e3cdf8; background: #382d4b; }
[data-theme="dark"] .toast { color: #fff; background: #284839; }
[data-theme="dark"] .transport-status.neutral,[data-theme="dark"] .team-message { background: #303c34; }
[data-theme="dark"] .team-message.own { background: #254a38; }
@media (hover:hover) {
  [data-theme="dark"] .category:hover,[data-theme="dark"] .row-button:hover,
  [data-theme="dark"] .btn:hover:not(.primary):not(.light) { background: #26382e; }
}

.welcome-page { max-width: 570px; margin: 0 auto; padding: max(30px,env(safe-area-inset-top)) 18px max(24px,env(safe-area-inset-bottom)); }
.welcome { display: grid; gap: 18px; min-height: min(75dvh,650px); align-content: center; }
.welcome-intro { position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: start; gap: 22px; min-height: 264px; padding: clamp(22px,7vw,34px); border-radius: 24px; color: #f2faf1; background: linear-gradient(130deg,#153a2e,#205d48); }
.welcome-halo { position: absolute; z-index: -1; width: 335px; aspect-ratio: 1; right: -125px; top: -158px; border-radius: 50%; background: radial-gradient(circle,#9dd8aa54,transparent 60%); border: 1px solid #d2f2d634; box-shadow: 0 0 0 24px #d2f2d613,0 0 0 49px #d2f2d60c; }
.welcome-logo { border-radius: 20px; box-shadow: 0 8px 22px #061e1466; }
.welcome-lead { display: grid; gap: 4px; }
.welcome-lead > p:first-child { color: #dbefdf; font-size: 1.03rem; }
.welcome h1 { font-size: clamp(2.55rem,11vw,4rem); }
.welcome h1 b { color: #ace1ae; }
.welcome-private { margin-top: 10px; font-weight: 650; }
.welcome-access > .actions { margin-top: 12px; }
.welcome-actions .btn { flex: 1 1 145px; justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .welcome-intro { animation: welcome-in 530ms ease-out both; }
  .welcome-halo { animation: welcome-glow 4s ease-in-out 2; }
  @keyframes welcome-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes welcome-glow { 50% { transform: translate(-10px,13px) scale(1.05); } }
}

.welcome-hams { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.welcome-ham { position: absolute; object-fit: contain; height: auto; filter: drop-shadow(0 9px 15px #0b1d17a6); }
.welcome-ham-main { --ham-tilt: -12deg; width: clamp(99px,34%,159px); right: 7%; top: 2%; transform: rotate(var(--ham-tilt)); }
.welcome-ham-small { --ham-tilt: 30deg; width: clamp(61px,20%,103px); right: -1%; bottom: -3%; opacity: .76; transform: rotate(var(--ham-tilt)); }
@media (prefers-reduced-motion: no-preference) {
  .welcome-ham { animation: welcome-ham-drift 6s ease-in-out infinite; }
  .welcome-ham-small { animation-duration: 7.5s; animation-delay: -2.5s; }
  @keyframes welcome-ham-drift {
    0%,100% { transform: translateY(0) rotate(var(--ham-tilt)); }
    50% { transform: translateY(10px) rotate(calc(var(--ham-tilt) + 7deg)); }
  }
}

.chat-inbox { padding: 3px 14px; margin-top: 18px; }
.chat-contact { min-height: 70px; padding: 11px 0; border: 0; background: transparent; }
.chat-contact + .chat-contact { border-top: 1px solid var(--line); }
.chat-contact-main { display: grid; min-width: 0; flex: 1; gap: 4px; }
.chat-contact-main small,.chat-title p,.chat-reply p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-contact-meta { display: grid; justify-items: end; gap: 3px; }
.chat-unread { min-width: 22px; padding: 2px 5px; border-radius: 20px; background: var(--green); color: #fff; font-size: .72rem; text-align: center; }
.chat-room { min-width: 0; display: grid; grid-template-rows: auto minmax(175px,1fr) auto; min-height: 350px; height: min(75dvh,730px); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.chat-room-header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.chat-title { flex: 1; min-width: 0; }
.chat-title h1 { font-size: 1.14rem; overflow-wrap: anywhere; }
.chat-title p { margin: 2px 0 0; font-size: .79rem; }
.chat-icon-btn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 14px; background: transparent; }
.chat-icon-btn:hover { background: var(--bg); }
.chat-icon-btn svg { width: 20px; height: 20px; }
.chat-stream { max-height: none; min-height: 0; overflow-anchor: none; padding: 13px clamp(8px,3vw,26px); background: var(--bg); }
.chat-bubble { max-width: min(90%,560px); padding: 7px 10px 3px; border: 1px solid var(--line); border-radius: 5px 14px 14px 14px; background: var(--paper); }
.chat-bubble.own { border-radius: 14px 5px 14px 14px; }
.chat-bubble p { font-size: .95rem; }
.chat-sender { display: block; margin-bottom: 3px; color: var(--deep); font-size: .81rem; }
.chat-day { justify-self: center; margin: 3px 0; }
.chat-day > span { display: block; border: 1px solid var(--line); border-radius: 20px; padding: 4px 9px; color: var(--muted); background: var(--paper); font-size: .76rem; }
.chat-message-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; color: var(--muted); font-size: .75rem; }
.chat-message-meta .chat-icon-btn { width: 36px; height: 30px; }
.chat-quote,.chat-reply { margin: 0 0 4px; padding: 4px 7px; border-left: 3px solid var(--green); border-radius: 5px; background: color-mix(in srgb,var(--paper) 65%,var(--mint) 35%); }
.chat-quote strong,.chat-quote span { display: block; overflow-wrap: anywhere; font-size: .82rem; }
.chat-quote span { color: var(--muted); }
.chat-reply { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .84rem; }
.chat-reply > div { min-width: 0; }
.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 4px; }
.chat-reaction { padding: 2px 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: .78rem; }
.chat-reaction[aria-pressed="true"] { border-color: var(--green); background: var(--mint); }
.chat-option-preview p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-emoji-picker .btn { min-width: 42px; padding: 5px; font-size: 1.18rem; }
.chat-empty { padding: 8px; text-align: center; }
.chat-composer { padding: 7px 9px; border-top: 1px solid var(--line); }
.chat-compose-line { display: flex; align-items: flex-end; gap: 6px; }
.chat-compose-line .field { flex: 1; min-width: 0; }
.chat-compose-line textarea { display: block; min-height: 44px; max-height: 100px; resize: vertical; color: var(--ink); background: var(--bg); }
.chat-compose-line .chat-send { background: var(--green); color: #fff; }
.chat-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top-links { display: flex; gap: 13px; align-items: center; }
#agenda-shortcut.has-event { position: relative; }
#agenda-shortcut.has-event::after { content: ''; width: 7px; height: 7px; position: absolute; top: 7px; right: -5px; border-radius: 100%; background: var(--green); }
.agenda-calendar { display: grid; gap: 12px; }
.agenda-calendar-bar { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.agenda-calendar-bar h2 { text-align: center; font-size: 1rem; }
.agenda-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; align-items: center; }
.agenda-weekday { text-align: center; color: var(--muted); font-size: .84rem; }
.agenda-day { position: relative; min-height: 40px; border: 1px solid transparent; border-radius: 10px; background: var(--paper); color: var(--ink); }
.agenda-day:hover { background: var(--bg); }
.agenda-day[aria-pressed="true"] { color: var(--deep); background: var(--mint); border-color: var(--line); font-weight: 750; }
.agenda-day[aria-current="date"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); font-weight: 800; }
.agenda-day span { position: absolute; bottom: 4px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.agenda-date { margin: 16px 0 7px; }
.agenda-published p { margin: 5px 0 8px; }
.agenda-description { white-space: pre-wrap; overflow-wrap: anywhere; }
[data-form="agenda-event"] textarea { display: block; width: 100%; color: var(--ink); background: var(--paper); padding: 10px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
@media (max-width: 350px) {
  .top-links { gap: 8px; }
  .chat-room-header { gap: 4px; }
}

.transport-editor { border-top: 1px solid var(--line); }
.transport-editor-row { min-width: 0; margin: 0; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); }
.transport-editor-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(85px,32%); gap: 7px; }
.transport-editor-row details summary { font-size: .79rem; color: var(--muted); cursor: pointer; padding: 4px 0; }
.transport-editor-row .actions { margin-top: 0; }
.transport-checklist-toolbar { position: sticky; top: 0; z-index: 1; background: var(--paper); padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
.transport-checklist-toolbar .pair { align-items: center; flex-wrap: wrap; gap: 6px; }
.transport-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.transport-filters .btn { padding-inline: 8px; }
.transport-checklist-rows { list-style: none; padding: 0; margin: 0; }
.transport-checklist-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 49px; padding: 3px 4px 3px 5px; border-bottom: 1px solid var(--line); }
.transport-item-main { min-width: 0; flex: 1; }
.transport-item-main > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; overflow-wrap: anywhere; }
.transport-item-name { font-size: .91rem; }
.transport-item-quantity { color: var(--deep); font-size: .79rem; }
.transport-item-note { flex-basis: 100%; font-size: .77rem; }
.transport-item-state { font-size: .73rem; color: var(--muted); }
.transport-item-state.unavailable { color: var(--danger); font-weight: 700; }
.transport-item-badge { flex-shrink: 0; padding: 3px 6px; border-radius: 8px; font-size: .75rem; background: var(--bg); font-weight: 680; }
.transport-checklist-row.prepared { background: color-mix(in srgb,var(--mint) 45%,var(--paper)); }
.transport-checklist-row.prepared .transport-item-name { text-decoration: line-through; }
.transport-item-badge.prepared { background: var(--mint); color: var(--deep); }
.transport-item-badge.unavailable { color: var(--danger); background: color-mix(in srgb,var(--danger) 11%,var(--paper)); }
.transport-progress { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; color: var(--muted); font-size: .8rem; }
.transport-progress span { padding: 2px 6px; background: var(--bg); border-radius: 8px; }
.transport-item-controls { display: flex; flex-shrink: 0; gap: 3px; }
.transport-item-control { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); }
.transport-item-control.prepared { color: var(--deep); }
.transport-item-control.prepared[aria-pressed="true"] { background: var(--mint); border-color: var(--green); }
.transport-item-control.unavailable[aria-pressed="true"] { color: var(--danger); border-color: var(--danger); background: color-mix(in srgb,var(--danger) 11%,var(--paper)); }
.transport-item-control svg,.transport-control-legend svg { width: 16px; height: 16px; }
.transport-control-legend { display: flex; align-items: center; justify-content: end; gap: 4px; margin-top: 4px; font-size: .74rem; color: var(--muted); }
.transport-control-legend svg:not(:first-child) { margin-left: 7px; }

.transport-queue-status { font-size: .75rem; }

.chat-sticker-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.chat-sticker-choice { min-width: 0; padding: 4px; border: 1px solid transparent; border-radius: 12px; background: none; color: inherit; cursor: pointer; }
.chat-sticker-choice:hover, .chat-sticker-choice:focus-visible { border-color: var(--green); background: var(--bg); }
.chat-sticker { display: inline-grid; justify-items: center; gap: 2px; padding: 8px 10px; border: 2px solid currentColor; border-radius: 16px; color: #205c43; background: #e2f4d9; text-align: center; }
.chat-sticker strong { font-size: .83rem; line-height: 1.15; overflow-wrap: anywhere; }
.chat-sticker-emoji { font-size: 2rem; line-height: 1.2; }
.chat-sticker.sticker-blue { color: #264f81; background: #dfedff; }
.chat-sticker.sticker-pink { color: #843656; background: #fce6ef; }
.chat-sticker.sticker-orange { color: #824817; background: #fff0d7; }
.chat-sticker-message.team-message, .chat-sticker-message.team-message.own { background: var(--paper); }
.chat-sticker-message .chat-sticker { margin-top: 4px; }

.chat-sticker-image { display: block; max-width: 100%; object-fit: contain; border-radius: 5px; }
.chat-sticker-saved { position: relative; display: grid; justify-items: center; min-width: 0; background: var(--bg); border-radius: 12px; }
.chat-sticker-saved .chat-sticker-choice { width: 100%; display: grid; place-items: center; padding: 8px 6px; }
.chat-sticker-remove.chat-icon-btn { position: absolute; top: 1px; right: 1px; width: 32px; height: 32px; min-width: 0; min-height: 0; background: var(--paper); }
.chat-sticker-remove svg { width: 16px; height: 16px; }
.chat-sticker-pack summary { cursor: pointer; padding: 6px 0; font-weight: 650; }

[data-emergency-contacts] summary { cursor: pointer; font-weight: 650; }
[data-emergency-contacts] details[open] > summary { margin-bottom: 12px; }
[data-emergency-contacts] details > p { margin-bottom: 10px; }
.emergency-note { white-space: pre-wrap; overflow-wrap: anywhere; }

.ft-order-group summary { cursor: pointer; font-weight: 700; }
.ft-order-catalog { margin-top: 8px; }
.ft-order-entry { display: grid; grid-template-columns: minmax(0,1fr) 72px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ft-order-entry:last-child { border-bottom: 0; }
.ft-order-entry small, .ft-transfer-table small { display: block; color: var(--muted); font-weight: 450; }
.ft-order-entry input, .ft-order-adjust input { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.ft-order-adjust { margin-top: 5px; font-size: .83rem; }
.ft-order-adjust summary { cursor: pointer; }
.ft-order-adjust .actions { margin-top: 6px; }
.ft-transfer-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ft-transfer-table th, .ft-transfer-table td { text-align: left; vertical-align: top; padding: 8px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.ft-transfer-table :is(th,td):not(:first-child) { text-align: right; }
.ft-transfer-table thead { color: var(--muted); }
.ft-shortfall { color: var(--danger); font-weight: 700; }

.ft-document-pages { overflow-x: auto; }
.ft-document-pages img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: white; }
.dialog-body:has([data-transport-preview]) > .dialog-head { position: sticky; top: 0; z-index: 1; background: var(--paper); }

.ft-order-entry { grid-template-columns: minmax(0,1fr) auto; }
.transport-editor-line { grid-template-columns: minmax(0,1fr) auto; }
.transport-quantity-control { display: flex; justify-content: flex-end; align-items: center; gap: 3px; }
.transport-quantity-control .transport-quantity-input { width: 46px; min-height: 42px; text-align: center; padding-inline: 3px; font-variant-numeric: tabular-nums; }
.transport-quantity-button { border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--green); font-size: 1.15rem; font-weight: 700; width: 42px; height: 42px; }
.expiry-date { min-width: 0; border: 0; padding: 0; margin: 0; }
.expiry-date legend { font-weight: 650; margin-bottom: 5px; }
.expiry-date > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.expiry-date select { min-width: 0; width: 100%; padding-inline: 6px; }

.expiry-suggestions { list-style: none; padding: 2px 0; margin: 4px 0 0; border: 1px solid var(--line); border-radius: 10px; }
.expiry-suggestions li + li { border-top: 1px solid var(--line); }
.expiry-suggestion { width: 100%; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; text-align: left; }
.expiry-suggestion:is(:hover,:focus-visible) { background: var(--bg); }

.store-transfer-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.store-transfer-product small { display: block; color: var(--muted); }
.store-transfer-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.store-transfer-items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.store-transfer-items li { display: grid; gap: 3px; padding-block: 8px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.store-transfer-items li span { color: var(--muted); }
[data-form="store-transfer"] :is(select[name="destination"],textarea[name="notes"]) { width: 100%; }

@media (max-width: 365px) {
  .top-inner, .top-links, .top-team { gap: 5px; }
  .top-inner { padding-inline: 10px; }
  .brand { font-size: 1.1rem; }
}

.flight-board { border: 1px solid #23474a; border-radius: 12px; overflow: hidden; background: #15282b; color: #f1f6f4; }
.flight-board h2 { margin: 0; padding: 12px 10px; background: #20383a; color: #ffdb80; }
.flight-board table { width: 100%; border-spacing: 0; text-align: left; font-size: .86rem; }
.flight-board th, .flight-board td { padding: 8px 7px; vertical-align: top; overflow-wrap: anywhere; }
.flight-board th { color: #ffdb80; font-size: .77rem; }
.flight-board td { border-top: 1px solid #385155; }
.flight-board tbody tr:nth-child(even) { background: #1e3537; }
.flight-board small { display: block; color: #c5d9d5; }
.flight-board small:empty { display: none; }
.flight-board-delay { color: #ffd166; font-weight: 750; }
.flight-board-empty { margin: 0; padding: 12px 10px; }
.flight-board .flight-board-mobile { display: none; }
@media (max-width: 600px) {
  .flight-board .flight-board-extra { display: none; }
  .flight-board .flight-board-mobile:not(:empty) { display: block; }
  .flight-board th, .flight-board td { padding-inline: 6px; }
}

.flight-summary h2 { margin: 0 0 4px; }

.flight-demand-period h3 { margin: 0 0 6px; }
.flight-demand-period p { margin: 0; }
.flight-demand-period .flight-demand-time {
  font-size: clamp(1.65rem, 5vw, 2.5rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
}
