/* Pidgey day page. Warm paper, hand-lettered headings, one calm page. */
:root {
  --page: #f6efe3;
  --card: #fffdf8;
  --card-2: #fffaf1;
  --line: #ead7b4;
  --dash: #d9bf8f;
  --ink: #3b2a14;
  --ink-2: #5c4a30;
  --muted: #7a6243;
  --done: #8a7a62;
  --brown: #8a4f12;
  --brown-dark: #5e3509;
  --night: #2c2a4a;
  --night-ink: #f4ecff;
  --night-2: #e0d8f5;
  --calm: #e6efe2;
  --calm-line: #b9d0ae;
  --calm-ink: #2f5a2a;
  --peach: #fbe3cf;
  --peach-line: #efc4a0;
  --hand: 'Patrick Hand', 'Comic Sans MS', cursive;
  --body: 'Jost', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.4; }
a { color: var(--brown); }
a:hover { color: var(--brown-dark); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input[type=checkbox] { accent-color: #b8701f; width: 24px; height: 24px; margin: 0; flex: none; cursor: pointer; }
:focus-visible { outline: 3px solid #b8701f; outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 28px 16px 64px; display: flex; flex-direction: column; gap: 22px; }
.loading { font-family: var(--hand); font-size: 28px; text-align: center; color: var(--muted); padding: 80px 0; }
h1, h2, h3 { font-family: var(--hand); font-weight: 400; margin: 0; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hello { display: flex; align-items: center; gap: 14px; }
.hello img { width: 54px; height: 54px; }
.hello p { margin: 0; font-size: 15px; color: var(--muted); }
.hello h1 { font-size: 44px; line-height: 1.05; }
.ghost { min-height: 44px; border: 2px solid var(--line); background: var(--card-2); color: var(--brown); border-radius: 12px; padding: 6px 14px; font-weight: 600; }
.ghost:hover { border-color: var(--dash); }

/* Sky strip */
.sky { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tile { background: var(--card-2); border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; min-height: 104px; }
.tile.night { background: var(--night); border-color: var(--night); color: var(--night-ink); }
.tile.peach { background: var(--peach); border-color: var(--peach-line); flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; }
.tile svg { flex: none; }
.tile .label { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile.night .label { color: #cfc4ee; }
.tile .big { margin: 2px 0 0; font-family: var(--hand); font-size: 26px; line-height: 1.1; }
.tile .small { margin: 0; font-size: 14px; color: var(--ink-2); }
.tile.night .small { color: var(--night-2); }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border-radius: 12px; padding: 8px 14px; font-weight: 600; text-decoration: none; }
.btn.solid { border: 0; background: var(--brown); color: #fff; }
.btn.solid:hover { background: var(--brown-dark); color: #fff; }
.btn.line { border: 2px solid var(--brown); background: var(--card-2); color: var(--brown); }
.linkish { border: 0; background: none; padding: 0; color: var(--brown); font-weight: 600; text-decoration: underline; min-height: 32px; }

/* Clearing minute */
.clearing { background: var(--calm); border: 2px solid var(--calm-line); border-radius: 18px; padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.breath { width: 120px; height: 120px; border-radius: 50%; background: #c9dfc0; animation: breathe 10s ease-in-out infinite; }
.clearing p { margin: 0; color: var(--calm-ink); }
.clearing .cue { font-family: var(--hand); font-size: 30px; }
@keyframes breathe { 0%, 100% { transform: scale(.6); } 40%, 50% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .breath { animation: none; } }

/* Add box */
.add { display: flex; flex-wrap: wrap; gap: 10px; background: var(--card-2); border: 2px solid var(--line); border-radius: 18px; padding: 12px; }
.add input[type=text] { flex: 999 1 300px; min-height: 48px; border: 0; background: transparent; font-size: 18px; padding: 0 10px; outline: none; }
.add input[type=text]:focus-visible { outline: none; }
.add:focus-within { border-color: #c9a56a; }
.add select { flex: 1 0 150px; min-height: 48px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 10px; }
.add button { flex: 1 0 auto; min-height: 48px; border: 0; border-radius: 12px; background: #b8701f; color: #fff; font-weight: 600; font-size: 17px; padding: 0 22px; }
.add button:hover { background: var(--brown); }

/* Main area */
.cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.main { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 22px 24px; }
.side .panel { padding: 18px 20px; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.head h2 { font-size: 34px; }
.side .head h2 { font-size: 28px; }
.head p { margin: 0; font-size: 15px; color: var(--muted); }
.hint { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.empty { margin: 6px 0; padding: 14px 0; color: var(--muted); font-family: var(--hand); font-size: 22px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1.5px dashed var(--line); display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 2px; }
.rows > li > label { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; cursor: pointer; min-height: 44px; }
.rows .text { flex: 1; min-width: 0; font-size: 17px; overflow-wrap: anywhere; }
.rows .done .text, .rows li.done .text { text-decoration: line-through; color: var(--done); }
.when { flex: none; font-size: 14px; color: var(--ink-2); text-align: right; }
.tag { flex: none; font-size: 12px; color: var(--ink-2); border: 1.5px solid #cdb68c; border-radius: 999px; padding: 2px 8px; }
.chip { flex: none; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 10px; border: 0; }
select.chip { appearance: none; -webkit-appearance: none; padding: 6px 12px; min-height: 32px; max-width: 150px; }
.x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.x:hover { background: #f3e6cf; color: var(--ink); }

details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; color: var(--brown); font-weight: 600; min-height: 36px; display: flex; align-items: center; }
details.more .rows > li { min-height: 44px; }

.sub { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--line); }
.sub .head h2 { font-size: 30px; }
.kind { flex: none; width: 104px; text-align: center; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 0; }

form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; align-items: end; }
form.grid label, .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
form.grid input, form.grid select, .field input { min-height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--card-2); padding: 0 10px; font-size: 16px; color: var(--ink); font-weight: 400; }
form.grid button { min-height: 44px; border: 0; border-radius: 12px; background: var(--brown); color: #fff; font-weight: 600; }

/* Dog walks */
.walks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.walk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; border-radius: 14px; font-size: 13px; background: var(--card-2); color: #a8895a; border: 2px dashed var(--dash); }
.walk[aria-pressed=true] { background: var(--brown); color: #fff; border: 2px solid var(--brown); }

/* Lanes */
.lanes { display: flex; flex-wrap: wrap; gap: 8px; }
.lane { font-size: 14px; font-weight: 600; border-radius: 999px; padding: 6px 12px; }
.lane.quiet { opacity: .45; }

/* Lists */
.list { border-radius: 14px; margin-bottom: 10px; }
.list > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 56px; }
.list > summary::-webkit-details-marker { display: none; }
.list .name { flex: 1; font-weight: 600; }
.list .peek { display: block; font-weight: 400; font-size: 14px; color: var(--ink-2); }
.list .count { font-size: 14px; color: var(--ink-2); }
.list .inner { padding: 0 12px 12px; }
.list .rows > li { min-height: 44px; border-top-color: rgba(59, 42, 20, .15); }
.list form { display: flex; gap: 8px; margin-top: 8px; }
.list form input { flex: 1; min-width: 0; min-height: 44px; border: 2px solid rgba(59, 42, 20, .15); border-radius: 12px; background: rgba(255, 255, 255, .7); padding: 0 10px; }
.list form button { min-height: 44px; border: 0; border-radius: 12px; background: var(--brown); color: #fff; font-weight: 600; padding: 0 14px; }

/* Settings */
.settings { display: flex; flex-direction: column; gap: 18px; }
.settings .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.settings .row .field { flex: 1 1 220px; }
.settings .lane-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1.5px dashed var(--line); padding: 10px 0; }
.settings .lane-edit input[type=text] { min-height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--card-2); padding: 0 10px; }
.settings .lane-edit .nm { flex: 1 1 140px; }
.settings .lane-edit .kw { flex: 3 1 260px; }
.settings input[type=color] { width: 48px; height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--card-2); padding: 2px; }

/* Tap to edit */
.edit-me { border: 0; background: none; padding: 4px 0; text-align: left; cursor: pointer; border-radius: 6px; min-height: 40px; display: flex; flex-direction: column; justify-content: center; }
.edit-me:hover { background: #fbf1df; }
.note-line { display: block; font-size: 13px; color: var(--ink-2); white-space: pre-line; }
.amount { flex: none; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.rows > li.upcoming { opacity: .7; }
.rep-mark { flex: none; width: 24px; text-align: center; color: var(--muted); font-size: 18px; }
.rows > li.editing { display: block; padding: 10px 0; }
form.editor { margin-top: 0; background: var(--card-2); border: 2px solid var(--dash); border-radius: 14px; padding: 12px; }
form.editor .wide { grid-column: 1 / -1; }
form.grid textarea { min-height: 64px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 8px 10px; font-size: 16px; color: var(--ink); font-weight: 400; resize: vertical; }
.editor-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.editor-btns button[type=submit] { min-width: 120px; padding: 0 18px; }
.item-edit { display: flex; gap: 8px; width: 100%; }
.item-edit input { flex: 1; min-width: 0; min-height: 44px; border: 2px solid var(--dash); border-radius: 12px; background: #fff; padding: 0 10px; }
.item-edit button { min-height: 44px; border: 0; border-radius: 12px; background: var(--brown); color: #fff; font-weight: 600; padding: 0 14px; }

.top-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Week strip */
.weekstrip { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.wk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wk-day { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 84px; padding: 8px 4px; border-radius: 14px; border: 2px solid transparent; background: var(--card-2); }
.wk-day:hover { border-color: var(--dash); }
.wk-day.today { background: #fbe9c9; border-color: #d89a3a; }
.wk-day.past { opacity: .6; }
.wk-name { font-size: 13px; color: var(--muted); font-weight: 600; }
.wk-day.today .wk-name { color: var(--brown); }
.wk-num { font-family: var(--hand); font-size: 28px; line-height: 1; }
.wk-open { align-self: flex-end; font-size: 14px; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 9px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.sq { border-radius: 2px; }
.dot.done { opacity: .3; }
.more-n { font-size: 11px; color: var(--muted); }

/* Big calendar */
.cal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.tabs { display: flex; gap: 6px; }
.tab { min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--card-2); color: var(--brown); font-weight: 600; font-size: 16px; }
.tab[aria-pressed=true] { background: var(--brown); border-color: var(--brown); color: #fff; }
.cal-panel { padding: 16px; overflow-x: auto; }
.cal-item { display: block; text-align: left; font-size: 13px; line-height: 1.25; padding: 2px 0 2px 6px; border-left: 4px solid #8a7a62; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cal-item.is-date { font-weight: 600; }
button.cal-item { width: 100%; background: none; border-top: 0; border-right: 0; border-bottom: 0; border-radius: 0 6px 6px 0; cursor: pointer; font: inherit; font-size: 13px; }
button.cal-item:hover { background: #fbf1df; }
.cal-item.movable { cursor: grab; }
.cal-item.lifted { opacity: .4; }
.cal-item.upcoming { opacity: .65; }
.drop-here { outline: 3px dashed #b8701f !important; outline-offset: -3px; background: #fbe9c9 !important; }
.day-btn { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; width: 100%; min-height: 28px; border-radius: 6px; }
.day-btn:hover { background: #fbf1df; }
.cal-cell, .cal-col { cursor: pointer; }
.cal-item.done { text-decoration: line-through; color: var(--done); }
.cal-empty { color: var(--muted); font-size: 13px; margin-top: 6px; }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 8px; min-width: 720px; }
.cal-col { display: flex; flex-direction: column; align-items: stretch; min-height: 260px; padding: 10px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--card-2); text-align: left; }
.cal-col .cal-item { white-space: normal; }
.cal-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.cal-head strong { font-family: var(--hand); font-weight: 400; font-size: 26px; color: var(--ink); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 6px; min-width: 700px; }
.cal-dow { font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; padding-bottom: 4px; }
.cal-cell { display: flex; flex-direction: column; align-items: stretch; min-height: 104px; padding: 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--card-2); text-align: left; }
.cal-cell.other { opacity: .45; }
.cal-num { font-family: var(--hand); font-size: 22px; line-height: 1; }

.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.mini-title { font-family: var(--hand); font-size: 22px; text-decoration: none; }
.mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mini { aspect-ratio: 1; min-width: 0; border: 0; border-radius: 6px; background: transparent; font-size: 12px; color: var(--ink-2); padding: 0; }
.mini.busy { background: #f2dfba; color: var(--ink); }
.mini.has-date { box-shadow: inset 0 0 0 2px #a8481a; }
.mini.blank { visibility: hidden; }

.cal-cell.today, .cal-col.today, .mini.today { border-color: #d89a3a; background: #fbe9c9; }
.mini.today { font-weight: 700; }
.cal-cell.picked, .cal-col.picked, .mini.picked { outline: 3px solid var(--brown); outline-offset: 1px; }

.day-add { display: flex; gap: 8px; margin-top: 14px; }
.day-add input { flex: 1; min-width: 0; min-height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--card-2); padding: 0 10px; }
.day-add button { min-height: 44px; border: 0; border-radius: 12px; background: var(--brown); color: #fff; font-weight: 600; padding: 0 16px; }

@media (max-width: 560px) {
  .wk-days { gap: 4px; }
  .wk-day { min-height: 72px; padding: 6px 2px; }
  .wk-num { font-size: 22px; }
}

/* What's on my page */
.choices { display: flex; flex-direction: column; gap: 14px; }
.choices .text strong { display: block; font-weight: 600; }
.choices .peek { display: block; font-size: 14px; color: var(--ink-2); }
.choices .btn { align-self: flex-start; min-width: 200px; border: 0; font-size: 17px; }

/* Login */
.door { max-width: 400px; margin: 8vh auto 0; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 20px 50px rgba(90, 60, 20, .18); }
.door .crown { background: linear-gradient(180deg, #e2a645, #d89a3a); color: #fff; text-align: center; padding: 30px 24px 24px; }
.door .crown img { width: 64px; height: 64px; }
.door .crown h1 { font-size: 36px; margin-top: 6px; }
.door .crown p { margin: 4px 0 0; font-size: 15px; }
.door form { padding: 26px 28px 8px; display: flex; flex-direction: column; gap: 6px; }
.door label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.door input { min-height: 50px; padding: 0 16px; margin-bottom: 12px; font-size: 16px; background: #f9eed6; border: 2px solid #e8cf9e; border-radius: 14px; outline: none; }
.door input:focus { border-color: #d89a3a; }
.door button { min-height: 52px; border: 0; border-radius: 18px; background: var(--brown); color: #fff; font-size: 17px; font-weight: 600; }
.door .err { min-height: 22px; margin: 8px 0 0; color: #b03a2e; text-align: center; }
.door .foot { text-align: center; padding: 12px 0 26px; font-size: 15px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 500; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }

@media (max-width: 560px) {
  .hello h1 { font-size: 34px; }
  .panel { padding: 18px 16px; }
  .rows > li { flex-wrap: wrap; }
  .kind { width: auto; padding: 4px 10px; }
}

select.chip.no-lane { outline: 1.5px dashed #9a9a9a; outline-offset: -1.5px; }
