/* مقامات النور — direction A «المشربية»: a warm night in historic Cairo; light comes through turned-wood lattice. */
@font-face {
  font-family: "Reem Kufi";
  font-weight: 500;
  font-display: swap;
  src: url(fonts/reem-kufi-arabic-500-normal.woff2) format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Reem Kufi";
  font-weight: 700;
  font-display: swap;
  src: url(fonts/reem-kufi-arabic-700-normal.woff2) format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/noto-naskh-arabic-arabic-400-normal.woff2) format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/noto-naskh-arabic-arabic-600-normal.woff2) format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --bg: #17100b;
  --bg2: #21170f;
  --wood: #3a2616;
  --amber: #f2a93b;
  --amber-soft: #ffd58a;
  --bone: #f3ead9;
  --muted: #c4b499;
  --line: #3d2e20;
  --patina: #5fb7a1;
  --danger: #ff8a7a;
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%232a1b10' stroke-width='6'%3E%3Cpath d='M0 0H56M0 28H56M0 56H56M0 0V56M28 0V56M56 0V56'/%3E%3Cpath d='M28 0L56 28L28 56L0 28Z' stroke-width='4'/%3E%3C/g%3E%3Cg fill='none' stroke='%23684628' stroke-width='1'%3E%3Cpath d='M0 0H56M0 28H56M0 56H56M0 0V56M28 0V56M56 0V56'/%3E%3C/g%3E%3C/svg%3E");
  --m-bg: #17100b;
  --m-panel: #21170f;
  --m-fg: #f3ead9;
  --m-muted: #c4b499;
  --m-accent: #f2a93b;
  --m-line: #3d2e20;
  --m-on-accent: #17100b;
  --m-pin-edge: #17100b;
  --m-pin-dot: #17100b;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: "Noto Naskh Arabic", "Segoe UI", sans-serif;
  font-size: 1.1rem;
  line-height: 2;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  font-family: "Reem Kufi", "Noto Naskh Arabic", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  letter-spacing: 0;
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 99;
  background: var(--amber);
  color: #17100b;
  padding: 0.4rem 1rem;
  border-radius: 0.3rem;
}
.skip:focus {
  top: 1rem;
}
.wrap {
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 3rem);
}
.ltr {
  direction: ltr;
  text-align: start;
}

.notice {
  margin: 0;
  padding: 0.3rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  background: var(--amber);
  color: #17100b;
}
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.8rem clamp(1.1rem, 4vw, 3rem);
  position: relative;
  z-index: 5;
}
.mark {
  font:
    700 1.9rem "Reem Kufi",
    sans-serif;
  text-decoration: none;
  color: var(--amber-soft);
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  font-size: 1rem;
}
.top nav a {
  text-decoration: none;
  color: var(--muted);
  padding-block: 0.3rem;
}
.top nav a:hover {
  color: var(--bone);
}
.top .adm-link {
  color: var(--amber);
}
.foot {
  margin-top: 6rem;
  padding: 2.5rem clamp(1.1rem, 4vw, 3rem) 3rem;
  border-top: 3px solid var(--wood);
  color: var(--muted);
  font-size: 0.95rem;
  background: var(--lattice) #120c08;
}
.foot p {
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 0.4rem;
  font:
    500 1.15rem "Reem Kufi",
    "Noto Naskh Arabic",
    sans-serif;
  text-decoration: none;
  line-height: 1.6;
  cursor: pointer;
  background: var(--bg2);
  color: var(--bone);
}
.btn.amber {
  background: var(--amber);
  color: #17100b;
}
.btn.line {
  background: transparent;
  border-color: var(--muted);
  color: var(--bone);
}
.btn.line:hover {
  border-color: var(--amber);
}
.btn.small {
  padding: 0.15rem 1rem;
  font-size: 1rem;
}

.ph {
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  background: repeating-linear-gradient(
    135deg,
    #2a1d12 0 3px,
    #1e150d 3px 14px
  );
  border: 1px solid var(--line);
}
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.soonline,
.hint,
.empty {
  color: var(--muted);
  font-size: 1rem;
}
.hint {
  border: 1px dashed var(--muted);
  border-radius: 0.4rem;
  padding: 0 0.9rem;
  margin: 0.3rem 0;
  display: inline-block;
}
.soonline {
  border: 1px dashed var(--line);
  border-radius: 0.4rem;
  padding: 1rem 1.4rem;
}

/* ---------- home */
/* the home page opens on the hour: a window on the sky, then the way in */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--lattice), #17100b;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}
.hero:has(.hour.lit) .hero-bg {
  visibility: hidden; /* it is now the view through the window */
}
.hour {
  position: relative;
  z-index: 1;
  height: 27rem;
}
.hour canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hour-now {
  position: absolute;
  inset-inline: 0;
  top: 52%;
  padding-block: 0.2rem 1rem;
  text-align: center;
  background: radial-gradient(closest-side, rgb(12 8 5 / 0.8), rgb(12 8 5 / 0.5) 62%, rgb(12 8 5 / 0));
  text-shadow: 0 2px 14px rgb(0 0 0 / 0.85), 0 0 3px rgb(0 0 0 / 0.7);
}
.hour-now p {
  margin: 0;
  color: #fff1d6;
  font-size: 1.15rem;
}
.hour-now .hour-name {
  font: 700 clamp(2.8rem, 12vw, 4.4rem) / 1.35 "Reem Kufi", sans-serif;
  color: #fff6e3;
}
.hour-now a {
  color: var(--amber-soft);
  font-size: 1.4rem;
}
.hour-now .hour-where {
  font-size: 0.95rem;
}
#hour-play {
  position: absolute;
  z-index: 2;
  bottom: 0.8rem;
  inset-inline-start: 0.8rem;
  background: rgb(23 16 11 / 0.7);
}
.hero-in {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  padding: 1.4rem clamp(1.1rem, 4vw, 3rem) 2.2rem;
  align-self: center;
}
.hero h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.15;
  color: var(--bone);
  text-shadow: 0 0 60px rgb(242 169 59 / 0.45), 0 2px 0 #17100b;
}
.hero .lead {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  margin: 0.4rem 0 1.2rem;
  max-width: 32rem;
  color: #fff7ea;
}
.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0;
}
.hero .btn.line {
  border-color: #fff3df;
  background: rgb(23 16 11 / 0.35);
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: -4.6rem;
    padding-top: 4.6rem;
  }
  .hour {
    order: 2;
    height: min(86svh, 46rem);
    min-height: 34rem;
    align-self: stretch;
  }
}
/* under the header, a breath of the sky's colour at this hour (light.js sets --hour) */
.top,
.sec-hero {
  box-shadow: inset 0 -3.5rem 3.5rem -3.5rem var(--hour, transparent);
}

