/* ============================================================
   SamUpStream Drop Zone — v3 "glass" theme
   macOS-clean: frosted translucent panels, hairline borders,
   segmented-control tabs, soft depth. Same TBC palette
   (teal → blue → indigo → magenta), same gamer identity.
   ============================================================ */

:root {
  --sky: #131830;
  --text: #eceffb;
  --muted: #9aa3c9;

  --teal: #2cc8e0;
  --blue: #4a86d9;
  --indigo: #4b3fae;
  --pink: #ce7bbe;
  --brand: #8f6fd9;
  --vbuck: #ffd24a;
  --danger: #ff5d6c;

  --r-legendary: #e98a2c;
  --r-epic: #b05de8;
  --r-rare: #3fa7f2;
  --r-uncommon: #5fbb4e;
  --r-common: #79829f;
  --r-icon: #2cc8e0;
  --r-marvel: #d8404b;
  --r-gaminglegends: #7864ea;
  --r-starwars: #d6c64a;

  /* glass system */
  --glass: rgba(30, 37, 62, 0.55);
  --glass-2: rgba(20, 26, 46, 0.55);
  --hairline: rgba(255, 255, 255, 0.11);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-deep: 0 18px 50px rgba(0, 0, 0, 0.45);

  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Kanit", sans-serif;
  --font-body: "Asap", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(206, 123, 190, 0.26), transparent 60%),
    radial-gradient(1000px 550px at -10% 5%, rgba(44, 200, 224, 0.20), transparent 55%),
    radial-gradient(900px 550px at 50% 112%, rgba(98, 84, 205, 0.30), transparent 60%),
    var(--sky);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

/* glass building block */
.glass, .lookup, .map-frame, .news-card, .shop-card, .ticket,
.metric, .social-hero, .clip-card {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--hairline);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 18px rgba(44, 200, 224, 0.35));
}

.brand .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2px;
}

.brand h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--teal) 0%, var(--blue) 38%, var(--text) 60%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--hairline);
  background: var(--glass-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 9px 15px;
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 150ms ease;
}

.live-pill:hover { border-color: var(--hairline-strong); }

.live-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}

.live-pill.is-live {
  color: var(--text);
  border-color: rgba(255, 93, 108, 0.55);
  box-shadow: 0 0 22px rgba(255, 93, 108, 0.22);
}

.live-pill.is-live .dot {
  background: var(--danger);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

/* ---------- Tabs: segmented control ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  margin: 18px 0 28px;
  padding: 5px;
  background: var(--glass-2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs { position: relative; }

.tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 9px 18px;
  cursor: pointer;
  border-radius: 999px;
  transition: color 200ms ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.tab:hover { color: var(--text); }

.tab[aria-selected="true"] { color: #fff; }

/* sliding gradient pill behind the active tab */
.tab-indicator {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(44, 200, 224, 0.85), rgba(75, 63, 174, 0.9) 75%);
  box-shadow: 0 4px 14px rgba(44, 200, 224, 0.25);
  transition: transform 280ms cubic-bezier(0.3, 0.9, 0.3, 1), width 280ms cubic-bezier(0.3, 0.9, 0.3, 1);
  z-index: 0;
  pointer-events: none;
}

.panel[hidden] { display: none; }

.panel { animation: panelIn 300ms ease; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Shared ---------- */

.section-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  margin: 32px 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-title .count {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  padding: 26px 0;
  text-align: center;
}

.status.error { color: var(--danger); }

.btn {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.btn:hover { border-color: var(--hairline-strong); }

.btn.primary {
  background: linear-gradient(135deg, rgba(44, 200, 224, 0.85), rgba(75, 63, 174, 0.9));
  border-color: transparent;
}

.btn.primary:hover { box-shadow: 0 4px 16px rgba(44, 200, 224, 0.3); }

input[type="search"], input[type="text"] {
  background: var(--glass-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 999px;
  transition: border-color 150ms ease;
}

input::placeholder { color: var(--muted); }
input:hover { border-color: var(--hairline-strong); }

/* ---------- Item Shop ---------- */

.shop-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.shop-card {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--r-common);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}

.shop-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--glass-2);
}

