@font-face { font-family: "Playfair"; src: url("fonts/PlayfairDisplay.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
:root {
  --sea: #0b7a86; --sea-d: #075a63; --sea-l: #e3f4f3; --sand: #f7f1e3; --coral: #e0573f; --ink: #1d2b33; --mute: #66737a;
  --ok: #1f9d6b; --warn: #e3a21a; --bad: #d64545; --card: #ffffff; --bg: #f4f7f6; --line: #e3e8e7;
  --safe-b: env(safe-area-inset-bottom); --safe-t: env(safe-area-inset-top);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: calc(70px + var(--safe-b)); }
h1, h2, h3 { font-family: "Playfair", Georgia, serif; font-weight: 600; margin: 0; line-height: 1.15; }
a { color: var(--sea); }
button { font: inherit; }
.hidden { display: none !important; }

/* top bar */
.top { position: sticky; top: 0; z-index: 50; background: rgba(244,247,246,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: calc(8px + var(--safe-t)) 16px 8px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 21px; color: var(--sea-d); flex: 1; }
.top .upd { font-size: 12px; color: var(--mute); text-align: right; }
.iconbtn { border: 0; background: var(--sea-l); color: var(--sea-d); border-radius: 10px; padding: 7px 10px; font-size: 15px; }

/* tabs */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
nav.tabs button { flex: 1; border: 0; background: none; padding: 8px 0 7px; color: var(--mute); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
nav.tabs button span { font-size: 21px; line-height: 1; }
nav.tabs button.on { color: var(--sea); font-weight: 600; }

main { max-width: 760px; margin: 0 auto; }
section.view { padding: 12px 14px 24px; }

/* hero */
.hero { position: relative; border-radius: 20px; overflow: hidden; min-height: 210px; color: #fff; background: #0b7a86 center/cover no-repeat; display: flex; align-items: flex-end; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,40,50,.72)); }
.hero .in { position: relative; z-index: 1; padding: 16px 18px; width: 100%; }
.hero h2 { font-size: 30px; }
.hero .k { font-size: 14px; opacity: .92; margin-top: 4px; }
.hero .badge { display: inline-block; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 3px 10px; font-size: 13px; margin-bottom: 8px; }

.card { background: var(--card); border-radius: 16px; padding: 14px 16px; margin-top: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(10,60,70,.05); }
.card h3 { font-size: 19px; color: var(--sea-d); margin-bottom: 6px; }
.small { font-size: 13px; color: var(--mute); }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--ink); }
.chip.on { background: var(--sea); border-color: var(--sea); color: #fff; }

/* weather now */
.wnow { display: flex; align-items: center; gap: 14px; }
.wnow .ico { font-size: 52px; line-height: 1; }
.wnow .t { font-size: 40px; font-weight: 700; }
.wnow .d { font-size: 14px; color: var(--mute); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tile { background: var(--sea-l); border-radius: 12px; padding: 8px 10px; }
.tile b { display: block; font-size: 17px; }
.tile span { font-size: 12px; color: var(--mute); }
.hours { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.hour { flex: none; width: 54px; text-align: center; background: #fafcfc; border: 1px solid var(--line); border-radius: 12px; padding: 6px 2px; font-size: 12px; }
.hour .i { font-size: 20px; }
.hour .r { color: #2b74c7; }
.arrow { display: inline-block; }

.days7 { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; }
.d7 { flex: none; width: 76px; text-align: center; border-radius: 12px; padding: 8px 4px; background: #fafcfc; border: 1px solid var(--line); font-size: 12px; }
.d7 .i { font-size: 24px; }
.d7.trip { border-color: var(--sea); background: var(--sea-l); }

/* advice */
.advice { border-left: 5px solid var(--sea); }
.advice.warn { border-left-color: var(--warn); }
.advice.bad { border-left-color: var(--bad); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 12px; padding: 10px 14px; background: var(--sea); color: #fff; font-weight: 600; text-decoration: none; font-size: 15px; }
.btn.alt { background: var(--sea-l); color: var(--sea-d); }
.btn.coral { background: var(--coral); }
.btn.sm { padding: 7px 11px; font-size: 14px; border-radius: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* planner */
.ptable { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 13px; margin-top: 8px; }
.ptable th { font-weight: 600; color: var(--mute); font-size: 12px; }
.ptable td { text-align: center; border-radius: 8px; padding: 6px 2px; font-weight: 600; }
.ptable td.lbl { text-align: left; font-weight: 500; background: none; }
.ptable td.pick { outline: 3px solid var(--ink); }
.s5 { background: #c9efd9; } .s4 { background: #e3f4c4; } .s3 { background: #fbeec0; } .s2 { background: #fbd8b8; } .s1 { background: #f6c3c3; } .s0 { background: #eee; color: #999; }
.plan-list { margin: 8px 0 0; padding: 0; list-style: none; }
.plan-list li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.plan-list li:last-child { border-bottom: 0; }
.plan-list .dt { width: 64px; font-size: 13px; color: var(--mute); }
.moved { color: var(--coral); font-weight: 700; }

/* day cards */
.day { padding: 0; overflow: hidden; }
.day .ph { height: 150px; background: #ccc center/cover no-repeat; position: relative; }
.day .ph .lab { position: absolute; left: 12px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.day .ph .wx { position: absolute; right: 10px; top: 10px; background: rgba(255,255,255,.93); color: var(--ink); padding: 5px 9px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.day .body { padding: 12px 16px 14px; }
.day h3 { font-size: 21px; }
.day .sub { color: var(--mute); font-size: 14px; margin-top: 3px; }
.tl { list-style: none; margin: 10px 0 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 50px 1fr auto; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); align-items: start; }
.tl .tm { font-weight: 700; color: var(--sea-d); font-size: 14px; }
.tl .tx b { display: block; font-size: 15px; }
.tl .tx span { font-size: 13px; color: var(--mute); }
.nav-ico { border: 0; background: var(--sea-l); color: var(--sea-d); border-radius: 10px; width: 36px; height: 34px; font-size: 16px; }
details summary { cursor: pointer; color: var(--sea); font-weight: 600; margin-top: 10px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.tips { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.planb { background: var(--sand); border-radius: 10px; padding: 8px 10px; font-size: 14px; margin-top: 8px; }
.warnbox { background: #fff4e0; border: 1px solid #f1cf8f; border-radius: 10px; padding: 8px 10px; font-size: 14px; margin-top: 8px; }

/* beaches */
.bch { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; }
.bch .th { width: 74px; height: 74px; border-radius: 12px; background: var(--sea-l) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.bch h4 { margin: 0; font-size: 16px; }
.st { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.st.ok { background: #d6f3e5; color: #11744d; } .st.mid { background: #fdf0cc; color: #8a6206; } .st.bad { background: #fadcdc; color: #9c2222; } .st.sn { background: #dcecff; color: #1d5fa8; }

/* map */
#map { height: calc(100vh - 190px - var(--safe-b) - var(--safe-t)); min-height: 380px; border-radius: 16px; margin-top: 8px; z-index: 1; }
.mk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.leaflet-popup-content { font: 14px/1.4 -apple-system, sans-serif; margin: 10px 12px; }
.leaflet-popup-content b { font-size: 15px; }

/* info */
.acc summary { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; }
.acc ul { margin: 8px 0 0; padding-left: 18px; }
.acc li { margin: 4px 0; font-size: 15px; }
.kv { display: grid; grid-template-columns: 38% 1fr; gap: 4px 10px; align-items: center; margin-top: 8px; }
.kv div { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv .v { font-weight: 700; }
.credits { font-size: 12px; color: var(--mute); }
.credits li { margin: 2px 0; }
.toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); background: rgba(20,30,35,.92); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; z-index: 100; }
.err { color: var(--bad); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(6, 1fr); } .hero { min-height: 260px; } }
