
/* TimeLive V9.2 - Complete responsive theme */

:root {
  color-scheme: dark;
  --bg: #0a0e1b;
  --surface: #151a2d;
  --surface2: #1e243b;
  --line: #ffffff24;
  --text: #f9f7ff;
  --muted: #b6b7ca;
  --accent: #d8bcff;
  --top-bg: rgba(10,14,27,.94);
  --nav-text: #d8d7e5;
  --button-bg: #ffffff13;
  --button-hover: #ffffff24;
  --input-bg: #111629;
  --input-border: #ffffff48;
  --banner-bg: #ffffff0b;
  --panel-bg: #11182d;
  --on-image: #fff;
  --selected-bg: #d8bcff;
  --selected-text: #211530;
  --hero-overlay: linear-gradient(
    90deg,#0b0e1be8 0%,#0b0e1b85 55%,#0b0e1b20 100%
  );
  --viewer-overlay: linear-gradient(
    0deg,#070a15f2 0%,#070a1540 80%
  );
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #dce0ed;
  --surface: #e9eaf2;
  --surface2: #d3d8e8;
  --line: #5c648039;
  --text: #252c43;
  --muted: #505c75;
  --accent: #6b4ca6;
  --top-bg: rgba(224,228,240,.95);
  --nav-text: #343d58;
  --button-bg: #d0d5e4;
  --button-hover: #c1c9de;
  --input-bg: #f0f0f7;
  --input-border: #929bb4;
  --banner-bg: #d0d6e6;
  --panel-bg: #cbd3e4;
  --selected-bg: #60418f;
  --selected-text: #fff;
  --hero-overlay: linear-gradient(
    90deg,#1c2942db 0%,#28345185 58%,#1a263b20 100%
  );
  --viewer-overlay: linear-gradient(
    0deg,#15213ee8 0%,#17233c30 90%
  );
}

/* Base */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

p {
  color: var(--text);
}

h1 {
  font-size: clamp(36px,5.2vw,76px);
  line-height: 1.07;
  letter-spacing: -.045em;
  margin: 14px 0;
}

h2 {
  font-size: clamp(23px,2.5vw,34px);
  letter-spacing: -.02em;
}

.shell {
  width: 100%;
  max-width: 1440px;
  margin: auto;
  padding: 0 24px;
  min-width: 0;
}

#app {
  min-width: 0;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--top-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.topin {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand {
  font-size: 25px;
  letter-spacing: -1.5px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand b {
  color: var(--accent);
}

.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 500;
}

.mainnav {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.mainnav a {
  padding: 10px 13px;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--nav-text);
}

.mainnav a.active {
  background: var(--selected-bg);
  color: var(--selected-text);
  font-weight: 700;
}

.mainnav a:not(.active):hover {
  background: var(--button-hover);
  color: var(--text);
}

.mainnav a.active:hover {
  background: var(--selected-bg);
  color: var(--selected-text);
  filter: brightness(.96);
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.menu {
  display: none;
}

/* Buttons */

.btn,
.chip {
  border: 1px solid var(--line);
  background: var(--button-bg);
  color: var(--text);
  padding: 10px 15px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn:hover,
.chip:hover {
  background: var(--button-hover);
}

.btn.primary,
.chip.active {
  background: var(--selected-bg);
  color: var(--selected-text);
  border-color: transparent;
  font-weight: 700;
}

.btn.primary:hover,
.chip.active:hover {
  background: var(--selected-bg);
  color: var(--selected-text);
  filter: brightness(.96);
}

.theme-toggle {
  white-space: nowrap;
  min-width: 92px;
}

/* Hero */

.hero {
  margin-top: 26px;
  min-height: 390px;
  display: flex;
  align-items: end;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel-bg);
  min-width: 0;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(24px,5vw,70px);
  max-width: 790px;
  min-width: 0;
}

.hero-content,
.hero-content p,
.hero-content .eyebrow {
  color: var(--on-image);
}

.hero-content .btn:not(.primary) {
  color: #fff;
  background: #ffffff24;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .19em;
  color: #d9c2fc;
}

.hero p {
  font-size: clamp(15px,1.7vw,19px);
  max-width: 570px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Sections */

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 34px 0 16px;
  min-width: 0;
}

.section-title h2 {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  min-width: 0;
}

.grid > * {
  min-width: 0;
}

.tile,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .2s,border-color .2s;
}

.tile:hover,
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tile img,
.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.tile-body,
.card-body {
  padding: 16px;
}

.tile h3,
.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.tile p,
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meta {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 7px;
}

html[data-theme="light"] .meta {
  color: #60448e;
}

/* Search and filters */

.tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0;
  min-width: 0;
}

.searchbar {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 220px;
}

