/* Dɛvɛ — two banks of one river: Bambara rust, Duun indigo, paper between. */

:root {
  --paper: #f2ead8;
  --ink: #33261a;
  --ink-soft: #7b6650;
  --bm: #b4642d;
  --bm-deep: #8f4c20;
  --dux: #29457c;
  --dux-deep: #1d3560;
  --gold: #d9a441;
  --line: #d8c9ab;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  padding-bottom: 58px;
}

[lang^="dux"] { font-family: "Charis SIL", serif; }

#top {
  padding: max(16px, env(safe-area-inset-top)) 18px 12px;
  background: linear-gradient(90deg, rgba(180, 100, 45, 0.12), rgba(41, 69, 124, 0.12));
  border-bottom: 1.5px solid var(--line);
}

#top h1 { font-size: 1.7rem; font-weight: 400; color: var(--ink); }
#top h1 .sub { display: block; font-family: "Nunito", sans-serif; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }

#bridge-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#bridge-band .bm-side { color: var(--bm); }
#bridge-band .dux-side { color: var(--dux); }
#bridge-band svg { width: 52px; height: 22px; color: var(--gold); }

.searchwrap { margin-top: 4px; }

#search {
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: 2px solid var(--line);
  background: #fbf6ea;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0 20px;
  outline: none;
  transition: border-color 0.2s;
}

#search:focus { border-color: var(--gold); }

#search::-webkit-search-cancel-button,
#search::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

#view { padding: 14px 16px 26px; max-width: 600px; margin: 0 auto; }

.intro { text-align: center; color: var(--ink-soft); font-weight: 700; font-size: 0.92rem; margin: 8px 0 14px; line-height: 1.6; }

.count { font-size: 0.85rem; font-weight: 800; color: var(--ink-soft); margin: 4px 2px 10px; }

/* bridge cards */
.bridge-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fbf6ea;
  padding: 14px;
  margin-bottom: 10px;
  animation: rise 0.35s ease both;
  animation-delay: calc(var(--i) * 35ms);
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.bridge-card .side { min-width: 0; }

.bridge-card .side .lang-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 2px 6px;
  margin-bottom: 4px;
  color: #fff;
}

.bridge-card .bm-box .lang-tag { background: var(--bm); }
.bridge-card .dux-box .lang-tag { background: var(--dux); }

.bridge-card .bm-text { font-size: 1.08rem; font-weight: 800; color: var(--bm-deep); overflow-wrap: anywhere; }

.bridge-card .dux-text {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dux-deep);
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bridge-card .fr { grid-column: 1 / -1; font-size: 0.82rem; color: var(--ink-soft); font-weight: 700; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }

.arch { color: var(--gold); }
.arch svg { width: 34px; height: 18px; display: block; }

.spk {
  width: 36px;
  height: 36px;
  border: 1.6px solid var(--dux);
  border-radius: 50%;
  background: transparent;
  color: var(--dux);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.spk:active { transform: scale(0.88); }
.spk svg { width: 14px; height: 14px; }
.spk.playing { background: var(--dux); color: #fff; animation: throb 0.9s infinite; }

@keyframes throb { 50% { transform: scale(1.1); } }

.empty { text-align: center; color: var(--ink-soft); font-weight: 700; padding: 40px 20px; line-height: 1.7; }

#foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 9px 18px calc(9px + env(safe-area-inset-bottom));
  background: rgba(242, 234, 216, 0.96);
  border-top: 1.5px solid var(--line);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink-soft);
}

#foot a { color: var(--dux); text-decoration: none; }

#net-badge { border: 1.5px solid var(--bm); color: var(--bm); border-radius: 999px; padding: 1px 9px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
