/* Fayoum day trip. Layout: hero, route map, numbered timeline; order form as pick cards; admin as tables. */
:root {
  --bg: #f6efe2; --surface: #fffdf8; --ink: #1f2a33; --muted: #5b6870; --line: #e2d5bb;
  --lake: #17667f; --lake-d: #0f4a5e; --lake-l: #d9eef3; --palm: #3b6b4d; --sadu: #b5301f; --sand: #ecdcb5; --dune: #e0c68f; --focus: #0a58ca;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; text-wrap: balance; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--lake-d); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .75rem max(16px, env(safe-area-inset-left)) .75rem max(16px, env(safe-area-inset-right)); background: var(--lake-d); color: #fff; }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; margin-inline-start: auto; }
.nav a, .linkbtn { color: #e8f4f7; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: .25rem 0; }
.nav a:hover, .linkbtn:hover { text-decoration: underline; }
.langs { display: flex; gap: .25rem; }
.langs a { color: #fff; text-decoration: none; padding: .15rem .6rem; border: 1px solid rgba(255,255,255,.45); border-radius: 99px; font-size: .9rem; }
.langs a[aria-current] { background: #fff; color: var(--lake-d); }
.inline { display: inline; margin: 0; }

main { max-width: 760px; margin: 0 auto; padding: 1.25rem max(16px, env(safe-area-inset-left)) 3rem max(16px, env(safe-area-inset-right)); }
main.wide { max-width: 1100px; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1rem 16px 2rem; letter-spacing: .04em; }

.hero { position: relative; border-radius: 16px; overflow: hidden; min-height: 210px; background: var(--lake-d); }
.hero img { width: 100%; height: 260px; object-fit: cover; }
.hero.small img { height: 170px; }
.heroTx { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1.25rem 1.1rem; color: #fff; background: linear-gradient(to top, rgba(10,30,40,.82), rgba(10,30,40,0)); }
.heroTx h1 { margin: 0; font-size: 2rem; } .heroTx p { margin: .15rem 0 0; opacity: .92; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1.1rem 0 .5rem; }
.center { text-align: center; }

.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; padding: .6rem 1.1rem; border-radius: 10px; border: 1.5px solid var(--lake-d); background: var(--surface); color: var(--lake-d); }
.btn:hover { background: var(--lake-l); }
.btn.primary { background: var(--lake); border-color: var(--lake); color: #fff; } .btn.primary:hover { background: var(--lake-d); }
.btn.danger { border-color: var(--sadu); color: var(--sadu); } .btn.danger:hover { background: #fbe9e6; }
.btn.big { padding: .8rem 1.4rem; font-size: 1.05rem; } .btn.small { padding: .3rem .7rem; font-size: .88rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .1rem .6rem; border-radius: 99px; background: var(--sand); color: #5a4411; }
.badge.req { background: var(--sadu); color: #fff; } .badge.live { background: var(--palm); color: #fff; } .badge.ok { background: #dcefe2; color: #1d5233; }
.alert { padding: .6rem .9rem; border-radius: 10px; background: #fbe9e6; color: #7d1f13; border: 1px solid #efc2ba; }
.alert.ok { background: #dcefe2; color: #1d5233; border-color: #b9dcc5; }
.hint { color: var(--muted); font-size: .92rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; margin: 1rem 0; }
.auth { max-width: 460px; margin-inline: auto; }
.lbl, label { font-weight: 600; font-size: .92rem; }
.card label { display: block; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; font: inherit; padding: .6rem .75rem; margin: .25rem 0 .8rem; border: 1.5px solid #cdbf9f; border-radius: 10px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
.alt { margin: 1rem 0 0; text-align: center; }
.secret { font: 700 1.4rem/1.4 ui-monospace, Consolas, monospace; background: #fff; border: 1px dashed var(--sadu); padding: .6rem; border-radius: 8px; text-align: center; user-select: all; }

/* map */
.map { width: 100%; height: auto; margin: .5rem 0 1.25rem; border-radius: 14px; border: 1px solid var(--line); }
.map .sand { fill: var(--sand); } .map .dune { fill: var(--dune); } .map .lakeShape { fill: #6fb7cb; } .map .lakeTx { fill: #0f4a5e; font-size: 15px; font-weight: 700; }
.map .route { fill: none; stroke: var(--sadu); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; stroke-linejoin: round; }
.map .pin { cursor: pointer; } .map .pin circle { fill: var(--lake-d); stroke: #fff; stroke-width: 2.5; } .map .pin .halo { fill: none; stroke: none; }
.map .pin text { fill: #fff; font-size: 15px; font-weight: 700; pointer-events: none; }
.map .pin:focus-visible circle { stroke: var(--focus); stroke-width: 4; }
.map .pin.now circle { fill: var(--palm); } .map .pin.now .halo { stroke: var(--palm); stroke-width: 3; animation: pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .map .pin.now .halo { animation: none; } html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }

/* timeline */
.timeline { display: grid; gap: .9rem; }
.stop { display: grid; grid-template-columns: 2.4rem 1fr; gap: .25rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; scroll-margin-top: 1rem; }
.stop.now { border-color: var(--palm); box-shadow: 0 0 0 2px #cfe6d6; }
.stop .num { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--lake-d); color: #fff; display: grid; place-items: center; font-weight: 700; }
.stop.now .num { background: var(--palm); }
.stop .meta { display: flex; gap: .6rem; align-items: center; } .stop time { font-weight: 700; color: var(--sadu); font-variant-numeric: tabular-nums; }
.stop h3 { margin: .1rem 0 .25rem; } .stop p { color: var(--muted); margin: 0; }
.stop img { grid-column: 1 / -1; width: 100%; height: 190px; object-fit: cover; border-radius: 10px; margin-top: .6rem; }

/* order form */
.block { margin: 1.4rem 0; } .block h2 { margin-bottom: .15rem; }
.items { display: grid; gap: .55rem; }
.item { position: relative; display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font-weight: 400; }
.item .thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; flex: none; background: #f3ead6; }
.itx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .itx b { font-weight: 600; } .itx small { color: var(--muted); font-size: .85rem; }
.price { color: var(--palm); font-weight: 700; font-size: .9rem; }
.item.pick { cursor: pointer; } .item.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.item.pick:has(input:checked) { border-color: var(--lake); background: var(--lake-l); }
.item.pick:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.mark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b8a97f; background: #fff; display: grid; place-items: center; }
.mark.box { border-radius: 7px; }
.item.pick input:checked ~ .mark { background: var(--lake); border-color: var(--lake); }
.item.pick input:checked ~ .mark::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.item.fixed { background: #f3ead6; }
.stepper { display: flex; align-items: center; gap: .3rem; flex: none; }
.stepper input { width: 3.2rem; margin: 0; padding: .35rem .2rem; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1.5px solid var(--lake); background: #fff; color: var(--lake-d); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.step:hover { background: var(--lake-l); }
.confirm { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; font-weight: 500; }
.confirm input { margin-top: .3rem; width: 1.2rem; height: 1.2rem; }
.sumlist { list-style: none; margin: 0; padding: 0; } .sumlist li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.sumlist li:last-child { border: 0; } .sumlist em { color: var(--palm); font-style: normal; font-weight: 700; }
.notebox { background: #f3ead6; padding: .6rem .8rem; border-radius: 8px; margin-top: .75rem; white-space: pre-wrap; }

/* admin */
.subnav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.subnav a { padding: .35rem .9rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; }
.subnav a[aria-current] { background: var(--lake-d); border-color: var(--lake-d); color: #fff; }
.scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; } th, td { padding: .55rem .8rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3ead6; font-size: .85rem; } td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } td.who { color: var(--muted); font-size: .88rem; min-width: 12rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin: 1rem 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; } .stats b { font-size: 1.35rem; font-variant-numeric: tabular-nums; } .stats span { color: var(--muted); font-size: .85rem; }
.stats .big { background: var(--lake-d); border-color: var(--lake-d); color: #fff; } .stats .big span { color: #cfe6ec; }
.reports { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; } .reports textarea { margin-bottom: .4rem; font-size: .9rem; }
.editrow.off { opacity: .6; } .editrow label { margin-bottom: .2rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 .9rem; } .grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 .9rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: .8rem; } .checks label { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.upl { display: flex; align-items: center; gap: .8rem; margin: 0 0 .8rem; } .upl .thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; } .noimg { color: var(--muted); font-size: .85rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: end; } .row input, .row select { margin-bottom: 0; width: auto; flex: 1 1 200px; } .row .lbl { flex-basis: 100%; }
.acts { display: flex; flex-wrap: wrap; gap: .4rem; }
body.is-admin .hero { display: none; }

@media (min-width: 640px) { .stop { grid-template-columns: 2.4rem 1fr 220px; } .stop img { grid-column: auto; grid-row: 1 / span 1; height: 130px; margin: 0; } .stop .stbody { min-width: 0; } }
