:root {
  color-scheme: light;
  --page-bg: #f4efe6;
  --panel-bg: rgba(255, 255, 255, 0.8);
  --panel-border: rgba(16, 42, 67, 0.1);
  --text-main: #102a43;
  --text-soft: #52606d;
  --accent: #d97706;
  --accent-strong: #b45309;
  --shadow: 0 18px 45px rgba(16, 42, 67, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.18), transparent 22%),
    radial-gradient(circle at left bottom, rgba(31, 111, 139, 0.18), transparent 25%),
    var(--page-bg);
}

.page {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  margin-bottom: 32px;
  padding: 32px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}

.subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.toggle {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
}

.count {
  color: var(--text-soft);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  min-width: 0;
}

.card-button {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.card-button:hover,
.card-button:focus-visible {
  border-color: rgba(217, 119, 6, 0.4);
  box-shadow: 0 22px 50px rgba(16, 42, 67, 0.16);
  outline: none;
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #243b53, #1f6f8b);
  transform: scale(1);
  transform-origin: center;
  transition: transform 220ms ease;
}

.card-button:hover .card-image,
.card-button:focus-visible .card-image {
  transform: scale(1.06);
}

.card-body {
  padding: 12px 14px 14px;
}

.card-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 42, 67, 0.08);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.card-status {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 183, 107, 0.12);
  color: #0f9f66;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.card-tech {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.orientation-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.card-orientation-icon {
  color: var(--text-soft);
}

.card-orientation-icon::before {
  content: "";
  display: inline-flex;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.card-orientation-icon.is-portrait::before {
  width: 9px;
  height: 13px;
}

.card-orientation-icon.is-landscape::before {
  width: 13px;
  height: 9px;
}

.orientation-icon.is-portrait {
  width: 9px;
  height: 13px;
}

.orientation-icon.is-landscape {
  width: 13px;
  height: 9px;
}

.empty {
  padding: 32px;
  border: 1px dashed rgba(16, 42, 67, 0.22);
  border-radius: 24px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1200px);
    padding-top: 20px;
  }

  .hero {
    padding: 24px 18px;
    border-radius: 22px;
  }

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