.searchbar input {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--input-border);
  padding: 14px 16px;
  border-radius: 14px;
  min-width: 0;
  flex: 1;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px 0 12px;
  overscroll-behavior-x: contain;
}

.chip {
  white-space: nowrap;
  flex-shrink: 0;
}

.banner {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--banner-bg);
  border-radius: 16px;
  margin-top: 24px;
  min-width: 0;
}

.banner strong {
  display: block;
}

/* Swipe viewer */

.viewer {
  margin: 26px 0 18px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: end;
  background: var(--panel-bg);
  touch-action: pan-y;
  min-width: 0;
}

.viewer > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer:after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--viewer-overlay);
}

.viewer-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  max-width: 690px;
  min-width: 0;
  color: #fff;
}

.viewer h2 {
  font-size: clamp(28px,4vw,48px);
  margin: 8px 0;
}

.viewer p,
.viewer .meta,
.viewer .status {
  color: #fff;
}

.viewer p {
  margin: 0 0 16px;
}

.viewer-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.viewer-controls button {
  background: #ffffff24;
  color: #fff;
  border: 1px solid #ffffff55;
  padding: 10px 16px;
  border-radius: 12px;
}

.viewer-controls button:hover {
  background: #ffffff3d;
}

.viewer-content .btn {
  color: #fff;
  background: #ffffff24;
}

.status {
  font-size: 13px;
}

/* Detail and footer */

.footer {
  margin-top: 70px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
}

.crumb {
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
  align-items: start;
  min-width: 0;
}

.detail > * {
  min-width: 0;
}

.detail img {
  border-radius: 20px;
  border: 1px solid var(--line);
  width: 100%;
}

.detail-info {
  padding: 15px;
}

.detail-info h1 {
  font-size: clamp(30px,4vw,52px);
}

.notice {
  padding: 14px 17px;
  background: #3c2d32;
  border: 1px solid #b5837b;
  border-radius: 12px;
  color: #f8e2d9;
}

.hide {
  display: none !important;
}

.section-title h2,
.hero h1,
.viewer h2,
.detail h1,
.tile h3,
.card h3,
.banner,
.empty {
  overflow-wrap: anywhere;
}

/* Tablet navigation */

@media (max-width:1100px) {
  .grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .topin {
    position: relative;
  }

  .mainnav {
    display: none;
  }

  .menu {
    display: inline-flex;
  }

  .mainnav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    width: 100%;
    max-height: min(70vh,520px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--top-bg);
    padding: 15px 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px #0005;
  }
}

/* Mobile */

@media (max-width:700px) {
  .shell {
    padding: 0 14px;
  }

  .topin {
    min-height: 64px;
    gap: 8px;
    justify-content: space-between;
  }

  .brand {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 20px;
  }

  .brand small {
    font-size: 8px;
  }

  .header-actions {
    gap: 6px;
    margin-left: auto;
  }

  .header-actions .feedback-top,
  .header-actions > a[href="/find/"] {
    display: none;
  }

  .header-actions .btn {
    font-size: 13px;
    padding: 8px 10px;
  }

  .header-actions .theme-toggle {
    min-width: 0;
  }

  .header-actions .menu {
    display: inline-flex;
  }

  .mainnav.open {
    top: 100%;
    left: 0;
    right: 0;
  }

  .mainnav.open a {
    white-space: normal;
  }

  .hero {
    margin-top: 14px;
    width: 100%;
    min-height: 350px;
  }

  .hero:after {
    background: linear-gradient(
      0deg,#10182de8 0%,#111d3980 75%,#0b0e1b30 100%
    );
  }

  .hero-content {
    width: 100%;
    padding: 22px;
  }

  .hero h1 {
    font-size: clamp(30px,9vw,46px);
  }

  .grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }

  .tile-body,
  .card-body {
    padding: 12px;
  }

  .tile h3,
  .card h3 {
    font-size: 15px;
  }

  .tile p,
  .card p {
    font-size: 12px;
  }

  .tools {
    width: 100%;
  }

  .searchbar {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .searchbar input {
    min-width: 0;
    width: 100%;
  }

  .searchbar .btn {
    flex-shrink: 0;
    padding: 10px 14px;
  }

  .section-title {
    align-items: flex-start;
  }

  .viewer {
    min-height: 430px;
  }

  .viewer-content {
    padding: 18px;
  }

  .viewer-controls {
    flex-wrap: wrap;
  }

  .detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width:380px) {
  .brand {
    font-size: 18px;
  }

  .header-actions .btn {
    padding: 7px 8px;
    font-size: 12px;
  }

  .grid {
    grid-template-columns: minmax(0,1fr);
  }
}

/* Accessibility */

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

