/* TripToClip guided trip builder — the photos and videos screen (guide/media.js): a wide media tray over the map,
   photos grouped by the place they were taken, the ones that need a place flagged in amber. Uses guide.css's tokens. */

.g-app[data-media] .g-stage { visibility: hidden; }
.gm { position: absolute; top: 80px; left: 26px; right: 26px; bottom: 26px; z-index: 6; display: flex; justify-content: center; animation: gm-in .38s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes gm-in { from { opacity: 0; transform: translateY(18px); } }
.gm-panel { position: relative; flex: 0 1 1120px; min-width: 0; display: flex; flex-direction: column; min-height: 0; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, #0f1526, #0a0f1d); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.gm.drag .gm-panel { border-color: rgba(127, 227, 255, .8); box-shadow: 0 0 0 4px rgba(127, 227, 255, .2), 0 30px 80px rgba(0, 0, 0, .55); }

.gm-head { display: flex; align-items: center; gap: 14px; padding: 18px 24px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.gm-titles { min-width: 0; }
.gm-titles .g-eyebrow { margin: 0 0 2px; }
.gm-title { margin: 0; font: 700 1.6rem/1.15 var(--display); letter-spacing: -.01em; }
.gm-backbtn { flex: none; order: 2; margin-left: auto; }

.gm-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 28px; display: flex; flex-direction: column; gap: 22px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.gm-intro { margin: 0; color: var(--ink-2); max-width: 62ch; }
.gm-have { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--glass-2, rgba(255, 255, 255, .06)); border: 1px solid var(--line); color: var(--ink-2); max-width: 70ch; }
.gm-have b { color: var(--ink); }
.gm-have-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; }

/* The big friendly drop zone */
.gm-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.gm-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; padding: 34px 20px; border-radius: 24px; cursor: pointer; text-align: center;
  border: 2px dashed rgba(127, 227, 255, .45); background: radial-gradient(120% 140% at 50% 0%, rgba(47, 107, 255, .2), rgba(255, 79, 123, .07) 60%, rgba(255, 255, 255, .02)); transition: border-color .15s, background .15s, transform .15s; }