.shop-card .body {
  padding: 10px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.shop-card .name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card .price {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--vbuck);
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-card .price img.vbuck {
  width: 16px;
  height: 16px;
  aspect-ratio: auto;
  background: none;
}

.shop-card .price .was {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 12px;
}

.rarity-legendary { border-top-color: var(--r-legendary); }
.rarity-epic { border-top-color: var(--r-epic); }
.rarity-rare { border-top-color: var(--r-rare); }
.rarity-uncommon { border-top-color: var(--r-uncommon); }
.rarity-common { border-top-color: var(--r-common); }
.rarity-icon { border-top-color: var(--r-icon); }
.rarity-marvel { border-top-color: var(--r-marvel); }
.rarity-gaminglegends { border-top-color: var(--r-gaminglegends); }
.rarity-starwars { border-top-color: var(--r-starwars); }

/* ---------- Islands ---------- */

.finder-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.finder-controls input[type="search"] { flex: 1 1 240px; }

.lookup .row input[type="text"] { flex: 1 1 240px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.chip {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--glass-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.chip:hover { border-color: var(--hairline-strong); }

.chip[aria-pressed="true"] {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(44, 200, 224, 0.1);
}

.island-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.ticket {
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ticket:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}

.ticket .cover {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 34px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.ticket .cover .tag-emoji {
  position: absolute;
  right: 10px;
  bottom: 6px;
  font-size: 18px;
  font-style: normal;
  opacity: 0.9;
}

.ticket .info { padding: 14px 16px 12px; flex: 1; }

.ticket .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket .tags {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket .stub {
  border-top: 1px dashed var(--hairline-strong);
  background: var(--glass-2);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.ticket .stub::before,
.ticket .stub::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sky);
  border: 1px solid var(--hairline);
}
.ticket .stub::before { left: -7px; }
.ticket .stub::after { right: -7px; }

.ticket .code {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--teal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  appearance: none;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color 150ms ease, border-color 150ms ease;
}

.copy-btn:hover { color: var(--teal); border-color: var(--teal); }
.copy-btn.copied { color: var(--r-uncommon); border-color: var(--r-uncommon); }

.load-more-row {
  display: flex;
  justify-content: center;
  margin: 22px 0 4px;
}

/* ---------- Lookup panels & metric tiles ---------- */

.lookup {
  border-radius: var(--radius);
  padding: 20px;
  margin: 6px 0 30px;
  box-shadow: var(--shadow-soft);
}

.lookup h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
}

.lookup p.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

.lookup .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.metric {
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}

.metric .value {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--teal);
  line-height: 1.1;
}

.metric .label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.lookup-title { margin: 16px 0 0; font-weight: 600; }

.lookup-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Player stats ---------- */

.player-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 6px 0 14px;
}

.player-head .name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 26px;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--teal), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.player-head .bp {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--vbuck);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 11px;
}

.mode-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

.mode-table th, .mode-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}

.mode-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.mode-table td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
}

.mode-table td { font-family: var(--font-mono); }

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.news-card {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--glass-2);
}

.news-card .body { padding: 13px 15px 15px; }

.news-card .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 6px;
}

