/* The public campus guide. Phone first: the map fills the screen, search floats over it and a sheet rises from below.
   On a wide screen search and the sheet become a side panel. Pins and labels come from campus-map.css. */
.kfu-app-page { overflow: hidden; }
.gd { position: relative; height: calc(100dvh - var(--kfu-nav-h) - 1px); overflow: hidden; background: #eef0ea; --gd-peek: 5.6rem; }
.gd-map-wrap { position: absolute; inset: 0; }
.gd-map { width: 100%; height: 100%; }

/* Search and the quick lists. */
.gd-top { position: absolute; z-index: 6; inset: .6rem .6rem auto .6rem; display: grid; gap: .45rem; pointer-events: none; }
.gd-top > * { pointer-events: auto; }
.gd-search { display: flex; align-items: center; gap: .5rem; height: 2.9rem; padding-inline: .95rem; border-radius: 1.6rem; background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .18); }
.gd-search > i { color: var(--kfu-600); }
.gd-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--kfu-ink); }
.gd-search input::-webkit-search-cancel-button { display: none; }
.gd-search button { flex: none; border: 0; background: transparent; color: var(--kfu-muted); padding: .35rem; line-height: 1; }
.gd-chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .15rem; }
.gd-chips::-webkit-scrollbar { display: none; }
.gd-chips button { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .85rem; border-radius: 1.2rem; border: 1px solid var(--kfu-line); background: #fff; color: var(--kfu-ink); font-size: .85rem; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }
.gd-chips button i { color: var(--kfu-600); }
.gd-chips button.is-on { background: var(--kfu-600); border-color: var(--kfu-600); color: #fff; }
.gd-chips button.is-on i { color: #fff; }

/* Over the map: the 3D switch, the "choose on the map" bar and the chosen place. The map's own buttons sit under the search. */
.gd .maplibregl-ctrl-top-left { top: 6.5rem; }
.gd .maplibregl-ctrl-bottom-left, .gd .maplibregl-ctrl-bottom-right { bottom: var(--gd-peek); }
.gd-tool { position: absolute; z-index: 5; right: .6rem; top: 6.6rem; display: inline-flex; align-items: center; gap: .3rem; padding: .42rem .7rem; border: 0; border-radius: .7rem; background: #fff; color: #344054; font-size: .82rem; font-weight: 700; box-shadow: 0 1px 6px rgba(16, 24, 40, .25); }
.gd-tool.is-on { background: var(--kfu-600); color: #fff; }
.gd-pick { position: absolute; z-index: 8; inset: auto .6rem calc(var(--gd-peek) + .6rem) .6rem; display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border-radius: .8rem; background: rgba(16, 24, 40, .92); color: #fff; font-size: .88rem; }
.gd-pick span { flex: 1 1 auto; }
.gd-sel { width: 1.9rem; height: 2.35rem; pointer-events: none; }
.gd-sel::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 1.9rem; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #e04f16; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }

/* The sheet: a strip at the bottom that opens upward. */
.gd-sheet { position: absolute; z-index: 7; inset: auto 0 0 0; min-height: var(--gd-peek); max-height: 64%; display: flex; flex-direction: column; background: #fff; border-radius: 1.1rem 1.1rem 0 0; box-shadow: 0 -6px 24px rgba(16, 24, 40, .18); transform: translateY(calc(100% - var(--gd-peek))); transition: transform .28s ease; }
.gd-sheet.is-open { transform: none; }
.gd-grip { flex: none; width: 100%; height: 1.5rem; border: 0; background: transparent; display: grid; place-items: center; }
.gd-grip span { width: 2.6rem; height: .28rem; border-radius: 1rem; background: #d0d5dd; }
.gd-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 1rem 1rem; overscroll-behavior: contain; }
.gd-sheet:not(.is-open) .gd-body { overflow: hidden; }

.gd-title { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.5; color: var(--kfu-900); overflow-wrap: anywhere; }
.gd-title i { color: var(--kfu-600); }
.gd-lead { margin: .35rem 0 .5rem; font-size: .92rem; color: var(--kfu-ink); }
.gd-note { margin: .3rem 0 0; font-size: .78rem; line-height: 1.6; color: var(--kfu-muted); }
.gd-sub { font-size: .85rem; color: var(--kfu-muted); }
.gd-head { display: flex; align-items: flex-start; gap: .6rem; }
.gd-head-text { flex: 1 1 auto; min-width: 0; }
.gd-back { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--kfu-line); background: #fff; color: var(--kfu-ink); display: grid; place-items: center; }
.gd-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.gd-actions .kfu-btn { flex: 1 1 auto; justify-content: center; }

.gd-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.gd-list li + li { border-top: 1px solid #f2f4f7; }
.gd-list button { width: 100%; min-height: 3.2rem; display: flex; align-items: center; gap: .7rem; padding: .55rem .2rem; border: 0; background: transparent; color: inherit; text-align: start; }
.gd-list button:hover, .gd-list button:focus-visible { background: var(--kfu-50); }
.gd-ic { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--kfu-50); color: var(--kfu-700); font-size: 1.05rem; }
.gd-li { flex: 1 1 auto; min-width: 0; display: grid; }
.gd-li b { font-size: .93rem; font-weight: 600; overflow-wrap: anywhere; }
.gd-li small { font-size: .78rem; color: var(--kfu-muted); }
.gd-far { flex: none; font-size: .8rem; font-weight: 600; color: var(--kfu-700); white-space: nowrap; }
.gd-empty { padding: 1rem .2rem; font-size: .9rem; color: var(--kfu-muted); }

/* Directions: the two ends, the way of going, and the steps. */
.gd-ends { margin-top: .7rem; border: 1px solid var(--kfu-line); border-radius: .8rem; }
.gd-end { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; }
.gd-end + .gd-end { border-top: 1px solid var(--kfu-line); }
.gd-end-text { flex: 1 1 auto; min-width: 0; padding: .45rem 0; border: 0; background: transparent; text-align: start; font-weight: 600; color: var(--kfu-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-end-text.is-empty { font-weight: 400; color: var(--kfu-muted); }
.gd-end-btn { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 0; background: #f2f4f7; color: #344054; display: grid; place-items: center; }
.gd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .6rem; }
.gd-modes button { padding: .5rem; border-radius: .7rem; border: 1px solid var(--kfu-line); background: #fff; color: var(--kfu-ink); font-weight: 600; }
.gd-modes button.is-on { background: var(--kfu-600); border-color: var(--kfu-600); color: #fff; }
.gd-warn { margin-top: .6rem; padding: .5rem .7rem; border-radius: .6rem; background: #fffaeb; color: #93370d; font-size: .82rem; }
.gd-steps { max-height: none; margin: .6rem 0 0; overflow: visible; }

/* Wide screen: search and the sheet are a panel beside the map. */
@media (min-width: 992px) {
    .gd { display: grid; grid-template-columns: 24rem 1fr; grid-template-rows: auto 1fr; }
    .gd-top { position: static; grid-column: 1; grid-row: 1; padding: .9rem .9rem .6rem; background: #fff; border-inline-end: 1px solid var(--kfu-line); pointer-events: auto; }
    .gd-search { box-shadow: none; border: 1px solid var(--kfu-line); }
    .gd-chips { flex-wrap: wrap; overflow: visible; }
    .gd-chips button { box-shadow: none; }
    .gd-sheet { position: static; grid-column: 1; grid-row: 2; min-height: 0; max-height: none; transform: none; border-radius: 0; box-shadow: none; border-inline-end: 1px solid var(--kfu-line); }
    .gd-sheet:not(.is-open) .gd-body { overflow-y: auto; }
    .gd-grip { display: none; }
    .gd-body { padding-top: .4rem; }
    .gd-map-wrap { position: relative; inset: auto; grid-column: 2; grid-row: 1 / span 2; }
    .gd .maplibregl-ctrl-top-left { top: 0; }
    .gd .maplibregl-ctrl-bottom-left, .gd .maplibregl-ctrl-bottom-right { bottom: 0; }
    .gd-tool { top: .6rem; }
    .gd-pick { inset: auto 1rem 1rem 1rem; max-width: 28rem; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) { .gd-sheet { transition: none; } }

/* A place's card: what it offers, its hours and contacts, the units inside it, and what is near it. */
.gd-info { display: grid; gap: .6rem; margin-top: .9rem; }
.gd-info:empty { display: none; }
.gd-svcs, .gd-near { display: flex; flex-wrap: wrap; gap: .35rem; }
.gd-svcs span { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 1rem; background: var(--kfu-50); color: var(--kfu-900); font-size: .8rem; font-weight: 600; }
.gd-row { display: flex; align-items: baseline; gap: .6rem; font-size: .9rem; color: var(--kfu-ink); overflow-wrap: anywhere; }
.gd-row i { flex: none; color: var(--kfu-600); }
.gd-row a, .gd-units a { color: var(--kfu-700); font-weight: 600; }
.gd-about { margin: 0; font-size: .9rem; line-height: 1.8; color: var(--kfu-ink); white-space: pre-line; overflow-wrap: anywhere; }
.gd-h { margin: .4rem 0 0; font-size: .82rem; font-weight: 700; color: var(--kfu-muted); }
.gd-units { list-style: none; margin: 0; padding: 0; border: 1px solid var(--kfu-line); border-radius: .8rem; overflow: hidden; }
.gd-units li { display: grid; padding: .5rem .75rem; border-inline-start: 3px solid transparent; }
.gd-units li + li { border-top: 1px solid #f2f4f7; }
.gd-units b { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.gd-units small { font-size: .78rem; color: var(--kfu-muted); }
.gd-units li.is-on { background: #fff6ed; border-inline-start-color: #e04f16; }
.gd-near button { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.2rem; padding: .3rem .75rem; border-radius: 1.2rem; border: 1px solid var(--kfu-line); background: #fff; color: var(--kfu-ink); font-size: .82rem; font-weight: 600; }
.gd-near button i { color: var(--kfu-600); }
.gd-near button:hover, .gd-near button:focus-visible { background: var(--kfu-50); }

/* Photos of a building: a strip in its card, and one photo in full. */
.gd-photos { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: -1rem; padding-inline: 1rem; scrollbar-width: none; }
.gd-photos::-webkit-scrollbar { display: none; }
.gd-photos:empty { display: none; }
.gd-photos button { flex: none; width: 72%; max-width: 16rem; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: .8rem; overflow: hidden; background: #eef1f3; scroll-snap-align: start; cursor: zoom-in; }
.gd-photos.is-one button { width: 100%; max-width: none; aspect-ratio: 16 / 9; }
.gd-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gd-photos button:focus-visible { outline: 3px solid var(--kfu-600); outline-offset: -3px; }
.gd-box { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 15, 20, .95); }
.gd-box[open] { display: grid; place-items: center; }
.gd-box::backdrop { background: rgba(8, 15, 20, .95); }
.gd-box img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.gd-box button { position: absolute; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(8, 15, 20, .6); color: #fff; font-size: 1.1rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.gd-box button:hover, .gd-box button:focus-visible { background: rgba(8, 15, 20, .85); }
.gd-box button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gd-box-x { inset-block-start: .75rem; inset-inline-end: .75rem; }
.gd-box-nav { inset-block-start: calc(50% - 1.375rem); }
.gd-box-prev { inset-inline-start: .5rem; }
.gd-box-next { inset-inline-end: .5rem; }
.gd-box-count { position: absolute; inset-block-end: .9rem; inset-inline: 0; text-align: center; color: #fff; font-size: .85rem; }
.gd-box.is-one .gd-box-nav, .gd-box.is-one .gd-box-count { display: none; }
@media (min-width: 992px) {
    .gd-photos { scrollbar-width: thin; padding-bottom: .35rem; }
    .gd-photos::-webkit-scrollbar { display: block; height: 6px; }
    .gd-photos::-webkit-scrollbar-thumb { border-radius: 3px; background: #c5ced3; }
}

/* Live navigation: the next turn over the map, the device's marker, and the bar that ends it. */
.gd.is-nav .gd-top { display: none; }
.gd-nav { position: absolute; z-index: 8; inset: .6rem .6rem auto .6rem; display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 1rem; background: var(--kfu-900); color: #fff; box-shadow: 0 6px 20px rgba(16, 24, 40, .28); }
.gd-nav-ic { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .8rem; background: rgba(255, 255, 255, .14); font-size: 1.6rem; }
.gd-nav-text { display: grid; min-width: 0; }
.gd-nav-text b { font-size: 1.25rem; line-height: 1.4; }
.gd-nav-text span { font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.gd-recenter { inset: auto .6rem calc(var(--gd-peek) + .8rem) auto; top: auto; }
.gd-nav-end { flex: none; align-self: center; background: #fee4e2; color: #b42318; }
.gd-nav-end:hover, .gd-nav-end:focus-visible { background: #fecdca; color: #912018; }
.gd.is-nav .gd-tool[data-three] { top: 5.6rem; }
.gd-me { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #1570ef; border: 3px solid #fff; box-shadow: 0 0 0 .5rem rgba(21, 112, 239, .2), 0 2px 6px rgba(16, 24, 40, .4); }
.gd-me::after { content: ''; position: absolute; inset: -.75rem 0 auto 0; margin-inline: auto; width: 0; height: 0; border: .4rem solid transparent; border-top: 0; border-bottom: .6rem solid #1570ef; }
@media (min-width: 992px) {
    .gd-nav { max-width: 30rem; }
    .gd-recenter { inset: auto 1rem 1rem auto; top: auto; }
    .gd.is-nav .gd-tool[data-three] { top: .6rem; }
}

/* "You are here": the building whose QR sign was scanned. */
.gd-here { padding: .15rem .6rem; border-radius: 1rem; background: #b93815; color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px rgba(16, 24, 40, .35); pointer-events: none; }

/* Parking lots by who they are for: buttons over the list. */
.gd-filter { display: flex; flex-wrap: wrap; gap: .35rem; margin: .7rem 0 .2rem; }
.gd-filter button { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.2rem; padding: .25rem .7rem; border-radius: 1.2rem; border: 1px solid var(--kfu-line); background: #fff; color: var(--kfu-ink); font-size: .82rem; font-weight: 600; }
.gd-filter button.is-on { background: var(--kfu-50); border-color: var(--kfu-600); color: var(--kfu-900); }
.gd-filter button:focus-visible { outline: 3px solid var(--kfu-600); outline-offset: 2px; }
.gd-filter .cm-sign { width: .8rem; height: .8rem; border-radius: .2rem; box-shadow: none; }

/* The rooms of a building: a button for each floor, and the floor's rooms under them. */
.gd-floors { display: flex; flex-wrap: wrap; gap: .35rem; }
.gd-floors button { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.2rem; padding: .3rem .75rem; border-radius: 1.2rem; border: 1px solid var(--kfu-line); background: #fff; color: var(--kfu-ink); font-size: .82rem; font-weight: 600; }
.gd-floors button small { min-width: 1.4rem; padding: 0 .35rem; border-radius: 1rem; background: var(--kfu-50); color: var(--kfu-900); font-size: .72rem; text-align: center; }
.gd-floors button.is-on { background: var(--kfu-600); border-color: var(--kfu-600); color: #fff; }
.gd-floors button:focus-visible { outline: 3px solid var(--kfu-600); outline-offset: 2px; }
.gd-rooms { max-height: 18rem; overflow-y: auto; }
.gd-rooms li b { font-weight: 600; }
.gd-rooms li i { color: var(--kfu-600); }

/* Reporting a mistake on the map: a quiet link under a card, and a small form. */
.gd-flag { justify-self: start; display: inline-flex; align-items: center; gap: .35rem; min-height: 2.2rem; margin-top: .4rem; padding: .25rem .2rem; border: 0; background: transparent; color: var(--kfu-muted); font-size: .8rem; text-decoration: underline; }
.gd-flag:hover, .gd-flag:focus-visible { color: var(--kfu-900); }
.gd-flag:focus-visible { outline: 3px solid var(--kfu-600); outline-offset: 2px; border-radius: .3rem; }
.gd-report { width: min(28rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 1.1rem; border: 0; border-radius: 1rem; box-shadow: 0 12px 40px rgba(16, 24, 40, .3); color: var(--kfu-ink); }
.gd-report::backdrop { background: rgba(8, 15, 20, .55); }
.gd-report form { display: grid; gap: .5rem; }
.gd-report label { margin-top: .3rem; font-size: .85rem; font-weight: 600; }
.gd-report select, .gd-report textarea { width: 100%; padding: .55rem .7rem; border: 1px solid #98a2b3; border-radius: .6rem; background: #fff; color: inherit; font: inherit; font-size: .95rem; }
.gd-report select:focus-visible, .gd-report textarea:focus-visible { outline: 3px solid var(--kfu-600); outline-offset: 1px; border-color: var(--kfu-600); }
.gd-trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* The floor buttons of drawn rooms: under the 3D button on a phone. */
.gd .cm-floors { top: 9.6rem; }
.gd.is-nav .cm-floors { display: none; }
@media (min-width: 992px) { .gd .cm-floors { top: 3.6rem; } }

/* A timetable in a card: open or closed now, and the week when it is unfolded. */
.gd-hours summary { display: flex; align-items: baseline; gap: .6rem; font-size: .9rem; cursor: pointer; list-style: none; }
.gd-hours summary::-webkit-details-marker { display: none; }
.gd-hours summary::after { content: '▾'; color: var(--kfu-muted); }
.gd-hours[open] summary::after { content: '▴'; }
.gd-hours summary i { color: var(--kfu-600); }
.gd-hours summary:focus-visible { outline: 3px solid var(--kfu-600); outline-offset: 2px; border-radius: .3rem; }
.gd-hours .is-open { color: #067647; }
.gd-hours .is-shut { color: #b42318; }
.gd-hours ul { list-style: none; margin: .5rem 0 0; padding: .3rem .75rem; border: 1px solid var(--kfu-line); border-radius: .8rem; font-size: .85rem; }
.gd-hours li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.gd-hours li + li { border-top: 1px solid #f2f4f7; }
.gd-hours li.is-today { font-weight: 700; }