.gm-drop:hover, .gm.drag .gm-drop { border-color: rgba(127, 227, 255, .9); transform: translateY(-1px); }
.gm-drop:focus-within { outline: 2px solid #7fe3ff; outline-offset: 3px; }
.gm-drop b { font: 700 1.35rem var(--display); }
.gm-drop-sub { color: var(--muted); }
.gm-drop-ic { position: relative; width: 96px; height: 76px; margin-bottom: 8px; }
.gm-drop-ic i { position: absolute; width: 58px; height: 46px; border-radius: 9px; border: 3px solid #fff; background: linear-gradient(160deg, #2f6bff, #00b8d9); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.gm-drop-ic i:nth-child(1) { left: 2px; top: 16px; transform: rotate(-12deg); background: linear-gradient(160deg, #ff8a3d, #ff4f7b); }
.gm-drop-ic i:nth-child(2) { left: 36px; top: 14px; transform: rotate(10deg); background: linear-gradient(160deg, #5fd39a, #0aa6c9); }
.gm-drop-ic i:nth-child(3) { left: 19px; top: 4px; }
.gm-drop-ic i:nth-child(3)::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -5px; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* Counts and "Add more" */
.gm-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gm-st { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink-2); font-size: .88rem; }
.gm-st-ok { color: #c9f5de; border-color: rgba(95, 211, 154, .45); background: rgba(95, 211, 154, .1); }
.gm-st-ask { color: #ffe9b0; border-color: rgba(242, 193, 78, .6); background: rgba(242, 193, 78, .14); font-weight: 650; }
.gm-st-busy .g-spin { width: 13px; height: 13px; border-width: 2px; }
.gm-st-gap { flex: 1; }
.gm-add { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 99px; cursor: pointer; font-weight: 650; color: #fff; border: 1px solid rgba(127, 227, 255, .5); background: rgba(127, 227, 255, .1); }
.gm-add:hover { background: rgba(127, 227, 255, .18); }
.gm-add:focus-within { outline: 2px solid #7fe3ff; outline-offset: 2px; }
.gm-add-ic { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--go); font-size: 1.1rem; line-height: 1; }

/* Thumbnails */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gm-tile { position: relative; display: block; padding: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #151c2e; transition: transform .15s, box-shadow .15s, border-color .15s; }
.gm-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .4); border-color: rgba(255, 255, 255, .3); }
.gm-tile.flagged { border: 2px solid var(--warn); box-shadow: 0 0 0 3px rgba(242, 193, 78, .18); }
.gm-tile.sel { outline: 3px solid #7fe3ff; outline-offset: 1px; }
.gm-thumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #18213a, #10162a); }
.gm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; animation: gm-fade .3s both; }
@keyframes gm-fade { from { opacity: 0; } }
.gm-nothumb { font: 700 .8rem var(--sans); letter-spacing: .08em; color: var(--muted); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line-2); }
.gm-len { position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .65); color: #fff; font: 600 .74rem var(--sans); }
.gm-over { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 99px; background: rgba(242, 193, 78, .92); color: #1b1300; font: 700 .7rem var(--sans); }
/* The small pin on a placed photo (white when the traveller chose the place) */
.gm-pin { position: absolute; left: 7px; bottom: 9px; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.gm-pin::after { content: ""; position: absolute; left: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.gm-pin.chosen { background: #fff; }
.gm-pin.chosen::after { background: var(--accent); }
.gm-q { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--warn); color: #1b1300; font: 800 .9rem var(--sans); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.gm-q-big { position: static; width: 28px; height: 28px; flex: none; font-size: 1rem; }

/* Places */
.gm-group { display: flex; flex-direction: column; gap: 10px; animation: g-rise .35s both; }
.gm-gh { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; font: 650 1.12rem var(--display); }
.gm-gh .flag { width: 22px; height: 16.5px; }
.gm-gname small { color: var(--muted); font: 500 .85rem var(--sans); }
.gm-gcount { color: var(--ink-2); font: 500 .95rem var(--sans); }
.gm-gday { margin-left: auto; color: var(--muted); font: 500 .82rem var(--sans); }
.gm-road { width: 22px; height: 16px; border-radius: 4px; background: repeating-linear-gradient(90deg, #fff 0 5px, transparent 5px 9px) center / 100% 2px no-repeat, #3a4560; }
.gm-reading .gm-tile { opacity: .7; }

/* Needs a place: flagged clearly */
.gm-flagged { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; border: 1.5px solid rgba(242, 193, 78, .6); background: linear-gradient(160deg, rgba(242, 193, 78, .13), rgba(242, 193, 78, .04)); scroll-margin-top: 12px; }
.gm-fh { display: flex; align-items: center; gap: 10px; }
.gm-fh h2 { margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--display); color: #fff3d6; }
.gm-fsub { margin: -4px 0 0; color: var(--ink-2); font-size: .92rem; }
.gm-select { flex: none; color: #ffe2a0; }
.gm-selall { margin: -6px 0 -4px; }
.gm-asks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.gm-ask { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px 12px; padding: 10px; border-radius: 16px; background: rgba(12, 17, 30, .7); border: 1px solid rgba(242, 193, 78, .3); min-width: 0; }
.gm-ask.sel { border-color: #7fe3ff; box-shadow: 0 0 0 2px rgba(127, 227, 255, .35); }
.gm-ask-pic { position: relative; grid-row: span 2; }
.gm-check { position: absolute; left: -4px; top: -4px; display: flex; padding: 5px; border-radius: 10px; background: rgba(12, 17, 30, .9); }
.gm-check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.gm-ask-thumb { position: relative; display: block; width: 84px; height: 84px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--warn); background: #151c2e; }
.gm-ask-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gm-ask-body > b { font-size: 1rem; }
.gm-ask-body > small { color: var(--muted); font-size: .84rem; }
.gm-ask-body > .gm-ask-hint { color: #ffc2d2; }
.gm-ask-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-ask-row .g-chip { padding: 6px 12px; font-size: .86rem; min-height: 38px; }
.gm-sug { color: #fff; font-weight: 650; border-color: rgba(255, 79, 123, .65); background: var(--accent-soft); }
.gm-leave { color: var(--muted); }

/* How it works (before anything is chosen) */
.gm-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gm-how li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--glass-2); border: 1px solid var(--line); }
.gm-how b { font-size: .98rem; }
.gm-how li > span:last-child { grid-column: 2; color: var(--muted); font-size: .86rem; }
.gm-how-ic { position: relative; left: auto; right: auto; top: auto; bottom: auto; grid-row: span 2; }
.gm-how .gm-pin { width: 22px; height: 22px; margin: 4px; }
.gm-how .gm-q { width: 30px; height: 30px; }
.gm-how-clip { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #2f6bff, #00b8d9); color: #fff; font-size: .8rem; }
.gm-bulk { position: sticky; bottom: -16px; margin: 4px -16px -16px; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-radius: 0 0 20px 20px; background: #1b1a17; border-top: 1px solid rgba(242, 193, 78, .45); }
.gm-bulk b { flex: 1; color: #fff3d6; }
.gm-bulk-go { padding: 10px 18px; font-size: .95rem; }

/* Left out */
.gm-out { border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.gm-out summary { cursor: pointer; padding: 12px 16px; color: var(--ink-2); font-weight: 600; }
.gm-outs { list-style: none; margin: 0; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.gm-outs li { position: relative; display: flex; align-items: center; gap: 12px; }
.gm-outs .gm-thumb { position: relative; inset: auto; flex: none; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; }
.gm-out-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm-out-t b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-out-t small { color: var(--muted); font-size: .82rem; }

/* Footer */
.gm-foot { padding: 12px 24px 16px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 8px; }
.gm-foot-note { margin: 0; color: var(--warn); font-size: .88rem; }
.gm-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gm-go { padding: 14px 24px; }

/* Choosing a place: a sheet from the bottom on phones, a box in the middle on larger screens */
.gm-sheet-back { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 8, 16, .62); animation: gm-fade .2s both; }
.gm-sheet { width: min(520px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 22px; background: #121a2c; border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: gm-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.gm-sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px 20px; }
.gm-sheet-head h2 { margin: 0; flex: 1; font: 700 1.25rem var(--display); overflow-wrap: anywhere; }
.gm-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 12px; display: flex; flex-direction: column; gap: 10px; }
.gm-sheet-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.gm-sheet-strip .gm-thumb { position: relative; inset: auto; flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.gm-more { align-self: center; color: var(--muted); font-size: .9rem; padding: 0 6px; }
.gm-sheet-why { margin: 0; color: var(--ink-2); font-size: .92rem; }
.gm-clipnote { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(242, 193, 78, .1); border: 1px solid rgba(242, 193, 78, .35); }
.gm-clipnote p { margin: 0; font-size: .9rem; color: #fff3d6; }
.gm-places { display: flex; flex-direction: column; gap: 2px; }
.gm-place { min-height: 52px; }
.gm-place.sug { background: var(--accent-soft); }
.gm-place.on { box-shadow: inset 3px 0 0 var(--accent); }
.gm-tag { flex: none; padding: 2px 8px; border-radius: 99px; font-size: .74rem; font-weight: 650; background: var(--go); color: #fff; }
.gm-tag-day { background: rgba(127, 227, 255, .16); color: #bfefff; }
.gm-tag-on { background: rgba(255, 255, 255, .12); color: var(--ink-2); }
.gm-search { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.gm-searchbtn .g-r-text b { color: #bfefff; }
.gm-search-ic { position: relative; width: 24px; height: 18px; flex: none; }
.gm-search-ic::before { content: ""; position: absolute; left: 3px; top: 0; width: 11px; height: 11px; border: 2.4px solid #bfefff; border-radius: 50%; }
.gm-search-ic::after { content: ""; position: absolute; left: 14px; top: 12px; width: 7px; height: 2.4px; background: #bfefff; transform: rotate(45deg); border-radius: 2px; }
.gm-search .g-search { font-size: 1rem; padding-top: 13px; padding-bottom: 13px; }
.gm-sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 14px 20px; border-top: 1px solid var(--line); }

/* Working: making photos and clips, uploading */
.gm-busy { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 8, 16, .72); backdrop-filter: blur(4px); animation: gm-fade .2s both; }
.gm-busy-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 20px; background: #121a2c; border: 1px solid var(--line-2); }
.gm-busy-t { font: 700 1.2rem var(--display); }
.gm-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.gm-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .3s; }
.gm-busy-s { margin: 0; color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The summary card's two ways on: photos first and full width; back and "Skip — add them later" beneath */
.g-foot-done { display: grid; grid-template-columns: auto auto; grid-template-areas: "go go" "back skip"; row-gap: 6px; }
.g-foot-done .g-foot-r { display: contents; }
.g-foot-done .g-photos { grid-area: go; justify-content: center; padding: 15px 24px; font-size: 1.05rem; }
.g-foot-done .g-back { grid-area: back; justify-self: start; }
.g-foot-done .g-open { grid-area: skip; justify-self: end; }
/* Planning a trip again that has photos: opening it is the main way on, "Add more photos and videos" beneath */
.g-foot-done.g-has .g-open { grid-area: go; justify-self: stretch; justify-content: center; padding: 15px 24px; font-size: 1.05rem; }
.g-foot-done.g-has .g-photos { grid-area: skip; justify-self: end; padding: 10px 12px; font-size: inherit; }

/* ---- Phones ---------------------------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .gm { top: 58px; left: 0; right: 0; bottom: 0; }
  .gm-panel { border-radius: 24px 24px 0 0; border-bottom: 0; }
  .gm-head { padding: 14px 10px 12px 16px; gap: 8px; }
  .gm-titles .g-eyebrow { display: none; }
  .gm-title { font-size: 1.3rem; }
  .gm-backbtn { padding: 8px 12px; font-size: 1.1rem; }
  .gm-backword { display: none; }
  .gm-how { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gm-how li { padding: 11px 12px; }
  .gm-scroll { padding: 14px 14px 22px; gap: 18px; }
  .gm-intro { font-size: .92rem; }
  .gm-drop { min-height: 220px; }
  .gm-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; }
  .gm-tile { border-radius: 12px; }
  .gm-flagged { padding: 12px; }
  .gm-asks { grid-template-columns: minmax(0, 1fr); }
  .gm-ask-thumb { width: 68px; height: 68px; }
  .gm-ask-pic { grid-row: auto; }
  .gm-ask-row { grid-column: 1 / -1; }
  .gm-bulk { margin: 4px -12px -12px; bottom: -12px; padding: 10px 12px; }
  .gm-foot { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
  .gm-foot { gap: 4px; }
  .gm-foot-note { font-size: .84rem; text-align: center; }
  .gm-foot-row { flex-direction: column-reverse; align-items: stretch; gap: 0; }
  .gm-go { justify-content: center; padding: 13px 16px; }
  .gm-skip { padding: 8px; font-size: .9rem; }
  .gm-sheet-back { align-items: flex-end; padding: 0; }
  .gm-sheet { width: 100%; max-height: 88%; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .gm-sheet-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .g-foot-done .g-photos { padding: 13px 18px; }
  .g-foot-done .g-back, .g-foot-done .g-open { white-space: nowrap; font-size: .9rem; padding: 8px 6px; }
}
@media (max-width: 380px) {
  .gm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- Trimming videos ------------------------------------------------------------------------------------------ */
.gm-tile.trimmed .gm-len { left: 5px; right: 5px; bottom: 5px; text-align: center; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0, 0, 0, .72); }
.gm-tile.trimmed .gm-pin { bottom: 30px; }

/* The trim step on the tray */
.gm-trimbar { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 20px; border: 1.5px solid rgba(127, 227, 255, .5); background: linear-gradient(160deg, rgba(47, 107, 255, .16), rgba(0, 212, 240, .05)); }
.gm-trimbar.done { border-color: rgba(95, 211, 154, .4); background: rgba(95, 211, 154, .06); }
.gm-tb-head { display: flex; align-items: center; gap: 12px; }
.gm-tb-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #2f6bff, #00b8d9); color: #fff; font-size: 1rem; }
.gm-trimbar.done .gm-tb-ic { background: var(--ok); color: #08261a; font-weight: 800; }
.gm-tb-t { flex: 1; min-width: 0; }
.gm-tb-t h2 { margin: 0; font: 700 1.15rem var(--display); }
.gm-tb-t p { margin: 2px 0 0; color: var(--ink-2); font-size: .88rem; }
.gm-tb-go { flex: none; padding: 11px 18px; font-size: .95rem; }
.gm-tb-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.gm-tb-v { position: relative; flex: none; width: 132px; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #151c2e; text-align: left; }
.gm-tb-v .gm-thumb { position: relative; inset: auto; height: 76px; }
.gm-tb-v.ok { border-color: rgba(95, 211, 154, .55); }
.gm-tb-l { display: block; padding: 5px 8px; font-size: .74rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-tb-v.ok .gm-tb-l::before { content: "✓ "; color: var(--ok); font-weight: 800; }

/* Footer: trimming first, or carrying on without */
.gm-foot-go { display: flex; align-items: center; gap: 14px; }
.gm-go-trim { padding: 14px 24px; }
.gm-go-plain { font-size: .9rem; color: var(--ink-2); padding: 8px 6px; }
.gm-go-plain:disabled { opacity: .5; }

/* The trimmer */
.gm-trim { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; background: linear-gradient(180deg, #0f1526, #0a0f1d); animation: gm-fade .2s both; }
.gm-trim-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 10px 24px; border-bottom: 1px solid var(--line); }
.gm-trim-t { flex: 1; min-width: 0; }
.gm-trim-t h2 { margin: 0; font: 700 1.35rem var(--display); }
.gm-trim-t small { display: block; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-trim-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gm-trim-body > * { width: min(760px, 100%); }
.gm-trim-stage { position: relative; display: flex; justify-content: center; background: #000; border-radius: 14px; overflow: hidden; }
.gm-trim-view { display: block; max-width: 100%; max-height: 44vh; max-height: 44svh; object-fit: contain; }
.gm-play { position: absolute; left: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.gm-play::before { content: ""; position: absolute; left: 17px; top: 14px; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.gm-play.on::before { left: 16px; top: 14px; width: 14px; height: 18px; border: 0; background: linear-gradient(90deg, #fff 0 5px, transparent 5px 9px, #fff 9px 14px); }
.gm-track-wrap { padding: 0 14px; }
.gm-track { position: relative; height: 58px; border-radius: 12px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 22px), #1a2236; border: 1px solid var(--line-2); touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.gm-part { position: absolute; top: -1px; bottom: -1px; border-radius: 10px; background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .35); cursor: grab; }
.gm-part.on { background: rgba(255, 79, 123, .28); border: 3px solid var(--accent); box-shadow: 0 0 0 3px rgba(255, 79, 123, .18); z-index: 1; }
.gm-part-n { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 800 .9rem var(--sans); color: #fff; pointer-events: none; }
/* Handles: a bar to see, a wide area to touch */
.gm-h { position: absolute; top: -6px; bottom: -6px; width: 16px; border-radius: 6px; background: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); cursor: ew-resize; touch-action: none; }
.gm-h::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; right: -14px; }
.gm-h::after { content: ""; position: absolute; left: 6px; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-left: 1.5px solid #fff; border-right: 1.5px solid #fff; box-sizing: border-box; }
.gm-h-start { left: -10px; }
.gm-h-end { right: -10px; }
.gm-h:focus-visible { outline: 2px solid #7fe3ff; outline-offset: 2px; }
.gm-ph { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .7); pointer-events: none; z-index: 2; }
.gm-ticks { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .78rem; }
.gm-trim-read { text-align: center; font: 650 1.1rem var(--display); }
.gm-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gm-parts:empty { display: none; }
.gm-partchip { display: inline-flex; align-items: center; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass-2); overflow: hidden; }
.gm-partchip.on { border-color: rgba(255, 79, 123, .7); background: var(--accent-soft); }
.gm-partchip-b, .gm-partchip-x { border: 0; background: none; color: var(--ink); font-size: .84rem; padding: 7px 10px; min-height: 36px; }
.gm-partchip-x { color: var(--muted); padding: 7px 12px 7px 4px; }
.gm-trim-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; }
.gm-trim-tools .g-chip { min-height: 40px; color: #fff; }
.gm-addpart { border-color: rgba(127, 227, 255, .5); background: rgba(127, 227, 255, .1); }
.gm-trim-hint { margin: 0; text-align: center; color: var(--muted); font-size: .86rem; }
.gm-trim-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 24px 16px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.gm-trim-nav { display: flex; align-items: center; gap: 8px; }
.gm-trim-next { padding: 13px 22px; }

@media (max-width: 760px) {
  .gm-trimbar { padding: 12px; }
  .gm-tb-head { flex-wrap: wrap; }
  .gm-tb-go { flex: 1 1 100%; justify-content: center; }
  .gm-tb-v { width: 112px; }
  .gm-foot-go { flex-direction: column-reverse; align-items: stretch; gap: 0; }
  .gm-go-trim { justify-content: center; padding: 13px 16px; }
  .gm-trim-head { padding: 12px 10px 8px 16px; }
  .gm-trim-t h2 { font-size: 1.15rem; }
  .gm-trim-body { padding: 12px 14px; gap: 10px; }
  .gm-trim-view { max-height: 34vh; max-height: 34svh; }
  .gm-track-wrap { padding: 0 12px; }
  .gm-track { height: 54px; }
  .gm-trim-foot { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
  .gm-trim-next { padding: 12px 16px; }
}

/* ---- Where it was taken, on the guide's map ------------------------------------------------------------------------ */
/* Wide screens: the panel keeps to the left so the map beside it shows where a photo was taken. */
@media (min-width: 1100px) {
  .gm { justify-content: flex-start; }
  .gm-panel { flex: 0 1 min(1040px, 64vw); }
}
/* Narrower screens: the panel slides down to show a band of the map. */
.gm { transition: top .35s cubic-bezier(.2, .8, .2, 1); }
@media (max-width: 1099px) { .gm.mapped { top: 42vh; top: 42svh; } }
.gm-flash { position: relative; width: 20px; height: 20px; pointer-events: none; }
.gm-flash-dot { position: absolute; inset: 0; border-radius: 50%; background: #e0218a; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(224, 33, 138, .35), 0 2px 10px rgba(0, 0, 0, .45); animation: gm-pulse 1s ease-in-out infinite alternate; }
.gm-flash-ring { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2.5px solid #e0218a; opacity: 0; animation: gm-radar 2.4s ease-out infinite; }
.gm-flash-ring:nth-child(2) { animation-delay: .8s; }
.gm-flash-ring:nth-child(3) { animation-delay: 1.6s; }
.gm-flash-pic { position: absolute; left: 50%; bottom: 26px; width: 54px; height: 54px; margin-left: -27px; border-radius: 10px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); background: #151c2e; }
.gm-flash-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes gm-pulse { from { transform: scale(1); } to { transform: scale(1.25); } }
@keyframes gm-radar { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gm-flash-dot { animation: none !important; }
  .gm-flash-ring { animation: none !important; opacity: .55; transform: scale(2.6); }
  .gm-flash-ring + .gm-flash-ring { display: none; }
}
.gm-seewhere-ic { display: inline-block; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #e0218a; border: 2px solid #fff; flex: none; margin-right: 2px; }
.gm-seewhere { color: #fff; border-color: rgba(224, 33, 138, .6); background: rgba(224, 33, 138, .14); }
.gm-spotbox { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(224, 33, 138, .35); background: rgba(224, 33, 138, .07); }
.gm-spotbox.prominent { border-color: rgba(224, 33, 138, .7); background: rgba(224, 33, 138, .13); }
.gm-spotbox p { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: .92rem; }
.gm-spotbox small { color: var(--muted); font-size: .8rem; }
.gm-spot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-usespot.g-next { padding: 10px 18px; font-size: .95rem; background: linear-gradient(100deg, #e0218a, #ff4f7b); box-shadow: 0 8px 20px rgba(224, 33, 138, .35); }
.gm-detour { color: #fff; min-height: 40px; }

/* Phones first (roadmap 114): every control at least 44 × 44 px to a finger; the place sheet is a shared bottom sheet
   (core/phone.js, phone.css) with its buttons along the bottom. */
@media (max-width: 760px), (pointer: coarse) {
  .gm-ask-row .g-chip, .gm-trim-tools .g-chip, .gm-add, .gm-st-ask, .gm-skip, .gm-backbtn, .gm-leave, .gm-usespot.g-next, .gm-detour, .gm-sheet-foot .g-back { min-height: 44px; }
  .gm-backbtn { min-width: 44px; justify-content: center; }
  .gm-x { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .gm-sheet.rr-sheet { max-height: 88%; }
  .gm-sheet .rr-grab { margin-bottom: -10px; }
}
