/* D70 Studio · redesign 20 Oct 2026. White, calm, emerald accent. Phone first: 1 column, ≥40px taps, 16px inputs. */
:root {
  --bg: #ffffff; --soft: #f6f5f1; --line: #e8e5de; --ink: #15181b; --mute: #6b6f74;
  --acc: #0e5a3c; --acc2: #e7f1ec; --warn: #9a5b00; --warn2: #fdf3e2; --red: #b42318; --red2: #fdecea;
  --r: 16px; --font: "Inter Tight", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--acc); }
.muted { color: var(--mute); }
.small { font-size: 13px; }

/* ---- nav: top on desktop, bottom tab bar on phone ---- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px max(20px, calc(50vw - 520px)); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand small { display: block; font-size: 12px; font-weight: 500; color: var(--mute); }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--acc); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-weight: 500; color: var(--mute); }
.tab .ti { font-size: 15px; width: 18px; text-align: center; }
.tab.on { background: var(--acc2); color: var(--acc); font-weight: 600; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }

.main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---- headings ---- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.kick { font-size: 13px; color: var(--mute); font-weight: 500; }
.kick b { color: var(--acc); }
h1 { margin: 4px 0 0; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }
.sub { margin: 6px 0 0; color: var(--mute); }
.act { display: flex; gap: 8px; align-items: center; text-align: right; flex-direction: column; align-items: flex-end; }
.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; margin: 32px 0 12px; }
.big { font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.big2 { font-size: 20px; }
.hero { padding: 8px 0 20px; }
.hero h1 { font-size: clamp(32px, 8vw, 52px); }
.hero h1::after { content: ""; }

/* ---- basics ---- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 12px; }
.card.empty { color: var(--mute); text-align: center; padding: 28px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 12px; }
.row.end { justify-content: flex-end; }
.pad { padding: 10px 0; }
.btn { min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: #cfcac0; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.ghost { background: var(--soft); border-color: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.lnk { background: none; border: 0; padding: 8px 0; min-height: 40px; color: var(--acc); font-weight: 500; text-decoration: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--mute); white-space: nowrap; }
.pill.ok { background: var(--acc2); color: var(--acc); }
.pill.warn { background: var(--warn2); color: var(--warn); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 500; font-size: 14px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chk { min-height: 44px; padding: 0 14px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.chk .bx { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #c9c4ba; display: grid; place-items: center; font-size: 13px; }
.chk.on { color: var(--mute); text-decoration: line-through; }
.chk.on .bx { background: var(--acc); border-color: var(--acc); color: #fff; }

/* ---- needs ---- */
.needs { display: grid; gap: 8px; margin-bottom: 16px; }
.need { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid #f1dfbd; background: var(--warn2); margin-bottom: 16px; }
.needs .need { margin: 0; }
.need b { display: block; font-weight: 600; }
.need small { color: var(--mute); font-size: 13px; }
.need .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; }
.need.red { background: var(--red2); border-color: #f5c9c4; } .need.red .dot { background: var(--red); }
.need.ok { background: var(--acc2); border-color: #cfe3d8; } .need.ok .dot { background: var(--acc); }
.need .ar, .trow .ar { margin-left: auto; color: var(--mute); font-size: 20px; }

/* ---- ferry legs ---- */
.legs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.leg { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--bg); transition: border-color .15s, background .15s; }
.leg.stay { margin-bottom: 12px; }
.leg-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.leg-top h3 { margin: 0; font-size: 18px; }
.dir { font-size: 13px; font-weight: 600; color: var(--mute); }
.leg-main { margin-top: 10px; font-size: 17px; }
.leg-main b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin-right: 4px; }
.who { margin-top: 4px; color: var(--mute); font-size: 14px; }
.drop.over { border-color: var(--acc); background: var(--acc2); border-style: dashed; }
.tix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tk { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.tk .ic { color: var(--acc); } .tk .ar { color: var(--mute); }
.tk.add { background: var(--bg); border-style: dashed; color: var(--acc); }
.tk.wait { color: var(--warn); background: var(--warn2); border-color: #f1dfbd; }
.tk.bad { color: var(--red); background: var(--red2); border-color: #f5c9c4; }
.tk .lnk { min-height: 0; padding: 0; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.hint { font-size: 13px; color: var(--mute); margin-top: 8px; }

/* ---- trip list ---- */
.list { display: grid; gap: 8px; margin-bottom: 12px; }
.trow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); text-align: left; text-decoration: none; color: var(--ink); }
.trow:hover { border-color: #cfcac0; }
.trow .dt { width: 44px; text-align: center; flex: none; }
.trow .dt b { display: block; font-size: 22px; line-height: 1; font-weight: 600; }
.trow .dt small, .trow .mid small { color: var(--mute); font-size: 13px; }
.trow .mid { flex: 1; min-width: 0; }
.trow .mid b, .trow .mid small { display: block; }
.trow .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; flex: none; }
.trow .amt, .fold .amt { font-weight: 600; white-space: nowrap; }
.minis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mini { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--mute); }
.mini.ok { background: var(--acc2); color: var(--acc); }
.mini.warn { background: var(--warn2); color: var(--warn); }
.fold { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--soft); margin-bottom: 8px; font-weight: 600; text-align: left; }
.fold .amt { margin-left: auto; }
.chev { display: inline-block; transition: transform .15s; color: var(--mute); }
.fold.open .chev { transform: rotate(90deg); }