@media (max-width: 400px) {
  .top .mark {
    font-size: 1.3rem;
    white-space: nowrap;
  }
}

.top .back {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #7a5a2f;
  border-radius: 50%;
  color: var(--amber-soft);
}
.top .back:hover {
  border-color: var(--amber);
}
.top.has-back {
  justify-content: flex-start;
  gap: 0.7rem;
}
.top.has-back .top-actions {
  margin-inline-start: auto;
}
.top.has-back nav.desk {
  margin-inline-start: auto;
}
.top.has-back nav.desk ~ .top-actions {
  margin-inline-start: 0;
}
@media (max-width: 900px) {
  .top.has-back .top-actions {
    margin-inline-start: auto;
  }
}
@media (max-width: 420px) {
  /* room for the arrow: the install button keeps its name for screen readers and shows its icon only */
  .top.has-back .install-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* the two doors under the hero, and their pages */
.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0.8rem;
  margin-block: 1.4rem;
}
.door {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #7a5a2f;
  border-radius: 2.6rem 2.6rem 0.7rem 0.7rem;
  background: linear-gradient(180deg, #2c1c0e, var(--bg2));
  color: var(--bone);
  text-decoration: none;
}
.door:hover {
  border-color: var(--amber);
}
.door .ic {
  flex: none;
  color: var(--amber);
}
.door strong {
  display: block;
  font: 700 1.3rem / 1.5 "Reem Kufi", sans-serif;
  color: var(--amber-soft);
}
.door small {
  color: var(--muted);
  font-size: 0.92rem;
}
.hz,
.vs {
  max-width: 34rem;
  text-align: center;
}
.hz-from {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.hz-from select {
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border: 1px solid #7a5a2f;
  border-radius: 0.7rem;
  background: var(--bg2);
  color: var(--bone);
  font: inherit;
}
#dial {
  width: 100%;
  max-width: 28rem;
  height: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
#dial:active {
  cursor: grabbing;
}
.hz-lamp {
  cursor: pointer;
}
#hz-head {
  width: 100%;
  min-height: 2.5rem;
  accent-color: var(--amber);
}
.hz-ahead,
.vs-list {
  list-style: none;
  padding: 0;
  text-align: start;
}
.hz-ahead button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.2rem 0.4rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--bone);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.hz-ahead button[aria-pressed="true"] {
  color: var(--amber-soft);
}
.hz-ahead small {
  color: var(--muted);
  white-space: nowrap;
}
.hz-pick {
  margin-block: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--amber);
  border-radius: 2rem 2rem 0.7rem 0.7rem;
  background: #241709;
}
.hz-pick[hidden] {
  display: none;
}
.hz-pick h2 {
  margin: 0;
  font: 700 1.2rem / 1.7 "Noto Naskh Arabic", serif;
}
.hz-pick .cta {
  justify-content: center;
}
#vs-beads {
  width: 100%;
  max-width: 26rem;
  height: auto;
}
.vs-bead {
  cursor: pointer;
}
#vs-status {
  min-height: 3.4rem;
}
.vs .cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.vs .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.vs-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.vs-list li a {
  flex: 1 1 100%;
}
.visit-note:empty {
  display: none;
}

.sections {
  padding-top: clamp(4rem, 8vw, 7rem);
}
.sections h2,
.featured h2,
.mapband h2,
.gallery-s h2,
.events h2,
.stories h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}
.sub {
  color: var(--muted);
  max-width: 38rem;
  margin: 0.3rem 0 2rem;
}
.grp {
  display: grid;
  gap: 1rem 2.5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 960px) {
  .grp {
    grid-template-columns: 15rem 1fr;
  }
}
.grp-h h3 {
  font-size: 1.7rem;
  color: var(--amber-soft);
}
.grp-h p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.tiles {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.2rem;
  min-height: 9.5rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  overflow: hidden;
  background: var(--lattice) #2c1d11;
  border: 1px solid #4a3523;
  border-radius: 0.3rem;
  transition: border-color 0.2s;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 90% at 50% 120%,
    rgb(242 169 59 / 0.55),
    transparent 70%
  );
  opacity: 0.55;
  transition: opacity 0.25s;
}
.tile:hover {
  border-color: var(--amber);
}
.tile:hover::before {
  opacity: 1;
}
.tile > * {
  position: relative;
}
.tile.lead {
  grid-column: span 2;
  min-height: 12rem;
}
.tile .t {
  font:
    500 1.35rem/1.45 "Reem Kufi",
    sans-serif;
}
.tile .d {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #e3d5bb;
}

