/* Trip: a travel wallet. Pale sky background, white cards, navy ink, and one object with character:
   the trip shown as a ticket with an airmail edge and a tear-off stub that counts the days. */
:root { --sky: #eef2f6; --card: #ffffff; --ink: #14213d; --soft: #56627a; --line: #d5dce6; --field: #f2f5f9; --blue: #1f4fa3; --red: #c9303c; --on-blue: #ffffff; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sky: #0e1626; --card: #17223a; --ink: #edf1f8; --soft: #a3aec4; --line: #2b3854; --field: #0e1626; --blue: #8fb4ff; --red: #ff8a92; --on-blue: #0e1626; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--ink); font: 400 17px/1.5 "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
main { max-width: 780px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
a { color: var(--blue); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 19px; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.top, .pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.grow { flex: 2 1 200px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; flex: 1 1 120px; min-width: 0; }
input:not([type="checkbox"]), select { width: 100%; min-width: 0; min-height: 46px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 4px 4px 0 0; background: var(--field); padding: 8px 10px; font-size: 16px; font-weight: 400; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.pick select { width: auto; max-width: 60vw; }
button { cursor: pointer; border: 0; border-radius: 999px; min-height: 46px; padding: 0 20px; font-weight: 700; background: var(--blue); color: var(--on-blue); flex: none; }
.quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.small { min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 600; border-color: var(--line); }
.danger { border-color: var(--red); color: var(--red); }
.card, .notice { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 12px; }
.notice { border-left: 5px solid var(--red); }
.hint { color: var(--soft); font-size: 15px; }
.error { color: var(--red); font-weight: 600; }

/* The ticket */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; background: var(--card); border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  border-top: 8px solid; border-image: repeating-linear-gradient(-45deg, var(--red) 0 12px, var(--card) 12px 20px, var(--blue) 20px 32px, var(--card) 32px 40px) 8; }
.ticket-main { padding: 16px; display: grid; gap: 4px; min-width: 0; }
.ticket-main h2 { font-size: clamp(24px, 6vw, 34px); line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ticket-main p { color: var(--soft); overflow-wrap: anywhere; }
.ticket-stub { display: grid; place-items: center; text-align: center; padding: 14px 16px; max-width: 132px; font-weight: 800; font-size: 19px; line-height: 1.2; color: var(--blue); border-left: 2px dashed var(--line); }
.actions { margin-top: -4px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border: 1.5px solid var(--line); background: transparent; color: var(--ink); min-height: 44px; padding: 0 16px; font-weight: 600; font-size: 15px; }
.tabs button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--sky); }
#trip, #trip > section { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 10px; }
.day.today { border-color: var(--blue); box-shadow: inset 4px 0 0 var(--blue); }
.day h2 { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.day h2 span { font-weight: 400; font-size: 15px; color: var(--soft); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.list li.hint { display: block; border: 0; }
.list span { overflow-wrap: anywhere; }
.list small { display: block; color: var(--soft); font-size: 14px; }
.list i { font-style: normal; font-size: 13px; font-weight: 700; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 999px; padding: 2px 10px; }
.list a { display: inline-block; padding: 4px 0; font-size: 15px; }
#m-settle li, .checks li { grid-template-columns: minmax(0, 1fr) auto; }
.checks label { display: flex; align-items: center; gap: 12px; font-weight: 400; font-size: 17px; min-height: 44px; cursor: pointer; }
.checks input { width: 22px; height: 22px; flex: none; accent-color: var(--blue); }
.checks .done span { text-decoration: line-through; color: var(--soft); }
.progress { font-weight: 700; }
.totals { display: grid; gap: 4px; }
.big { font-size: 20px; } .big b { font-size: 30px; letter-spacing: -0.02em; }
#p-basics { justify-self: start; }
.copy { margin-top: 6px; }

footer { font-size: 14px; color: var(--soft); }
footer a { display: inline-block; padding: 4px 0; }
.noscript { padding: 16px; }
.doc { max-width: 68ch; display: block; } .doc h1 { margin: 16px 0; } .doc h2 { margin: 24px 0 8px; } .doc p, .doc ul { margin: 0 0 12px; }
@media (max-width: 480px) { .list li { grid-template-columns: 4.4em minmax(0, 1fr) auto; } .ticket-stub { max-width: 104px; font-size: 16px; padding: 12px 10px; } .add button, #create button[type="submit"], form.card > button { width: 100%; } }
@media (max-width: 360px) { .row label { flex-basis: 100%; } }
@media (max-width: 760px), (pointer: coarse) { input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; } }

/* A day's add row stays on one line on phones: a narrow time, then the words */
.add label:first-child { flex: 0 0 104px; }
.add .grow { flex: 1 1 130px; }
