:root {
  color-scheme: light;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: #212620;
  background: #f6f5ee;
  --paper: #f6f5ee;
  --white: #fffef9;
  --ink: #212620;
  --muted: #5e655b;
  --green: #245341;
  --line: #dedfd4;
  --lime: #deeeab;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { touch-action: manipulation; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, .wake-card:focus-within { outline: 3px solid #54856a; outline-offset: 3px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shell { max-width: 610px; margin: auto; padding: max(14px, env(safe-area-inset-top)) 20px calc(105px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.title-block { min-width: 0; flex: 1; }
.brand-icon, .sun-icon, .empty-icon { display: grid; place-items: center; flex: none; }
.brand-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: var(--lime); }
.brand-icon svg { width: 19px; height: 19px; }
.icon-button { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--green); }
h1 { margin: 0 0 2px; font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.04em; line-height: 1.06; font-size: clamp(23px, 7vw, 33px); overflow-wrap: anywhere; }
.sync { margin: 0; display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.2; }
.sync i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #a78041; }
.sync i[data-ready="true"] { background: #4b7954; }
.wake-card { display: flex; align-items: center; gap: 8px; position: relative; min-height: 44px; margin-top: 8px; border-radius: 10px; padding: 5px 8px; color: var(--green); cursor: pointer; }
.sun-icon svg { width: 18px; height: 18px; }
.wake-copy { display: flex; flex: 1; align-items: baseline; flex-wrap: wrap; column-gap: 7px; }
.wake-copy strong { font-size: 13px; }
.wake-copy span { font-size: 12px; color: #55634f; }
.wake-copy span:empty { display: none; }
.wake-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch { pointer-events: none; width: 43px; height: 26px; padding: 3px; border-radius: 20px; background: #77816f; }
.switch::before { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: white; }
input:checked + .switch { background: var(--green); }
input:checked + .switch::before { transform: translateX(17px); }
.list-section { margin-top: 24px; }
.wake-card + .list-section { margin-top: 8px; }
.list-section h2 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 18px; letter-spacing: -.025em; }
.wake-card + .list-section h2 { margin-bottom: 2px; }
.sort-open { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: inherit; border: 0; padding: 0 10px 0 0; font-weight: inherit; min-height: 44px; }
.sort-open svg { width: 17px; height: 17px; color: var(--green); }
.count { min-width: 25px; text-align: center; padding: 3px 7px; border-radius: 20px; background: #e9e9df; font-size: 12px; color: var(--muted); }
.items, .suggestions { list-style: none; padding: 0; margin: 0; }
.items { border-radius: 17px; background: var(--white); overflow: hidden; }
.items li { display: flex; align-items: stretch; min-height: 63px; }
.sort-items li { align-items: center; padding: 5px 8px 5px 14px; gap: 4px; }
.sort-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 670; }
.items .sort-move { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; color: var(--green); background: #e8eddc; }
.items .sort-move:disabled { opacity: .38; cursor: default; }
#sort-done { margin-top: 14px; }
.items li + li { border-top: 1px solid #edede4; }
.items button, .suggestions button { border: 0; background: transparent; color: inherit; text-align: left; }
.toggle-item { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 12px 4px 12px 14px; font-size: 17px; font-weight: 670; overflow-wrap: anywhere; }
.check-circle { width: 27px; height: 27px; display: grid; place-items: center; border: 1.5px solid #8b9b82; border-radius: 50%; color: transparent; flex: none; }
.check-circle svg { width: 17px; height: 17px; stroke-width: 2.25; }
.done .check-circle { background: #e6edda; color: var(--green); border-color: transparent; }
.done .item-name { color: var(--muted); text-decoration: line-through; }
.items .edit-item { display: flex; align-items: center; justify-content: flex-end; min-width: 75px; max-width: 48%; padding: 7px 11px 7px 6px; color: var(--green); font-size: 15px; font-weight: 720; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.edit-item svg { width: 14px; height: 14px; color: #65806e; }
.empty { min-height: 187px; display: grid; justify-items: center; align-content: center; text-align: center; gap: 8px; border: 1px dashed #c8d1bb; border-radius: 17px; padding: 18px; }
.empty-icon { border-radius: 15px; background: #e8eddc; color: var(--green); width: 51px; height: 51px; margin-bottom: 4px; }
.empty-icon svg { width: 26px; height: 26px; }
.empty strong { font-family: "Instrument Serif", Georgia, serif; font-size: 25px; font-weight: 400; }
.empty p { color: var(--muted); margin: 0; font-size: 14px; }
.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(610px, 100%); padding: 14px 20px max(16px, env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.primary, .secondary { border: 0; width: 100%; min-height: 54px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; padding: 9px 13px; }
.primary { background: var(--green); color: #fffef7; }
.dock .primary { color: var(--lime); }
.secondary { background: #e8eddc; color: var(--green); }
button:active { filter: brightness(.9); }
dialog { padding: 0; margin: auto auto 0; max-width: 100%; width: min(100%, 570px); max-height: min(88dvh, 100%); overflow: auto; border: 0; border-radius: 23px 23px 0 0; background: var(--paper); color: var(--ink); box-shadow: 0 16px 90px #1a2d2550; }
dialog::backdrop { background: #15251d64; }
body:has(dialog[open]) { overflow: hidden; }
.sheet { padding: 18px 19px max(20px, env(safe-area-inset-bottom)); }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-top h2 { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-size: clamp(27px, 8vw, 42px); font-weight: 400; letter-spacing: -.045em; overflow-wrap: anywhere; }
.sheet h3 { margin: 17px 0 7px; color: var(--muted); font-size: 14px; }
.sheet input, .sheet select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); padding: 8px 11px; font-size: 16px; }
.search { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--white); border-radius: 12px; color: var(--green); padding-left: 11px; }
.search input { border: 0; background: transparent; min-width: 0; }
.suggestions button { width: 100%; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.suggestions strong { display: block; overflow-wrap: anywhere; }
.suggestions small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.measure-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 10px; }
.measure-fields > div, .edit-name, #custom-label, .join label { display: grid; gap: 5px; font-weight: 650; }
#custom-label, #invite-output, .join .secondary { margin-top: 13px; }
.note { color: var(--muted); font-size: 14px; line-height: 1.45; }
.note:empty { display: none; }
.join { display: grid; gap: 6px; margin-top: 19px; border-top: 1px solid var(--line); padding-top: 15px; }
.toast { position: fixed; z-index: 2; left: 50%; bottom: calc(79px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 15px; max-width: 90%; width: max-content; background: #263d32; color: white; border-radius: 13px; font-size: 14px; box-shadow: 0 2px 15px #2222; }
@media (min-width: 650px) {
  .shell { padding-top: 26px; }
  dialog { margin: auto; border-radius: 23px; }
}

#edit-dialog {
  position: fixed;
  inset: calc(var(--edit-top, 0px) + max(8px, env(safe-area-inset-top))) 0 auto;
  margin: 0 auto;
  width: min(calc(100% - 20px), 490px);
  max-height: calc(var(--edit-height, 100dvh) - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
  border-radius: 18px;
  overscroll-behavior: contain;
}
#edit-dialog .sheet { padding: 10px 15px 13px; }
#edit-dialog .sheet-top { margin-bottom: 7px; }
#edit-dialog .sheet-top h2 { font-size: clamp(23px, 6vw, 30px); }
.edit-name { margin-bottom: 9px; }
.edit-actions { display: flex; gap: 8px; margin-top: 10px; }
.edit-actions button { min-height: 44px; flex: 1; }
.danger { border: 1px solid #e4c5bd; border-radius: 13px; background: #f8ebe5; color: #862d23; font-weight: 700; padding: 8px 10px; }
@media (min-width: 650px) {
  #edit-dialog { inset-block-start: calc(var(--edit-top, 0px) + min(10vh, 46px)); }
}