.featured {
  margin-top: clamp(4rem, 8vw, 7rem);
}
.strip {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1.5rem clamp(1.1rem, 4vw, 3rem);
}
.arch {
  position: relative;
  flex: 0 0 min(19rem, 72vw);
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  border-radius: 999px 999px 0.3rem 0.3rem;
  overflow: hidden;
  border: 3px solid #8a5a22;
  background: #1e150d;
}
.arch.h0 {
  height: 27rem;
}
.arch.h1 {
  height: 33rem;
}
.arch.h2 {
  height: 29rem;
}
.arch.h3 {
  height: 35rem;
}
.arch.h4 {
  height: 28rem;
}
.arch .ph,
.arch > img {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.arch .cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 3rem 1.2rem 1.2rem;
  background: linear-gradient(transparent, rgb(23 16 11 / 0.92));
  display: flex;
  flex-direction: column;
}
.arch strong {
  font:
    500 1.4rem "Reem Kufi",
    sans-serif;
}
.arch small {
  color: var(--muted);
  font-size: 0.85rem;
}
.arch:hover {
  border-color: var(--amber);
}
.arch.soon {
  border-style: dashed;
  border-color: var(--line);
}

.mapband {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: clamp(4rem, 8vw, 7rem);
}
@media (min-width: 960px) {
  .mapband {
    grid-template-columns: 0.8fr 1.4fr;
  }
}
.mapband p {
  color: var(--muted);
}
.frame {
  border: 7px solid #8a5a22;
  border-radius: 0.4rem;
  box-shadow:
    0 0 0 2px #3a2616,
    0 30px 70px rgb(0 0 0 / 0.5);
  overflow: hidden;
}

.gallery-s,
.events,
.stories {
  margin-top: clamp(4rem, 8vw, 7rem);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 7.5rem;
  gap: 0.6rem;
  margin-top: 1.5rem;
  grid-template-areas: "a a a b b c" "a a a b b c" "d d e e e f" "d d g g g f";
}
.gallery a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1e150d;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.g1 {
  grid-area: a;
}
.g2 {
  grid-area: b;
}
.g3 {
  grid-area: c;
}
.g4 {
  grid-area: d;
}
.g5 {
  grid-area: e;
}
.g6 {
  grid-area: f;
}
.g7 {
  grid-area: g;
}
@media (max-width: 700px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 8rem;
    grid-template-areas: "a a" "a a" "b c" "d d" "e e" "f g";
  }
}

