:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --base: #e9e9ee;
  --wash: #f8f8fa;
  --shade: #d8d8df;
  --solid: #f4f4f7;
  --glass: rgb(248 248 250 / .77);
  --ink: #202024;
  --muted: #565660;
  --stroke: #18182023;
  --gleam: #fff9;
  --shadow: 0 3px 8px #18182012, 0 18px 46px #18182018;
  --button: #252529;
  --on-button: #fafafa;
  --selected: #e5e5ec;
  --input: #fafafd;
  --status: #464650;
  --success: #29563d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --base: #19191c;
    --wash: #303036;
    --shade: #111115;
    --solid: #2c2c32;
    --glass: rgb(48 48 54 / .79);
    --ink: #f4f4f7;
    --muted: #c2c2cc;
    --stroke: #ededff26;
    --gleam: #ffffff24;
    --shadow: 0 3px 9px #0005, 0 19px 49px #0005;
    --button: #eeeef3;
    --on-button: #252529;
    --selected: #3e3e48;
    --input: #313138;
    --status: #dddded;
    --success: #ade1bf;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 17% 0%, var(--wash), transparent 66%),
    linear-gradient(145deg, var(--base), var(--shade));
  line-height: 1.45;
}
main { max-width: 1060px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
.brand { display: flex; align-items: center; gap: 9px; margin: 0 0 17px; color: var(--muted); font-size: .94rem; font-weight: 670; }
.surface { min-width: 0; padding: clamp(16px, 3vw, 26px); border: 1px solid var(--stroke); border-radius: 23px; background: var(--solid); box-shadow: inset 0 1px 0 var(--gleam), var(--shadow); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .surface { background: var(--glass); backdrop-filter: blur(22px) saturate(118%); -webkit-backdrop-filter: blur(22px) saturate(118%); }
}
@media (prefers-reduced-transparency: reduce) {
  .surface { background: var(--solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.intro { margin-bottom: 15px; }
h1,h2,p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; letter-spacing: -.055em; }
h2 { font-size: 1.17rem; letter-spacing: -.025em; }
p { color: var(--muted); }
.intro p { margin-top: 8px; }
#description { white-space: pre-wrap; }
.layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(235px, 1fr); gap: 15px; align-items: start; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
header span { color: var(--muted); font-size: .86rem; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 1px; column-gap: 9px; align-items: start; padding: 8px 0; border-top: 1px solid var(--stroke); }
.item-title { display: flex; gap: 9px; align-items: center; min-width: 0; min-height: 44px; font-weight: 660; overflow-wrap: anywhere; }
.item-title span { min-width: 0; }
.item-title input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--button); }
.item-photo {
  width: 54px; height: 54px; flex: 0 0 54px; object-fit: contain;
  background: #fff; border: 1px solid var(--stroke); border-radius: 11px;
}
.item-title:has(input:enabled), button:not(:disabled) { cursor: pointer; }
.item-title:has(input:disabled) { color: var(--muted); }
.item-meta { grid-column: 1 / -1; margin: -3px 0 0 31px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: .88rem; }
.item.with-photo .item-meta { margin-inline-start: 94px; margin-block-start: 1px; }
.item-status { align-self: center; max-width: 118px; background: var(--selected); color: var(--status); padding: 4px 8px; border-radius: 20px; font-size: .76rem; text-align: center; }
a { color: var(--ink); text-underline-offset: .16em; }
form { position: sticky; top: 13px; }
form p { margin: 6px 0 11px; font-size: .9rem; }
form label { display: block; font-size: .9rem; margin-bottom: 5px; font-weight: 620; }
form input, button { width: 100%; min-height: 45px; padding: 8px 12px; border-radius: 13px; font: inherit; }
form input { border: 1px solid var(--stroke); color: var(--ink); background: var(--input); }
button { margin-top: 10px; border: 1px solid var(--stroke); color: var(--on-button); background: var(--button); font-weight: 700; transition: opacity 150ms ease, transform 150ms ease; }
button:disabled { opacity: .52; }
button:active:not(:disabled) { transform: scale(.98); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#feedback:empty { display: none; }
#feedback[data-success] { color: var(--success); font-weight: 640; }
.empty { padding: 13px 0; }
@media (max-width: 640px) {
  .layout { grid-template-columns: 1fr; }
  form { position: static; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; } }
