:root {
  --navy: #0d2240;
  --orange: #c2410c;
  --green: #15803d;
  --amber: #a15c00;
  --ink: #0d2240;
  --muted: #55627a;
  --line: #e1e6ee;
  --soft: #eef2f8;
  --bg: #f4f6f9;
  --card: #ffffff;
  --radius: 16px;
  --font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Montserrat, var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.app { min-height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; background: var(--navy); color: #fff; }
.top-text { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.top p { margin: 2px 0 0; font-size: 13px; color: #c9d3e3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 12px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }

.view { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; }

.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; min-width: 54px; height: 62px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; }
.day small { font-size: 12px; font-weight: 600; }
.day b { font-family: var(--display); font-size: 18px; }
.day.has::after { content: ""; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.day.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.day.is-active.has::after { background: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; }
button.card:active { transform: scale(.995); }
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.time { min-width: 58px; padding: 8px 6px; border-radius: 12px; background: var(--soft); display: flex; flex-direction: column; align-items: center; }
.time b { font-family: var(--display); font-size: 17px; }
.time small { font-size: 12px; color: var(--muted); }
.card-title { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-title b { font-family: var(--display); font-size: 16px; line-height: 1.25; }
.card-title small, .meta { font-size: 13px; color: var(--muted); }
.price { font-family: var(--display); font-weight: 700; font-size: 16px; white-space: nowrap; }

.bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.bar em { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--navy); }
.bar-row { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }
.st { font-weight: 700; }
.st-ok { color: var(--green); } .st-need { color: var(--orange); } .st-full { color: var(--amber); } .st-cancel { color: var(--muted); }
.mine { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--green); }

.wind { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 0 4px; margin: 0; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

.eyebrow { font-size: 13px; font-weight: 700; color: var(--orange); letter-spacing: .06em; text-transform: uppercase; }
.h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.2; }
.desc { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cell { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.cell small { font-size: 12px; color: var(--muted); }
.cell b { font-size: 14px; }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg button { min-height: 48px; padding: 6px; border-radius: 12px; border: 1px solid #c9d3e3; background: var(--card); font-size: 13px; font-weight: 700; }
.seg button[aria-pressed="true"] { border: 2px solid var(--navy); background: var(--soft); }

.cta { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.btn { width: 100%; min-height: 52px; border-radius: 14px; border: 0; font-family: var(--display); font-weight: 700; font-size: 16px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: var(--card); border: 1px solid #c9d3e3; color: var(--ink); font-family: var(--font); font-size: 14px; font-weight: 600; min-height: 44px; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 10px 2px; font-size: 14px; align-self: flex-start; min-height: 44px; }
.btn:disabled { opacity: .6; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: #e3f4e9; color: var(--green); }
.pill-wait { background: #fbf0dc; color: var(--amber); }
.pill-need { background: var(--soft); color: var(--navy); }
.pill-offer { background: #fdebdd; color: var(--orange); }
.card.offer { border: 2px solid var(--orange); }

.done { align-items: center; text-align: center; padding: 32px 8px; gap: 16px; display: flex; flex-direction: column; }
.done-icon { width: 72px; height: 72px; border-radius: 50%; background: #e3f4e9; display: grid; place-items: center; }

.tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--card); border-top: 1px solid var(--line); padding: 4px 8px calc(8px + env(safe-area-inset-bottom)); }
.tab { min-height: 52px; border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 700; }
.tab.is-active { color: var(--orange); }
.badge-dot { display: inline-block; margin-left: 4px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; line-height: 18px; }

.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #e9edf3, #f4f6f9, #e9edf3); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.toast { position: fixed; left: 16px; right: 16px; bottom: 90px; max-width: 528px; margin: 0 auto; padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; font-size: 14px; z-index: 20; box-shadow: 0 6px 24px rgba(13,34,64,.25); }