.events ul {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 3px solid var(--wood);
}
.events li {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.date {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
}
.date b {
  font:
    700 3rem "Reem Kufi",
    sans-serif;
  color: var(--amber);
}
.date small,
.what small {
  color: var(--muted);
  font-size: 0.85rem;
}
.what {
  display: flex;
  flex-direction: column;
}
.what strong {
  font:
    500 1.4rem "Reem Kufi",
    sans-serif;
}
@media (max-width: 640px) {
  .events li {
    grid-template-columns: 5rem 1fr;
  }
  .events li .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
.two {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (min-width: 800px) {
  .two {
    grid-template-columns: 1.3fr 1fr;
  }
  .two article:nth-child(2) {
    margin-top: 4rem;
  }
}
.two .ph,
.two article > img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
}
.two h3 {
  font-size: 1.7rem;
  margin-top: 0.9rem;
}
.two h3 a {
  text-decoration: none;
}
.two p {
  color: var(--muted);
  margin: 0.3rem 0 0;
}

/* ---------- inner pages */
.sec-hero {
  padding: 3rem 0 3.5rem;
  background: var(--lattice), linear-gradient(180deg, #5a2c10, #17100b 95%);
  border-bottom: 3px solid var(--wood);
}
.crumb {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.sec-hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--bone);
  text-shadow: 0 0 40px rgb(242 169 59 / 0.4);
}
.sec-hero .lead {
  max-width: 38rem;
  margin: 0.5rem 0 0;
  color: #fff1d8;
  text-shadow: 0 0 14px #17100b;
}
.who-hero {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.portrait {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #8a5a22;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgb(23 16 11 / 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.6rem;
  padding-block: 0.8rem;
}
.bar label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
select,
input,
textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--bone);
  background: #120c08;
  border: 1.5px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.35rem 0.7rem;
}
select option {
  color: #111;
  background: #fff;
}
.count {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
@media (max-width: 760px) {
  .bar {
    position: static;
  }
}

.rows {
  list-style: none;
  margin: 0;
  padding: 1.5rem 0 0;
}
.rows li {
  display: grid;
  grid-template-columns: 14rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding-block: 1.3rem;
  border-bottom: 1px solid var(--line);
}
.rows.plain li {
  grid-template-columns: 1fr;
}
.rows .ph {
  height: 8.5rem;
  text-decoration: none;
  border-radius: 999px 999px 0.3rem 0.3rem / 40% 40% 0 0;
}
.rows .ph.round {
  border-radius: 50%;
  width: 8.5rem;
  height: 8.5rem;
}
.rows h2 {
  font-size: 1.7rem;
}
.rows h2 a {
  text-decoration: none;
}
.rows h2 a:hover {
  color: var(--amber-soft);
}
.rows .meta {
  margin: 0;
  color: var(--amber-soft);
  font-size: 0.92rem;
}
.rows p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}
@media (max-width: 760px) {
  .rows li {
    grid-template-columns: 7rem 1fr;
  }
  .rows li .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .rows .ph {
    height: 6rem;
  }
  .rows .ph.round {
    width: 6rem;
    height: 6rem;
  }
  .rows.plain li {
    grid-template-columns: 1fr;
  }
}

.photos {
  columns: 3 16rem;
  column-gap: 0.8rem;
  margin-top: 1.5rem;
}
.photos figure {
  margin: 0 0 0.8rem;
  break-inside: avoid;
}
.photos img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}
.photos figcaption {
  font-size: 0.85rem;
  color: var(--muted);
}
.prose {
  padding-block: 2.5rem;
  max-width: 52rem;
}
.prose h2 {
  font-size: 2rem;
  margin: 2rem 0 0.5rem;
}
.prose p {
  margin: 0.6rem 0;
  color: #e8dcc4;
}
.prose .wide {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.link {
  color: var(--amber-soft);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.gov {
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.gov h2 {
  font-size: 2rem;
}
.gov h2 a {
  text-decoration: none;
}
.gov small {
  font:
    400 0.9rem "Noto Naskh Arabic",
    serif;
  color: var(--muted);
  margin-inline-start: 0.6rem;
}
.chips {
  list-style: none;
  margin: 0.6rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips a {
  display: inline-block;
  padding: 0.1rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  text-decoration: none;
}
.chips a:hover {
  border-color: var(--amber);
}
.chips small {
  color: var(--muted);
}
.stoplist {
  margin: 1.5rem 0;
  padding-inline-start: 1.8rem;
  font-size: 1.3rem;
}
.stoplist li {
  padding-block: 0.4rem;
}
.stoplist a {
  color: var(--amber-soft);
}
.stoplist small {
  margin-inline-start: 0.8rem;
  color: var(--muted);
}
.bigsearch {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.bigsearch input {
  flex: 1 1 18rem;
  font-size: 1.4rem;
  padding: 0.4rem 1rem;
}
.status {
  color: var(--muted);
  margin: 1rem 0 0;
}
.nf {
  padding-block: clamp(4rem, 12vw, 8rem);
}
.nf h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}
.nf .lead {
  color: var(--muted);
}

/* ---------- shrine page */
.shrine-hero {
  background:
    var(--lattice),
    radial-gradient(70% 100% at 25% 60%, #b8631a 0%, #5a2a10 45%, #17100b 85%);
  border-bottom: 3px solid var(--wood);
  padding-block: 2.5rem 0;
  overflow: hidden;
}
.shrine-grid {
  display: grid;
  gap: 2rem;
  align-items: end;
}
@media (min-width: 900px) {
  .shrine-grid {
    grid-template-columns: 1fr 0.9fr;
  }
}
.shrine-title {
  padding-bottom: 3rem;
}
.shrine-title h1 {
  font-size: clamp(3.2rem, 9vw, 7rem);
  text-shadow: 0 0 50px rgb(242 169 59 / 0.5);
}
.shrine-title .meta {
  color: #ffe3b0;
  margin: 0.4rem 0 1.4rem;
  text-shadow: 0 0 12px #17100b;
}
.shrine-title .cta {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 0;
}
.draftflag {
  background: var(--amber);
  color: #17100b;
  padding: 0 1rem;
  border-radius: 0.3rem;
  display: inline-block;
  font-weight: 600;
}
.portal {
  min-height: clamp(20rem, 52vw, 34rem);
  border: 4px solid #8a5a22;
  border-bottom: 0;
  border-radius: 999px 999px 0 0 / 34% 34%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    135deg,
    #2a1d12 0 3px,
    #1e150d 3px 14px
  );
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}
.portal img {
  width: 100%;
  height: 100%;
  min-height: clamp(20rem, 52vw, 34rem);
  object-fit: cover;
  display: block;
}
.shrine-body {
  display: grid;
  gap: 3rem;
  padding-top: 3.5rem;
}
@media (min-width: 960px) {
  .shrine-body {
    grid-template-columns: 1fr 22rem;
    align-items: start;
  }
}
.shrine-body .main section {
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.shrine-body .main section:first-child {
  padding-top: 0;
}
.shrine-body h2 {
  font-size: 1.9rem;
}
.h-listen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}
.shrine-body .main p {
  margin: 0.3rem 0 0;
  color: #e3d5bb;
  max-width: 42rem;
}
.who {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-top: 0.6rem;
}
.avatar {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  flex: none;
}
.who h3 {
  font-size: 1.5rem;
}
.shots {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  margin-top: 0.8rem;
}
.shots img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
}
.arts {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
}
.arts a {
  color: var(--amber-soft);
}
.side {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1.2rem;
}
.box {
  border: 1px solid #4a3523;
  background: var(--lattice) #21170f;
  border-radius: 0.3rem;
  padding: 1.2rem;
}
.box dl {
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.95rem;
}
.box dt {
  color: var(--amber-soft);
}
.box dd {
  margin: 0;
  color: #e3d5bb;
}
.box p {
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
  color: #e3d5bb;
}
.box .frame {
  margin-top: 0.7rem;
  border-width: 4px;
}
.near {
  margin-top: 4rem;
}
.near h2 {
  font-size: 1.9rem;
}
.near ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem 1.5rem;
}
.near li {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.near .ph {
  width: 6rem;
  height: 6rem;
  flex: none;
  border-radius: 999px 999px 0.3rem 0.3rem / 50% 50% 0 0;
}
.near h3 {
  font:
    500 1.3rem "Reem Kufi",
    sans-serif;
}
.near h3 a {
  text-decoration: none;
}
.near p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.maphead {
  padding-block: 1.5rem 1.2rem;
}
.maphead h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}
.maphead p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  max-width: 46rem;
}
.mapwrap {
  max-width: 90rem;
}

/* ---------- dashboard */
body.adm {
  background: #120c08;
  font-size: 1rem;
  line-height: 1.8;
}
.adm-main {
  max-width: 60rem;
  margin-inline: auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 5rem;
}
.adm-main h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.adm-main h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.5rem;
}
.msg {
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  margin: 0.6rem 0;
  border: 1px solid;
}
.msg.ok {
  background: #14261d;
  border-color: var(--patina);
}
.msg.err {
  background: #2c1512;
  border-color: var(--danger);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.7rem;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.1rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  text-decoration: none;
}
.card b {
  font:
    700 2rem "Reem Kufi",
    sans-serif;
  color: var(--amber);
}
.card:hover {
  border-color: var(--amber);
}
.steps li {
  margin-block: 0.4rem;
}
.steps a {
  color: var(--amber-soft);
}
.form {
  display: grid;
  gap: 1rem;
}
.form.narrow {
  max-width: 30rem;
}
.row {
  display: grid;
  gap: 0.3rem;
}
.row > label {
  font-weight: 600;
  color: var(--amber-soft);
}
.row small {
  color: var(--muted);
}
.row input:not([type="checkbox"]):not([type="file"]),
.row textarea,
.row select {
  width: 100%;
}
.row.check label {
  font-weight: 400;
  color: var(--bone);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.coords {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.coords label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 400;
  color: var(--bone);
}
.upl {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.upl label {
  display: grid;
  gap: 0.2rem;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.92rem;
}
.thumb {
  width: 8rem;
  height: 6rem;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
}
.checks,
.stops {
  display: grid;
  gap: 0.2rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.checks label,
.stops label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 400;
  color: var(--bone);
}
.stops .ord {
  width: 5.5rem;
  padding: 0.1rem 0.4rem;
}
.gal {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  max-height: 18rem;
  overflow: auto;
}
.gal label {
  position: relative;
  display: block;
}
.gal input {
  position: absolute;
  top: 0.3rem;
  inset-inline-start: 0.3rem;
  z-index: 1;
  width: 1.2rem;
  height: 1.2rem;
}
.gal img {
  width: 100%;
  height: 5.5rem;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 0.3rem;
  display: block;
}
.gal input:checked + img {
  border-color: var(--amber);
}
.formbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  background: #120c08;
  padding-block: 0.8rem;
  border-top: 1px solid var(--line);
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: start;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.act {
  white-space: nowrap;
}
.act a {
  color: var(--amber-soft);
  margin-inline-end: 0.8rem;
}
.inline {
  display: inline;
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--amber-soft);
  text-decoration: underline;
  cursor: pointer;
}
button.link.danger {
  color: var(--danger);
}
.mediagrid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.mitem {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.6rem;
  display: grid;
  gap: 0.4rem;
}
.mitem img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
  border-radius: 0.3rem;
}
.mitem label {
  display: grid;
  gap: 0.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Visitor contribution form */
.contribute { padding-block: 2rem 4rem; max-width: 46rem; }
.contribute .form { max-width: none; }
.contribute .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contribute .errs { border: 1px solid #c0583a; background: rgba(192, 88, 58, 0.12); padding: 0.8rem 1rem; border-radius: 6px; margin-block: 1rem; }
.contribute .picker { min-height: 18rem; }
.top nav a.add { color: var(--amber, #e0a64a); font-weight: 600; }
.adm .badge { background: #c0583a; color: #fff; border-radius: 999px; padding: 0 0.45em; font-size: 0.8em; }
.adm .tabs a { margin-inline-end: 0.8rem; }

/* Photographic hero + references */
.refs ul { padding-inline-start: 1.2rem; }
.refs li { margin-block: 0.25rem; overflow-wrap: anywhere; }
.refs h3 { font-size: 1rem; margin-top: 1rem; }
.credit-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.credit-list li { display: flex; gap: 1rem; align-items: center; }
.credit-list img { border-radius: 6px; height: 80px; object-fit: cover; }
.review-note { font-size: 0.9rem; }

/* Section pictures */
.tile { position: relative; overflow: hidden; isolation: isolate; }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.3; z-index: -2; transition: opacity 0.3s, transform 0.5s; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(23, 16, 11, 0.88), rgba(23, 16, 11, 0.35)); }
.tile:hover .tile-img, .tile:focus-visible .tile-img { opacity: 0.45; transform: scale(1.04); }
.sec-hero { position: relative; overflow: hidden; }
.sec-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.28; }
.sec-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23, 16, 11, 0.9), rgba(23, 16, 11, 0.2)); }
.sec-hero .wrap { position: relative; z-index: 1; }
/* Shrine page: map actions, honest empty map, references */
.map-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 0.8rem; }
.nomap { border: 1px dashed var(--line, #7a5a2f); border-radius: 8px; padding: 0.9rem 1rem; }
.coords { opacity: 0.8; font-size: 0.9rem; }
.refs ol { padding-inline-start: 1.4rem; }
.credits-mini { font-size: 0.85rem; opacity: 0.85; padding-inline-start: 1.2rem; }
.dock { display: none; }
@media (max-width: 700px) {
  .dock { display: flex; gap: 0.6rem; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; padding: 0.6rem 1rem; background: rgba(23, 16, 11, 0.94); border-top: 1px solid #7a5a2f; }
  .dock .btn { flex: 1; text-align: center; }
  body { padding-bottom: 4.2rem; }
}

/* ===================== app-style shell (mobile first): bottom tab bar, cards, filters, search results ===================== */
.top-search { display: none; color: var(--bone); padding: 0.4rem; border-radius: 50%; }
.tabbar { display: none; }
.ic { flex: none; }
.sec-hero.app-head { padding-block: 1.6rem 1.2rem; }
.sec-hero.app-head .lead { margin-block: 0.4rem 1rem; }

.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-block: 1rem 2rem; }
.scard { position: relative; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; transition: border-color 0.15s, transform 0.15s; }
.scard:hover { border-color: var(--amber); transform: translateY(-2px); }
.scard-img { display: block; aspect-ratio: 4 / 3; background: var(--wood); overflow: hidden; }
.scard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard-ph { display: grid; place-items: center; height: 100%; color: var(--amber); opacity: 0.55; background: var(--lattice), var(--wood); }
.scard-body { padding: 0.8rem 1rem 1rem; }
.scard-body h3 { margin: 0.2rem 0 0.3rem; font-size: 1.15rem; line-height: 1.5; }
.scard-body h3 a { color: var(--bone); text-decoration: none; }
.scard-body h3 a::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.scard-body .meta { margin: 0; color: var(--muted); font-size: 0.92rem; }
.chip-s { display: inline-block; font-size: 0.78rem; color: #17100b; background: var(--amber-soft); border-radius: 99px; padding: 0 0.6rem; }
.fav { position: absolute; z-index: 2; top: 0.55rem; inset-inline-start: 0.55rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(23, 16, 11, 0.72); color: var(--bone); cursor: pointer; font-size: 1.2rem; }
.fav[aria-pressed="true"] { color: #ff7d6b; }
.fav[aria-pressed="true"] .ic { fill: currentColor; }
.fav-b[aria-pressed="true"] .ic { fill: #ff7d6b; stroke: #ff7d6b; }
.fav-b { display: inline-flex; align-items: center; gap: 0.4rem; }

.seg { display: flex; gap: 0.3rem; padding: 0.3rem; background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; margin-block: 1rem 0.6rem; max-width: 34rem; }
.seg a { flex: 1; text-align: center; padding: 0.55rem 0.4rem; border-radius: 99px; color: var(--muted); text-decoration: none; font-weight: 600; }
.seg a[aria-selected="true"] { background: var(--amber); color: #17100b; }
.chips-l { align-self: center; color: var(--muted); font-size: 0.9rem; min-width: 4.2rem; }
div.chips { align-items: center; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.3rem; scrollbar-width: thin; }
div.chips.scroll { flex-wrap: nowrap; }
div.chips a, .chip { white-space: nowrap; padding: 0.35rem 0.95rem; }
.chip.on { background: var(--amber); border-color: var(--amber); color: #17100b; }
.chip.on small { color: #17100b; }

.results { list-style: none; margin: 1rem 0 2rem; padding: 0; display: grid; gap: 0.6rem; }
.result { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.8rem; background: var(--bg2); border: 1px solid var(--line); border-radius: 0.8rem; text-decoration: none; color: var(--bone); }
.result:hover { border-color: var(--amber); }
.r-img { width: 3.4rem; height: 3.4rem; border-radius: 0.6rem; overflow: hidden; background: var(--wood); display: grid; place-items: center; color: var(--amber); flex: none; }
.r-img img { width: 100%; height: 100%; object-fit: cover; }
.r-t { display: grid; }
.r-t small { color: var(--muted); }

.hero-search { margin: 1rem auto 0.4rem; max-width: 32rem; }
.govband h2 { margin-bottom: 0.3rem; }
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.7rem; margin-block: 0.8rem 1.8rem; }
.menu a, .menu-b { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1rem; background: var(--bg2); border: 1px solid var(--line); border-radius: 0.8rem; color: var(--bone); text-decoration: none; font: inherit; cursor: pointer; }
.menu a:hover, .menu-b:hover { border-color: var(--amber); }
.menu .ic { color: var(--amber); }
.related h2, .more h2 { margin-top: 2rem; }

@media (max-width: 900px) {
  .top { flex-wrap: nowrap; padding-block: 0.6rem; position: sticky; top: 0; background: rgba(23, 16, 11, 0.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
  .top nav.desk { display: none; }
  .top-search { display: inline-flex; }
  .mark { font-size: 1.5rem; }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: rgba(23, 16, 11, 0.97); border-top: 1px solid #7a5a2f; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: 0.1rem; padding: 0.5rem 0 0.4rem; color: var(--muted); text-decoration: none; font-size: 0.72rem; min-height: 3.4rem; }
  .tabbar a.on { color: var(--amber); }
  .tabbar a.on .ic { stroke-width: 2.3; }
  body { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
  .dock { bottom: calc(3.5rem + env(safe-area-inset-bottom)); }
  .foot { margin-top: 3rem; }
}
@media (max-width: 520px) {
  .scards { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .scard-body { padding: 0.6rem 0.7rem 0.8rem; }
  .scard-body h3 { font-size: 1rem; }
}
.seg a { font-size: 0.95rem; line-height: 1.35; padding: 0.6rem 0.3rem; border-radius: 1.4rem; display: grid; place-items: center; text-wrap: balance; }
.seg { border-radius: 1.7rem; }
div.chips { scrollbar-width: none; }
div.chips::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .bigsearch { display: flex; flex-wrap: nowrap; gap: 0.5rem; }
  .bigsearch input { flex: 1; min-width: 0; }
  .bigsearch .btn { flex: none; padding-inline: 1.1rem; }
}
.menu-b[hidden] { display: none; }

/* ---------- governorate pages, contributions, routes, gallery (schema 18) */
.certainty { display: inline-block; border: 1px solid var(--amber); border-radius: 0.5rem; padding: 0.15rem 0.7rem; color: var(--amber-soft); font-size: 0.92rem; }
.certainty.c-disputed, .certainty.c-unconfirmed { border-style: dashed; }
.send { margin-top: 0.8rem; }
.btn.small { font-size: 0.9rem; padding: 0.25rem 0.8rem; }
.btn .ic { vertical-align: middle; }
.toc { margin-block: 1rem; }
.chip.on { border-color: var(--amber); color: var(--amber-soft); }
.linklist { list-style: none; padding: 0; }
.linklist li { padding-block: 0.4rem; border-bottom: 1px solid rgba(242, 169, 59, 0.15); }
.linklist a { color: var(--amber-soft); }
.addbox { border: 1px dashed var(--amber); border-radius: 0.8rem; padding: 1rem 1.2rem; margin-block: 2rem; }
.previews, .review-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.8rem; margin-top: 0.6rem; }
.previews figure, .review-shots figure { margin: 0; display: grid; gap: 0.35rem; align-content: start; }
.previews img, .review-shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.5rem; }
.previews input, .review-shots input:not([type="checkbox"]) { width: 100%; }
.previews figcaption { font-size: 0.8rem; overflow-wrap: anywhere; }
.picks details { margin-bottom: 0.4rem; }
.picks summary, .adm summary { cursor: pointer; padding-block: 0.35rem; }
.picks .check { display: block; padding-block: 0.2rem; }
.route-page .frame { margin-block: 1rem; }
.mv-route-page .canvas { min-height: 20rem; }
.pin-n { position: absolute; inset-block-start: -0.6rem; inset-inline-start: 50%; transform: translateX(50%); background: #17100b; color: #ffd58a; border: 1px solid #f2a93b; border-radius: 999px; min-width: 1.4rem; font-size: 0.8rem; line-height: 1.4rem; text-align: center; }
.stoplist li.leg { list-style: none; border: 0; padding: 0.2rem 1.5rem 0.2rem 0; font-size: 0.9rem; opacity: 0.85; }
.stoplist li.stop-card { display: flex; gap: 0.9rem; align-items: flex-start; }
.stop-card .ph { flex: 0 0 5rem; height: 5rem; border-radius: 2.5rem 2.5rem 0.4rem 0.4rem; overflow: hidden; background: rgba(242, 169, 59, 0.1); }
.stop-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.stop-card h3 { margin: 0; }
.lightbox { border: 1px solid var(--wood); border-radius: 0.8rem; background: #120c08; color: inherit; padding: 0.8rem; max-width: min(96vw, 70rem); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
.lightbox img { display: block; max-width: 100%; max-height: 74vh; margin-inline: auto; }
.lb-cap { text-align: center; margin: 0.5rem 0; }
.lb-bar { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.menu small { display: block; }

/* ---------- dashboard: grouped menu, filters, notifications */
.cards.todo .card.hot { border-color: var(--amber); }
.filterbar { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: end; margin-block: 0.8rem; }
.notes { list-style: none; padding: 0; }
.notes li { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--wood); display: grid; }
.notes li.unread { border-inline-start: 4px solid var(--amber); }
.notes small { color: var(--muted); }
.suggest, .userbox { border: 1px solid var(--wood); border-radius: 0.6rem; padding: 0.8rem 1rem; margin-bottom: 0.8rem; }
.userbox { display: grid; gap: 0.5rem; }
.userbox h2 { margin: 0; }
.orderrow { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding-block: 0.15rem; }
.adm .ord { width: 5rem; }
.adm .stop { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding-block: 0.3rem; border-bottom: 1px solid var(--wood); }
.adm .stop .check { flex: 1 1 16rem; }
.adm .stop input:not([type="checkbox"]):not(.ord) { flex: 1 1 100%; }
.adm .current { border-inline-start: 3px solid var(--wood); padding-inline-start: 0.8rem; margin-bottom: 1rem; }
@media (max-width: 40rem) {
  .adm-main h1 { font-size: 1.6rem; }
  .adm .tabs a { display: inline-block; padding-block: 0.35rem; }
  .adm .tablewrap table { font-size: 0.9rem; }
}

.bigsearch input { min-width: 0; }
.bigsearch .btn { flex: 0 0 auto; }
.hero-search input { width: 100%; flex: 1 1 0; }

/* ---------- the shop */
.shop [hidden],
.cart-bar[hidden] {
  display: none !important;
}
.shop-cats {
  margin-block: 1rem;
}
.shop-cats .chip[aria-current] {
  background: var(--amber);
  border-color: var(--amber);
  color: #17100b;
  font-weight: 700;
}
.goods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 13rem), 1fr));
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}
.good {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 3rem 3rem 0.8rem 0.8rem;
  background: var(--bg2);
  text-align: center;
}
.good a {
  display: grid;
  gap: 0.4rem;
  color: var(--bone);
  text-decoration: none;
}
.good-pic {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 2.6rem 2.6rem 0.5rem 0.5rem;
  background: rgb(242 169 59 / 0.1);
  color: var(--amber);
}
.good-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.good .btn {
  margin-top: auto;
}
.good-price {
  margin: 0;
}
.good-price b {
  color: var(--amber-soft);
}
.good-price s {
  color: var(--muted);
  font-size: 0.9rem;
}
.good-price.big {
  font-size: 1.5rem;
}
.good-out {
  margin: 0;
  color: var(--danger);
}
.product-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.4rem;
  margin-block: 1rem;
}
.product h1 {
  font-size: 2rem;
  line-height: 1.5;
}
.product-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.product-more img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.5rem;
}
.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
.shop input[type="number"] {
  width: 5.5rem;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border: 1px solid #7a5a2f;
  border-radius: 0.6rem;
  background: var(--bg2);
  color: var(--bone);
  font: inherit;
}
.cart-lines {
  padding: 0;
  list-style: none;
}
.cart-lines li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.cart-lines img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.5rem;
}
.cart-lines a {
  flex: 1 1 10rem;
}
.cart-sum {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  max-width: 24rem;
}
.cart-sum dd {
  margin: 0;
}
.cart-sum dt:last-of-type,
.cart-sum dd:last-of-type {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--amber-soft);
}
.shop .form {
  max-width: 34rem;
}
.shop .hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.shop-policy {
  margin-block: 1rem;
  padding: 0.6rem 1rem;
  border: 1px dashed #7a5a2f;
  border-radius: 0.8rem;
}
.cart-bar {
  position: sticky;
  bottom: 0.8rem;
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: min(92%, 22rem);
  min-height: 3rem;
  margin: 1rem auto;
  border-radius: 999px;
  background: var(--amber);
  color: #17100b;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.45);
}
@media (max-width: 900px) {
  .cart-bar {
    bottom: calc(4.9rem + env(safe-area-inset-bottom));
  }
}

/* ---------- drawn section icons and the movement of the small ones */
.art {
  display: block;
  flex: none;
}
.svc-grid .svc-ic:has(.art),
.svc .svc-ic:has(.art) {
  width: 4.5rem;
  height: 4.5rem;
  border: 0;
  background: none;
  box-shadow: none;
}
.svc .art {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}
.svc:hover .art,
.svc:focus-visible .art,
.door:hover .art {
  transform: translateY(-3px) scale(1.06);
}
.door .art {
  transition: transform 0.35s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .tabbar a.on .ic {
    animation: ic-pop 0.6s ease-out;
  }
  a:hover > .ic,
  button:hover > .ic,
  a:active > .ic,
  button:active > .ic {
    animation: ic-nudge 0.7s ease-in-out;
  }
}
@keyframes ic-pop {
  40% {
    transform: translateY(-4px) scale(1.18);
  }
}
@keyframes ic-nudge {
  35% {
    transform: translateY(-2px) rotate(-6deg);
  }
  70% {
    transform: rotate(4deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .svc .art,
  .door .art {
    transition: none;
  }
}

.q-search {
  margin-block: 1.2rem 0.8rem;
}
.q-found ul.chips {
  list-style: none;
  padding: 0;
}
.q-hits {
  padding: 0;
  list-style: none;
}
.q-hits a {
  display: block;
  padding: 0.8rem 0.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--bone);
  text-decoration: none;
}
.q-hits a:hover small {
  text-decoration: underline;
}
.q-hit-t {
  display: block;
  font-size: 1.35rem;
  line-height: 2.2;
}
.q-hits small {
  color: var(--amber-soft);
}

/* phones: the search box belongs to the first screen, so the notice and the window on the hour give up height */
@media (max-width: 600px) {
  .notice { font-size: 0.78rem; line-height: 1.4; padding-block: 0.15rem; }
  .hour { height: clamp(15rem, 42svh, 20rem); }
  .hour-now { top: auto; bottom: 0; padding-block: 0 0.3rem; }
  .hour-now p { font-size: 1rem; line-height: 1.5; }
  .hour-now .hour-name { font-size: 2.2rem; line-height: 1.3; }
  .hour-now a { font-size: 1.1rem; }
  .hour-now .hour-where { font-size: 0.85rem; }
  #hour-play { top: 0.5rem; bottom: auto; }
  .hero-in { padding-block: 0.4rem 1.4rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero .lead { font-size: 1rem; line-height: 1.6; margin-block: 0 0.5rem; }
  .hero-search { margin-top: 0; }
}

/* the calendar of the mawalid: month headings and the reminder buttons */
.events .acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.events.cal { margin-top: 1rem; }
.events.cal h2 { font-size: 1.8rem; margin-top: 1.8rem; }
.events h2 + ul { margin-top: 0.4rem; }
.remindbar { margin-top: 1rem; }
.remindbar select { font: inherit; margin-inline-start: 0.4rem; padding: 0.3rem 0.6rem; background: var(--bg2); color: var(--bone); border: 1px solid var(--line); border-radius: 0.4rem; }
@media (max-width: 640px) {
  .events li .acts { grid-column: 1 / -1; }
}

/* book covers: upright, whole, beside the book's name */
.rows.books li { grid-template-columns: 8rem 1fr auto; }
.rows.books .ph { height: auto; aspect-ratio: 5 / 7; border-radius: 0.3rem; border: 1px solid var(--line); }
@media (max-width: 40rem) { .rows.books li { grid-template-columns: 6rem 1fr; } }
img.cover.drawn { display: block; width: min(11rem, 60%); height: auto; margin: 1rem auto; border-radius: 0.3rem; border: 1px solid var(--line); }

/* a vendor's own store (/shop/my) and the buttons that reach a store */
.my-goods {
  list-style: none;
  padding: 0;
}
.my-goods li {
  border-top: 1px solid rgb(255 255 255 / 0.12);
  padding-block: 0.5rem;
}
.my-goods li p {
  margin-block: 0.3rem;
}
.my-goods li p + p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.my-thumb {
  border-radius: 12px;
}
.my-store > summary {
  cursor: pointer;
  padding-block: 0.6rem;
  font-weight: 700;
}
.store-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* directories: food sites, inshad troupes, trip companies */
.listing-grid {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.listing-grid li {
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 16px;
  padding: 1rem;
}
.listing-grid img,
.listing-photo {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 12px;
}
.listing-grid h2 {
  font-size: 1.3rem;
  margin-block: 0.4rem;
}
.listing-now {
  color: var(--amber);
  font-weight: 700;
}
.listing-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
}
.vote-buttons,
.checks-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.checks-line {
  gap: 0.4rem 1.2rem;
}