/* ---- trip editing ---- */
.back { background: none; border: 0; padding: 8px 0; min-height: 40px; color: var(--acc); font-weight: 600; }
.title-in { margin-top: 6px; border: 0; border-bottom: 1px dashed var(--line); padding: 4px 0; font-size: 16px; color: var(--mute); width: min(320px, 100%); background: none; }
.title-in:focus { outline: none; border-color: var(--acc); color: var(--ink); }
.probs { background: var(--warn2); color: var(--warn); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; display: grid; gap: 4px; }
.probs .lnk { color: var(--warn); text-align: left; min-height: 0; padding: 4px 0; }
.legx h4 { margin: 18px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.fields { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.fields label, .modal label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); font-weight: 500; min-width: 140px; }
.fields .grow { flex: 1; min-width: 200px; }
input, select { font-size: 16px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--acc2); border-color: var(--acc); }
.quick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick .sp { flex: 1; }
.rows { margin-top: 12px; border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: 1.1fr auto 110px 130px 1fr 40px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prow.off { opacity: .55; }
.prow .nm { font-weight: 600; }
.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; }
.seg button { min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 500; color: var(--mute); white-space: nowrap; }
.seg .on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); color: var(--ink); font-weight: 600; }
.seg .on.s1 { background: var(--acc); color: #fff; }
.seg .on.s0 { color: var(--warn); }
.rmx { display: flex; align-items: center; gap: 4px; }
.rmx span { font-size: 13px; color: var(--mute); }
.rmx input { width: 100%; }
.x { width: 40px; height: 40px; border: 0; background: none; color: var(--mute); font-size: 20px; border-radius: 10px; }
.x:hover { background: var(--soft); color: var(--red); }

/* ---- ferry seats ---- */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fcol h4 { margin: 0 0 6px; font-size: 14px; }
.frow { display: grid; grid-template-columns: 76px 1fr auto auto; gap: 8px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 14px; }
.frow.gone { color: #aaa; }
.frow.mine { background: var(--acc2); border-radius: 8px; padding: 0 6px; }
.fst { font-size: 12px; font-weight: 600; }
.fst.ok { color: var(--acc); } .fst.mid { color: var(--warn); } .fst.low, .fst.sold { color: var(--red); }

/* ---- money ---- */
.owed { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.owe .btn { margin-top: 14px; width: 100%; justify-content: center; }
.split { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; }
.split div { display: flex; flex-direction: column; font-size: 14px; }

/* ---- more ---- */
.auto { display: grid; gap: 0; padding: 0 18px; }
.auto > div { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.auto > div:last-child { border: 0; }
.auto span:nth-child(2) { flex: 1; }
.auto b, .auto small { display: block; }
.auto small { color: var(--mute); font-size: 13px; }
.led { width: 10px; height: 10px; border-radius: 50%; background: #ccc; flex: none; }
.led.ok { background: #1f9d5c; } .led.bad { background: var(--red); }
.qrow { padding: 8px 0; border-bottom: 1px solid var(--line); }
.news div { display: flex; gap: 12px; padding: 6px 0; font-size: 14px; }
.news span { width: 52px; flex: none; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.packs h3 { margin: 0 0 6px; font-size: 16px; }
.pk { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); }
.pk input { width: 22px; height: 22px; min-height: 0; accent-color: var(--acc); }
.pk span { flex: 1; }
.pk.on span { color: var(--mute); text-decoration: line-through; }
.addi input { width: 100%; margin-top: 8px; }

/* ---- toast + modal ---- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .undo { background: none; border: 0; color: #9fe0bd; font-weight: 600; min-height: 36px; }
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,20,.35); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; padding: 22px; width: min(440px, 100%); display: grid; gap: 14px; }
.modal h3 { margin: 0; font-size: 20px; }
.modal .fields { margin: 0; } .modal .fields label { flex: 1; }

/* ---- phone ---- */
@media (max-width: 720px) {
  .bar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-bottom: 0; border-top: 1px solid var(--line); }
  .brand { display: none; }
  .tabs { width: 100%; margin: 0; justify-content: space-around; }
  .tab { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 10px; border-radius: 12px; font-size: 12px; flex: 1; }
  .tab.on { background: none; }
  .tab .ti { font-size: 18px; width: auto; }
  .tab .badge { position: absolute; top: 0; left: calc(50% + 12px); min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .main { padding: calc(20px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom)); }
  .legs, .fgrid { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 1fr 1fr; }
  .prow .nm { grid-column: 1; }
  .prow .x { grid-column: 2; justify-self: end; }
  .prow .seg { grid-column: 1 / -1; order: 2; }
  .prow .seg button { flex: 1; }
  .prow .rmx { order: 3; } .prow select { order: 4; } .prow .note { order: 5; grid-column: 1 / -1; }
  .prow .nm { order: 0; } .prow .x { order: 1; }
  .act { align-items: flex-start; text-align: left; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .quick .sp { flex-basis: 100%; height: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
[hidden] { display: none !important; }
