:root {
  --bg: #e9eeec; --card: #fff; --ink: #16231f; --dim: #54655f; --line: #cfd9d5;
  --main: #14604b; --on-main: #fff; --soft: #dcebe4; --warn: #9a4a00; --warn-soft: #fdebd3; --bad: #b3261e;
  --c0: #c8372d; --c1: #1f6fb8; --c2: #2b8a3e; --c3: #a87400; --c4: #7b4bb3; --c5: #c2185b; --c6: #00838f; --c7: #5d4037;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101816; --card: #1a2522; --ink: #e8efec; --dim: #a0b1ab; --line: #32423d;
    --main: #5cc9a3; --on-main: #08241b; --soft: #21382f; --warn: #f5b266; --warn-soft: #3a2b17; --bad: #ff8a80;
    --c0: #ff7b72; --c1: #6fb3ef; --c2: #6fcf83; --c3: #e3b341; --c4: #bf9bf0; --c5: #f48fb1; --c6: #4dd0e1; --c7: #bcaaa4;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, "Segoe UI", sans-serif; }
#app { max-width: 880px; margin: 0 auto; padding: 16px 16px 96px; }
h1, h2 { line-height: 1.2; font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif; }
h1 { font-size: 1.6rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.center { text-align: center; padding: 48px 0; }
.dim { color: var(--dim); font-size: .9rem; }
header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
header h1 { flex: 1 1 240px; display: flex; gap: 10px; align-items: center; }
header h1 img { width: 36px; height: 36px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.card.link { border: 2px solid var(--main); }
.welcome { max-width: 480px; margin: 8vh auto; padding: 28px; }
.welcome img { width: 64px; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 13px; min-height: 40px; cursor: pointer; }
button:hover { border-color: var(--main); }
button.main { background: var(--main); color: var(--on-main); border-color: var(--main); font-weight: 600; }
button.small { padding: 3px 10px; min-height: 34px; font-size: .88rem; }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--c1); outline-offset: 2px; }
input[type=text], input[type=search], textarea { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-height: 40px; }
textarea { min-height: 150px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--main); flex: none; }
label.check { display: inline-flex; gap: 8px; align-items: center; min-height: 34px; cursor: pointer; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.row > input[type=text], .row > input[type=search] { flex: 1 1 200px; width: auto; min-width: 0; }
nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 14px; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 6px 0; }
nav button { padding: 6px 4px; }
nav button[aria-current] { background: var(--main); color: var(--on-main); border-color: var(--main); font-weight: 600; }
nav small { display: block; font-variant-numeric: tabular-nums; }
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
ul.list li:first-child { border-top: 0; }
.grow { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.title { font-weight: 600; }
.who { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .88rem; color: var(--dim); }
.p { display: inline-flex; align-items: center; gap: 4px; }
.p svg { width: 15px; height: 15px; flex: none; }
.c0 { color: var(--c0); } .c1 { color: var(--c1); } .c2 { color: var(--c2); } .c3 { color: var(--c3); }
.c4 { color: var(--c4); } .c5 { color: var(--c5); } .c6 { color: var(--c6); } .c7 { color: var(--c7); }
.p span { color: var(--ink); }
.tag { display: inline-block; font-size: .8rem; border-radius: 6px; padding: 1px 8px; background: var(--soft); margin-left: 6px; font-weight: 400; white-space: nowrap; }
.tag.open { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 0 0 auto; max-width: 50%; }
.err { color: var(--bad); font-weight: 600; }
details summary { cursor: pointer; padding: 6px 0; font-weight: 600; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 16px; display: none; gap: 14px; align-items: center; z-index: 5; }
#toast.on { display: flex; }
#toast button { background: none; border-color: currentColor; }
@media (max-width: 560px) {
  ul.list li.wrap { flex-wrap: wrap; }
  li.wrap .grow { flex-basis: 100%; }
  li.wrap .acts { max-width: 100%; justify-content: flex-start; }
  nav { grid-template-columns: repeat(6, 1fr); position: static; }
  nav button { font-size: .88rem; grid-column: span 2; }
  nav button:nth-child(n+4) { grid-column: span 3; }
  nav.four button { grid-column: span 3; }
}
a.mark { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 2px dashed var(--main); border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; cursor: grab; }
a.mark svg { width: 20px; height: 20px; }
.phone { display: none; }
@media (hover: none) and (pointer: coarse) { .phone { display: block; } .desk { display: none; } }
.combo { position: relative; flex: 1 1 200px; min-width: 0; }
.sug { position: absolute; z-index: 4; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--main); border-radius: 8px; max-height: 320px; overflow-y: auto; box-shadow: 0 6px 20px #0003; }
.sug li { padding: 8px 10px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.sug li small { color: var(--dim); margin-left: 8px; }
.sug li:hover, .sug li[aria-selected=true] { background: var(--soft); }
footer.center { padding: 0 0 24px; }
footer a { color: inherit; }
.review { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-height: 40px; width: 55%; min-width: 0; }
@media (max-width: 560px) { li.wrap select { width: 100%; } }