.news-card .text {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Map ---------- */

.map-controls { margin-bottom: 14px; }

/* reusable segmented control with sliding pill (same feel as tabs) */
.seg {
  position: relative;
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--glass-2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

.seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 17px;
  cursor: pointer;
  border-radius: 999px;
  transition: color 200ms ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { color: #fff; }

.seg-indicator {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(44, 200, 224, 0.85), rgba(75, 63, 174, 0.9) 75%);
  box-shadow: 0 4px 14px rgba(44, 200, 224, 0.25);
  transition: transform 280ms cubic-bezier(0.3, 0.9, 0.3, 1), width 280ms cubic-bezier(0.3, 0.9, 0.3, 1);
  z-index: 0;
  pointer-events: none;
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}

.map-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Social ---------- */

.social-hero {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  margin-bottom: 22px;
}

.social-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.social-hero .caption {
  padding: 18px 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.social-hero h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 30px);
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(100deg, var(--teal), var(--text) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--hairline);
  background: var(--glass-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 9px 16px;
  border-radius: 999px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.platform-btn:hover { transform: translateY(-2px); }

.platform-btn .pdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.platform-btn.discord .pdot { background: #5865f2; }
.platform-btn.discord:hover { border-color: #5865f2; box-shadow: 0 4px 14px rgba(88, 101, 242, 0.3); }
.platform-btn.tiktok .pdot { background: linear-gradient(135deg, #25f4ee, #fe2c55); }
.platform-btn.tiktok:hover { border-color: #25f4ee; box-shadow: 0 4px 14px rgba(37, 244, 238, 0.25); }
.platform-btn.youtube .pdot { background: #ff0000; }
.platform-btn.youtube:hover { border-color: #ff4444; box-shadow: 0 4px 14px rgba(255, 0, 0, 0.25); }
.platform-btn.twitch .pdot { background: #9146ff; }
.platform-btn.twitch:hover { border-color: #9146ff; box-shadow: 0 4px 14px rgba(145, 70, 255, 0.3); }

.social-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 18px;
  align-items: start;
}

.social-col h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 12px;
}

.clip-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--indigo) transparent;
}

.clip-scroll::-webkit-scrollbar { width: 5px; }
.clip-scroll::-webkit-scrollbar-track { background: transparent; }
.clip-scroll::-webkit-scrollbar-thumb { background: var(--indigo); border-radius: 4px; }

.clip-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: stretch;
  gap: 0;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.clip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--hairline-strong);
}

.clip-card .thumb {
  position: relative;
  flex: 0 0 168px;
  background: var(--glass-2);
}

.clip-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 80px;
}

/* play badge over the thumbnail */
.clip-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.55) 60%, transparent 61%);
}
.clip-card .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-left: 11px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform: translateX(2px);
  z-index: 1;
}

.clip-card .body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.clip-card .title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clip-card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* expanded in-place player */
.clip-card.playing {
  display: block;
  cursor: default;
  transform: none;
}

.clip-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
}

.clip-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 480px) {
  .clip-card .thumb { flex-basis: 132px; }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.site-footer .links { display: flex; gap: 16px; }

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--teal); }

.disclaimer { font-size: 11px; max-width: 560px; }

/* ---------- Motion & small screens ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .social-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .island-grid { grid-template-columns: 1fr; }
}

/* ---------- Live Twitch embed (Social tab) ---------- */

.live-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 93, 108, 0.45);
  box-shadow: 0 0 32px rgba(255, 93, 108, 0.18), var(--shadow-deep);
  margin-bottom: 26px;
  aspect-ratio: 16 / 9;
  background: var(--glass-2);
}

.live-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Offline Twitch status card (Social tab) ---------- */

.live-offline-card {
  background: var(--glass-2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 26px;
}

.live-offline-card .line1 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.live-offline-card a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: #a970ff;
  text-decoration: none;
}

.live-offline-card a:hover { text-decoration: underline; }

/* ---------- See more on Twitch ---------- */

.see-more-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.see-more {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.see-more:hover {
  border-color: #9146ff;
  box-shadow: 0 4px 14px rgba(145, 70, 255, 0.3);
}

/* ---------- Islands: Trending mode ---------- */

.islands-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}

.trend-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.ticket .rank {
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: rgba(10, 13, 26, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 2px 10px;
  z-index: 1;
}

.ticket .ccu {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  margin-top: 4px;
}

/* ---------- Trending period mini-toggle ---------- */

.seg-mini { padding: 4px; }
.seg-mini .seg-btn { font-size: 13px; padding: 6px 14px; }
.seg-mini .seg-indicator { top: 4px; height: calc(100% - 8px); }

.seg[hidden] { display: none; }

/* ---------- Island detail sheet ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 22, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
  animation: overlayIn 200ms ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-deep);
  width: min(560px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  position: relative;
  animation: sheetIn 260ms cubic-bezier(0.3, 0.9, 0.3, 1);
}

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(10, 13, 26, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-close:hover { border-color: var(--hairline-strong); }

.modal-cover {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 48px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.modal-body { padding: 18px 22px 24px; }

.modal-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 10px;
}

.modal-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-code-row .code {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--teal);
}

.modal-tags { margin: 0 0 14px; }
.modal-tags .chip { cursor: default; }

.modal-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 16px;
  white-space: pre-line;
}

.modal-desc.empty { color: var(--muted); font-style: italic; }

.modal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.modal-facts strong { color: var(--text); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-sheet { animation: none; }
}

/* shop cards are links to the official item shop */
a.shop-card { text-decoration: none; color: inherit; }
