@font-face {
  font-family: "Chai Arabic";
  src: url("/static/fonts/NotoSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
html[dir="rtl"] body {
  font-family: "Chai Arabic", Tahoma, Arial, sans-serif;
}
/*
 * CHAI INDEX / Living Signals — interface refinements for the 0.3 pilot.
 * This layer intentionally sits above the legacy layout stylesheet.
 * Motion communicates interface activity, NOT verified real-world danger.
 * All loops use opacity/transform, with reduced-motion support below.
 */

:root {
  --bg: #100c09;
  --panel: #1b1714;
  --panel-deep: #15120f;
  --panel-lite: #24201b;
  --border: #4b3727;
  --border-light: #805638;
  --text: #ffefdb;
  --muted: #c3ad96;
  --dim: #9d8774;
  --amber: #ffb955;
  --amber-light: #ffdc9a;
  --amber-dark: #a86622;
  --green: #74e4ac;
  --red: #ff887b;
  --blue: #8adcf2;
  --tea-hot: #ffae43;
  --tea-cold: #90dffc;
}

body {
  background:
    radial-gradient(
      ellipse 680px 550px at 96% 1%,
      rgba(195, 93, 25, 0.15),
      transparent 72%
    ),
    radial-gradient(
      ellipse 650px 650px at 1% 52%,
      rgba(58, 127, 134, 0.08),
      transparent 76%
    ),
    #100c09;
}

::selection {
  background: #d58b39;
  color: #170f0b;
}
:focus-visible {
  outline: 2px solid #ffc978;
  outline-offset: 3px;
}

/* Live-status affordances show connection rather than pretending that demo data is live. */
.utility-bar {
  background: #100f0e;
  border-bottom-color: #63452b;
}
.tiny-orbit,
.eyebrow-stripe {
  background: #ffb65b;
  box-shadow: 0 0 16px #ffa24580;
}
.site-header {
  background: #16130feb;
  border-bottom: 1px solid #72503680;
  box-shadow: 0 12px 46px #0005;
}
.brand-words strong {
  color: #fff0d6;
}
.brand-words small {
  color: #cf995c;
}
.primary-nav a:hover {
  color: #ffd59c;
}
.live-pill,
.watch-live {
  border-color: #518d7470;
  color: #c8e7db;
}
.live-pill i,
.small-live-dot {
  animation: none;
  background: #7c9c91;
  box-shadow: 0 0 0 4px #426b6040;
}
body[data-stream="connected"] .live-pill i,
body[data-stream="connected"] .small-live-dot {
  background: #72eab7;
  box-shadow: 0 0 0 4px #54c99a20;
  animation: chaiLiveHeartbeat 3.2s ease-in-out infinite;
}

/* Main header: high contrast tea-amber with motion in the indicator, not the text. */
.hero-accent {
  color: #ffce84;
  background: linear-gradient(110deg, #ffe6b5 6%, #ffb65a 53%, #de792e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-slogan {
  color: #ffe2b7;
}
.hero-description {
  color: #c6b4a2;
}
.btn-amber {
  color: #26150a;
  border-color: #ffc983;
  background: linear-gradient(125deg, #ffe0a1, #e9a74e 48%, #f5bb66);
  box-shadow: 0 5px 26px #db86384d;
}
.btn-amber:hover {
  box-shadow: 0 7px 34px #eaa34f6d;
}

.radar-panel {
  border-color: #9c633c;
  background:
    radial-gradient(ellipse at 44% 35%, #51301b 0%, #221c16 42%, #151615 88%),
    #171411;
  box-shadow:
    0 22px 86px #0007,
    0 0 40px #ec9a2d22,
    inset 0 1px 0 #ffc68166;
  isolation: isolate;
}
.radar-panel::after {
  content: "";
  position: absolute;
  height: 2px;
  top: 0;
  left: 0;
  width: 44%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    #ffe0a3,
    #ff8c39,
    transparent
  );
  opacity: 0.85;
  animation: chaiEdgeTravel 8s linear infinite;
}
.radar-top,
.radar-bottom,
.radar-reading {
  z-index: 1;
}
.radar-circle {
  border-color: #ffb66670;
  filter: drop-shadow(0 0 8px #ffa34d33);
}
.radar-ring1 {
  animation: chaiBreathingRing 5.4s ease-in-out infinite;
}
.radar-ring2 {
  border-color: #dba56e7d;
}
.radar-sweep {
  background: conic-gradient(
    from -28deg,
    #ffb353a1,
    #ffcd7040 13%,
    #ffcd7000 34%,
    transparent 100%
  );
  animation-duration: 9s;
  filter: drop-shadow(0 0 6px #efa34265);
}
.radar-core {
  border-color: #db984e;
  background: radial-gradient(circle, #372717 0%, #211912 85%);
  box-shadow:
    inset 0 0 24px #f5af4c35,
    0 0 24px #e99f4e40;
}
.radar-core strong,
.radar-core small {
  color: #ffdd9c;
}
.radar-panel[data-tea-level="strong"] .radar-core,
.radar-panel[data-tea-level="boiling"] .radar-core {
  box-shadow:
    inset 0 0 27px #f5af4c55,
    0 0 36px #ff9c35a1;
}
.radar-panel[data-tea-level="boiling"] .radar-ring1 {
  border-color: #ff9368;
}
.radar-panel[data-tea-level="insufficient"] .radar-core strong {
  color: #ffe3ac;
}
.reading-detail strong {
  color: #fff0d5;
}
.tea-evidence > div {
  background: #291e15e0;
  border-color: #825b37;
}
.tea-evidence strong {
  color: #ffd79a;
}
.scale-bars b.on {
  background: linear-gradient(0deg, #b86a20, #ffe0a0);
  box-shadow: 0 0 10px #ea953b85;
  transform-origin: bottom center;
  animation: chaiBarRise 0.52s ease-out both;
}

/* Summary cards use differentiated glows; numeric values remain real API values. */
.metric-card {
  border-color: #5c4430;
  background: linear-gradient(145deg, #292016, #171818 80%);
  box-shadow: inset 0 1px 0 #ffcf8d1b;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  opacity: 0.8;
  background: linear-gradient(90deg, transparent, #ffaf4f, transparent);
}
.metric-card:nth-child(2)::before {
  background: linear-gradient(90deg, transparent, #e4a45e, transparent);
}
.metric-card:nth-child(3)::before {
  background: linear-gradient(90deg, transparent, #6bdcae, transparent);
}
.metric-card:nth-child(4)::before {
  background: linear-gradient(90deg, transparent, #8bd5ed, transparent);
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: #b27c49;
  box-shadow:
    0 12px 32px #0006,
    inset 0 1px 0 #ffe1b033;
}
.metric-number {
  color: #fff1d9;
}
.metric-symbol {
  color: #ffc373;
}

/* Source ticker: visible motion, but pauseable and screen-reader friendly. */
.pulse-strip {
  border-color: #8b5a33;
  background: linear-gradient(120deg, #312114, #151b1d 60%, #2b2219);
  box-shadow:
    inset 0 1px 0 #ffbd7333,
    0 6px 29px #0005;
}
.pulse-label {
  background: #713d1c;
  color: #ffdb9c;
}
.pulse-light {
  background: #ffbf66;
  box-shadow: 0 0 16px #ff9e3a;
  animation: chaiLiveHeartbeat 3s ease-in-out infinite;
}
.pulse-copy {
  position: relative;
  padding-inline: 0;
  text-overflow: clip;
}
.ticker-track {
  display: flex;
  width: max-content;
  direction: ltr;
  animation: chaiTicker 34s linear infinite;
}
.ticker-group {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  direction: rtl;
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline: 18px;
}
.ticker-part::before {
  content: "◆";
  color: #ffc474;
  font-size: 8px;
  margin-inline-end: 10px;
}
.pulse-strip:hover .ticker-track,
.pulse-strip:focus-within .ticker-track {
  animation-play-state: paused;
}

/* The map reads as a spatial instrument, not a military operational tracker. */
.map-canvas {
  background: radial-gradient(circle at 50% 40%, #213338, #0d181c 88%);
  border-bottom-color: #4d443b;
}
.map-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(#86babc0c 1px, transparent 1px),
    linear-gradient(90deg, #86babc0c 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.map-canvas::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  top: 0;
  height: 34%;
  opacity: 0.24;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #9dbfc51b, transparent);
  animation: chaiMapScan 11s ease-in-out infinite;
}
.map-top-overlay,
.map-bot-note,
.map-zoom {
  z-index: 5;
}
.event-marker {
  z-index: 4;
}
.event-marker::before {
  animation: chaiMarkerWave 3.6s ease-out infinite;
  will-change: transform, opacity;
}
.event-marker::after {
  animation: chaiMarkerGlow 3.6s ease-in-out infinite;
}
.event-marker:nth-child(3n)::before,
.event-marker:nth-child(3n)::after {
  animation-delay: -1.2s;
}
.event-marker:nth-child(3n + 1)::before,
.event-marker:nth-child(3n + 1)::after {
  animation-delay: -2.4s;
}
.event-marker:hover {
  z-index: 9;
}
.map-topline {
  border-color: #62472f;
  background: #272019;
}
.map-meta-dot {
  background: #80ddb1;
}

/* Community voting — two independent choices, not editorial fact-check badges. */
.events-pane {
  border-color: #755337;
  background: linear-gradient(180deg, #201a16, #151614);
}
.event-row {
  display: block;
  padding: 14px 15px 12px;
  border-bottom: 1px solid #5e463541;
  cursor: default;
  background: transparent;
  transition: background-color 0.2s ease;
}
.event-row:hover,
.event-row.selected {
  background: #302319b5;
}
.event-row-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.event-row .event-time {
  margin-inline-start: auto;
}
.event-open {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.7;
  font-family: inherit;
  text-align: start;
  color: #faebd7;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.event-open:hover {
  color: #ffc978;
}
.event-state.unconfirmed {
  color: #ffce7f;
  background: #6d441631;
  border-color: #a77c3f;
}
.event-state.review {
  color: #a2efd0;
  background: #1c57403d;
  border-color: #4eab81;
}
.event-state.external {
  color: #9ddbf1;
  border-color: #599ab4;
}
.event-vote-slot {
  margin-top: 10px;
}
.tea-vote-controls {
  min-width: 0;
}
.tea-vote-heading {
  color: #b9a188;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tea-vote-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tea-vote-option {
  min-width: 0;
}
.tea-vote-button {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  min-height: 44px;
  padding: 10px 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.3;
  font-family: inherit;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}
.tea-vote-button.hot {
  color: #ffdb9d;
  background: linear-gradient(125deg, #683610b8, #2b2218d9);
  border: 1px solid #b9702e;
  box-shadow: inset 0 1px 0 #ffc26b21;
}
.tea-vote-button.cold {
  color: #bdefff;
  background: linear-gradient(125deg, #153e4dd4, #17272dd9);
  border: 1px solid #3687a7;
  box-shadow: inset 0 1px 0 #9dd9ff1f;
}
.tea-vote-button.hot:hover,
.tea-vote-button.hot:focus-visible {
  border-color: #ffbb5a;
  background: linear-gradient(125deg, #97501a, #422815);
  box-shadow: 0 0 18px #f1973b55;
}
.tea-vote-button.cold:hover,
.tea-vote-button.cold:focus-visible {
  border-color: #9de5ff;
  background: linear-gradient(125deg, #176580, #153341);
  box-shadow: 0 0 18px #6bd7ef55;
}
.tea-vote-button:active {
  transform: scale(0.975);
}
.tea-vote-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.tea-vote-button:disabled:hover {
  box-shadow: none;
}
.tea-vote-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}
.tea-vote-icon svg {
  width: 19px;
  height: 19px;
}
.tea-vote-title {
  white-space: nowrap;
}
.tea-vote-count {
  color: #f1e3d2;
  border-radius: 5px;
  font:
    700 11px Arial,
    sans-serif;
  background: #100d0a9a;
  padding: 3px 5px;
  margin-inline-start: auto;
  min-width: 19px;
  text-align: center;
}
.tea-vote-choice-status {
  display: block;
  margin-top: 5px;
  font-weight: 800;
  font-size: 11px;
  text-align: center;
}
.tea-vote-option.hot .tea-vote-choice-status {
  color: #ffce91;
}
.tea-vote-option.cold .tea-vote-choice-status {
  color: #a9e4f3;
}
.tea-vote-disclaimer {
  font-size: 11px;
  color: #baa893;
  margin: 12px 0 0;
  border-inline-start: 2px solid #a86d3a;
  padding-inline-start: 10px;
}
.tea-vote-controls.full {
  margin-top: 17px;
}
.tea-vote-controls.full .tea-vote-button {
  min-height: 62px;
  font-size: 15px;
}
.tea-vote-controls.full .tea-vote-icon,
.tea-vote-controls.full .tea-vote-icon svg {
  width: 27px;
  height: 27px;
}
.tea-vote-controls.full .tea-vote-choice-status {
  font-size: 13px;
}
.event-truth-state {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 13px 0 14px;
  border: 1px solid #655039;
  background: #292218;
  padding: 12px;
  border-radius: 9px;
  font-size: 12px;
}
.event-truth-state > span {
  color: #cdb9a0;
}
.event-truth-state .event-state {
  font-size: 11px;
  padding: 3px 9px;
}

/* Responsive layout and legible action labels on the smallest supported phones. */
@media (max-width: 990px) {
  .radar-panel {
    box-shadow:
      0 0 28px #ec9a2d20,
      inset 0 1px 0 #ffc68155;
  }
}
@media (max-width: 680px) {
  .event-row {
    padding: 13px 12px;
  }
  .event-row-head {
    gap: 8px;
  }
  .event-open {
    font-size: 12px;
  }
  .tea-vote-options {
    gap: 8px;
  }
  .tea-vote-button {
    min-height: 42px;
    padding: 9px 7px;
    font-size: 12px;
    gap: 4px;
  }
  .tea-vote-icon,
  .tea-vote-icon svg {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }
  .tea-vote-count {
    font-size: 10px;
    padding: 3px 4px;
  }
  .tea-vote-controls.full .tea-vote-button {
    font-size: 13px;
  }
  .pulse-strip {
    margin-bottom: 28px;
  }
  .metric-card:hover {
    transform: none;
  }
}
@media (max-width: 350px) {
  .tea-vote-options {
    gap: 5px;
  }
  .tea-vote-button {
    gap: 3px;
    padding: 8px 4px;
    font-size: 11px;
  }
  .tea-vote-count {
    min-width: 16px;
  }
  .tea-vote-controls.full .tea-vote-button {
    font-size: 12px;
  }
}

/* GPU-friendly, non-blocking motion. */
@keyframes chaiLiveHeartbeat {
  50% {
    opacity: 0.68;
    box-shadow:
      0 0 0 7px #51d3ab17,
      0 0 21px #79dfad87;
  }
}
@keyframes chaiBreathingRing {
  50% {
    opacity: 0.65;
    transform: scale(1.045);
  }
}
@keyframes chaiEdgeTravel {
  from {
    transform: translateX(-108%);
  }
  to {
    transform: translateX(235%);
  }
}
@keyframes chaiBarRise {
  from {
    opacity: 0.3;
    transform: scaleY(0.3);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}
@keyframes chaiTicker {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}
@keyframes chaiMapScan {
  0%,
  100% {
    transform: translateY(-108%);
  }
  50% {
    transform: translateY(310%);
  }
}
@keyframes chaiMarkerWave {
  0% {
    opacity: 0.73;
    transform: scale(0.84);
  }
  78%,
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}
@keyframes chaiMarkerGlow {
  50% {
    box-shadow:
      0 0 0 5px #0009,
      0 0 21px var(--marker);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Arabic shaping and mobile layout: never add spacing inside joined letters. */
html[dir="rtl"] body,
html[dir="rtl"] body * {
  letter-spacing: normal !important;
  word-spacing: normal;
}
html[lang="ar"] .hero h1 {
  font-size: clamp(28px, 4.1vw, 58px);
  line-height: 1.5;
  white-space: nowrap;
  max-width: 100%;
  margin-block: 18px 8px;
}
html[lang="ar"] .hero h1 span {
  display: inline;
}
.chai-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.chai-alert-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  font:
    26px/1 Arial,
    sans-serif;
  color: #ffe2b7;
  background: #453725;
  border: 1px solid #99784c;
  border-radius: 9px;
  cursor: pointer;
}
.chai-alert-head {
  position: sticky;
  top: -14px;
  z-index: 1;
  background: #1e211c;
  padding-block: 8px;
}
.chai-notify-panel {
  max-height: calc(100dvh - 110px);
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.mobile-drawer {
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
}
@media (max-width: 680px) {
  html[lang="ar"] .hero h1 {
    font-size: clamp(25px, 7.6vw, 48px);
  }
  .hero-slogan {
    font-size: clamp(15px, 4.2vw, 20px);
    line-height: 1.8;
  }
  .hero-copy {
    min-width: 0;
  }
  .chai-notify-panel {
    inset-block-start: 84px;
    max-height: calc(100dvh - 100px);
  }
  .utility-right {
    min-width: 0;
  }
  .utility-right > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Final usability audit: readable supporting copy and honest install states. */
#install-button[hidden],
#mobile-install-fab[hidden],
#install-retry[hidden] {
  display: none !important;
}
body.modal-open {
  overflow: hidden;
}
.close-modal {
  width: 44px;
  height: 44px;
  flex: none;
}
.install-app-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: #30231a;
  border: 1px solid #795839;
}
.install-app-preview strong {
  font-size: 19px;
}
.install-app-preview small {
  display: block;
  font-size: 11px;
  color: #ead2ae;
}
.install-steps {
  padding-inline-start: 28px;
  display: grid;
  gap: 16px;
  font-size: 15px;
  line-height: 1.8;
  color: #f3e4ce;
}
.install-steps li::marker {
  color: #ffd092;
  font-weight: bold;
}
.install-copy-url {
  direction: ltr;
  overflow-wrap: anywhere;
  user-select: all;
}
.notice-method {
  font: inherit;
  color: #ffd4a0;
  background: #3a291d;
  border: 1px solid #99724a;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.event-open {
  font-size: 14px !important;
  line-height: 1.9 !important;
}
.event-meta,
.event-time,
.event-state,
.metric-sub,
.filter-select,
.reading-detail p,
.site-notice p {
  font-size: 12px !important;
  color: #cfbea9;
}
.footer-links {
  font-size: 12px;
  color: #cfbea9;
}
.reading-detail p {
  line-height: 1.9;
}
.event-type-icon {
  border-color: #806245;
  color: #ffcc8a;
}
.event-type-icon[data-category="safety"] {
  color: #ffa599;
  border-color: #ac6458;
}
.event-type-icon[data-category="services"] {
  color: #9ee3e0;
  border-color: #538d89;
}
.event-type-icon[data-category="events"] {
  color: #debbff;
  border-color: #9479ad;
}
.event-type-icon[data-category="traffic"] {
  color: #ffd28f;
  border-color: #a17e4d;
}
@media (max-width: 680px) {
  .hero-description {
    font-size: 14px;
    line-height: 2;
  }
  .mission-panel p {
    font-size: 14px;
  }
  .btn-lg {
    min-height: 46px;
  }
  .site-notice {
    line-height: 1.9;
  }
  .modal-card {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .reading-detail strong {
    font-size: 19px;
  }
  .reading-scale {
    font-size: 11px;
  }
  .tea-evidence {
    gap: 8px;
  }
}

/* Fit the offline geographic projection without stretching it between devices. */
.map-world {
  inset: auto;
  left: 50%;
  top: 50%;
  transform-origin: center;
  transform: translate(-50%, -50%);
}
.map-canvas {
  background: #11191c;
}
@media (min-width: 991px) {
  .watch-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr);
  }
}
@media (max-width: 680px) {
  .map-canvas {
    height: 380px;
  }
  .event-items {
    max-height: 480px;
  }
  .radar-reading {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .radar-visual {
    margin-inline: -12px;
    transform: scale(0.7);
  }
  .tea-evidence {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.tea-vote-button.is-selected {
  opacity: 1;
  border-width: 2px;
  box-shadow: 0 0 0 2px currentColor;
}
.tea-vote-feedback {
  font-size: 12px;
  color: #bce5c8;
  margin: 7px 0 0;
}
.tea-vote-feedback:empty {
  display: none;
}
.tea-vote-feedback.error {
  color: #ffd2ce;
}
.tea-vote-controls.compact .tea-vote-disclaimer {
  font-size: 12px;
}

/* The feed leads the page; the existing map stays below it. */
.feed-first {
  margin: 24px 0 30px;
  position: static;
  width: 100%;
  max-height: none;
}
.feed-first .events-pane-header {
  padding: 18px 20px;
}
.feed-first h1 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 4px 0;
}
.feed-first .filters {
  margin: 0;
  padding: 12px 18px;
  border-block: 1px solid #57422c;
}
.feed-first .event-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  max-height: none;
  overflow: visible;
}
.feed-first .event-row {
  border: 1px solid #6d5334;
  border-radius: 14px;
  margin: 0;
  padding: 16px;
  background: #211c16;
}
.feed-first .event-open {
  font-size: 17px;
  line-height: 1.7;
}
.event-category-label {
  display: inline-block;
  color: #ffe0b0;
  font-size: 13px;
  font-weight: 700;
  background: #44331f;
  padding: 3px 8px;
  border-radius: 6px;
}
.event-preview {
  font-size: 14px;
  line-height: 1.8;
  color: #d6ccbe;
  margin: 9px 0;
}
.event-participate {
  font-size: 13px;
  color: #eac48e;
  margin: 9px 0 5px;
}
.feed-first .tea-vote-button {
  min-height: 50px;
  font-size: 15px;
}
.feed-first .tea-vote-count {
  font-size: 12px;
  white-space: nowrap;
}
.feed-more {
  margin: 12px 18px;
}
.watch-grid {
  grid-template-columns: 1fr;
}
.event-extra-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #51402c;
}
.cup-rating-heading {
  font-size: 12px;
  color: #d6c3a8;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cup-rating-heading small {
  font-size: 11px;
  color: #b6aea2;
}
.cup-rating-buttons {
  display: flex;
  gap: 2px;
}
.cup-rating-button {
  width: 38px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #847663;
  border-radius: 6px;
  cursor: pointer;
  padding: 6px;
}
.cup-rating-button svg {
  width: 24px;
  height: 24px;
  display: block;
}
.cup-rating-button.filled,
.cup-rating-button:hover {
  color: #ffcf89;
  background: #3d2e1d;
}
.cup-rating-button[aria-pressed="true"] {
  outline: 2px solid #d6a05b;
}
.event-share {
  min-height: 42px;
  border: 1px solid #997044;
  color: #ffdfa9;
  background: #362719;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.report-counter {
  font-size: 13px;
  color: #d6bb95;
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.report-counter.over-limit {
  color: #ffd2ce;
}
.share-preview {
  max-width: 100%;
  border-radius: 10px;
}
.share-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.share-links a {
  padding: 10px;
  border: 1px solid #a07949;
  border-radius: 8px;
  color: #ffdfa9;
  text-decoration: none;
}
@media (max-width: 700px) {
  .feed-first .event-items {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .feed-first .event-row {
    padding: 13px;
  }
  .feed-first .filters {
    padding: 10px;
  }
  .feed-first .tea-vote-button {
    font-size: 14px;
  }
  .feed-first .event-open {
    font-size: 16px;
  }
  .event-time {
    font-size: 11px;
    white-space: normal;
  }
  .feed-first {
    margin-top: 14px;
  }
}
@media (max-width: 350px) {
  .cup-rating-button {
    width: 33px;
  }
  .event-share {
    padding: 7px 9px;
  }
  .feed-first .tea-vote-button {
    font-size: 12px;
  }
  .feed-first .tea-vote-count {
    font-size: 11px;
  }
}

.event-extra-actions {
  flex-wrap: wrap;
}
.filter-select > span {
  font-size: 14px;
  font-weight: 700;
  color: #ffe0b0;
}

.mobile-install-fab {
  position: static !important;
  margin-inline-start: auto;
  bottom: auto;
  left: auto;
  min-height: 40px;
  font-size: 12px;
  box-shadow: none;
  display: none;
}
.toast-container {
  bottom: 22px;
}
@media (max-width: 990px) {
  .events-tabs .mobile-install-fab {
    display: inline-flex;
  }
}

.events-tabs {
  flex-wrap: wrap;
}
.person-result {
  display: block;
  color: #ffdfa9;
  padding: 12px;
  border-bottom: 1px solid #77603f;
}
.event-author:empty {
  display: none;
}
.event-author a {
  color: #d8c4a7;
}
.contributor-badge {
  color: #afe0bc;
  font-size: 12px;
}

/* Small top disclosure; fields occupy space only when requested. */
.report-entry {
  margin: 0 0 14px;
}
.report-composer-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #725535;
  border-radius: 11px;
  background: #302519;
  color: #ebc99e;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  text-align: start;
}
.report-composer-toggle span {
  flex: 1;
  min-width: 0;
}
.report-composer-toggle .chai-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.report-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.report-composer-toggle[aria-expanded="true"] .report-chevron {
  transform: rotate(180deg);
}
.report-composer-toggle:focus-visible {
  outline: 2px solid #edba73;
  outline-offset: 3px;
}
.report-compose-body {
  padding: 14px;
  margin-top: 8px;
  border: 1px solid #584329;
  border-radius: 11px;
  background: #201b15;
}
.report-compose-body[hidden] {
  display: none;
}
.report-compose-body h2 {
  font-size: 17px;
  margin: 0 0 6px;
}
.report-compose-body p {
  font-size: 12px;
  line-height: 1.7;
}
.report-compose-body .field-grid > * {
  min-width: 0;
}
.report-compose-body input,
.report-compose-body select,
.report-compose-body textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
}
@media (prefers-reduced-motion: reduce) {
  .report-chevron {
    transition: none;
  }
}

.event-location-toggle svg{width:20px;height:20px;flex-shrink:0}
.event-location-toggle{display:flex;align-items:center;gap:8px;white-space:normal;text-align:start}
#event-location-panel[hidden],.event-location-pin[hidden]{display:none}
.event-location-map{display:block;position:relative;width:100%;max-width:420px;aspect-ratio:610/580;direction:ltr;margin:10px auto;padding:0;overflow:hidden;border:1px solid #725535;border-radius:12px;background:#11191c;cursor:crosshair;touch-action:pan-y}
.event-location-map img{display:block;width:100%;height:100%;pointer-events:none}
.event-location-pin{position:absolute;transform:translate(-50%,-100%);width:28px;height:32px;color:#ffd089;pointer-events:none;filter:drop-shadow(0 1px 3px #000)}
.event-location-pin svg{width:100%;height:100%;fill:#53391c}
.event-location-map:focus-visible{outline:3px solid #efc182;outline-offset:3px}
#event-location-status{margin:5px 0;color:#d3c1a4}
