:root {
  color-scheme: light;
  --bg: #eef2f4;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --ink: #122126;
  --muted: #5d6f79;
  --line: #d5dee4;
  --line-strong: #aebcc5;
  --brand: #0f766e;
  --brand-ink: #0a3f3a;
  --brand-soft: #dff5f0;
  --blue: #2456d6;
  --blue-soft: #e1ebff;
  --amber: #b45309;
  --amber-soft: #fff0d7;
  --rose: #be123c;
  --rose-soft: #ffe4eb;
  --shadow: 0 16px 38px rgba(18, 33, 38, 0.1);
  --shadow-soft: 0 8px 22px rgba(18, 33, 38, 0.07);
  font-family: "Yu Gothic", "Meiryo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0) 240px),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

button,
a.button-link,
.button-muted {
  min-height: 40px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 0.58rem 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

button:hover,
a.button-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #7dd3fc;
  outline-offset: 2px;
}

.button-muted {
  background: #eef2f4;
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.button-muted:hover {
  transform: none;
  box-shadow: none;
}

.topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.15rem clamp(1rem, 3vw, 2.5rem) 1.25rem;
  background: #102126;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #14b8a6 0%, #2563eb 55%, #f59e0b 100%);
}

.topbar h1 {
  margin: 0.05rem 0 0.28rem;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: #d5e2e7;
  font-size: 0.96rem;
}

.eyebrow {
  margin: 0;
  color: #9fc8c4;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar__meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 0.18rem 0.58rem;
  color: #f6fbfc;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge--live {
  background: rgba(20, 184, 166, 0.18);
  border-color: rgba(94, 234, 212, 0.55);
  color: #dffdf9;
}

main {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 1.1rem clamp(0.85rem, 2.4vw, 1.75rem) 2.2rem;
}

.workbench,
.catalog {
  display: block;
}

.toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  padding: 0.4rem;
}

.category-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.02rem;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: #43535c;
  box-shadow: none;
  white-space: nowrap;
}

.category-tabs button:hover {
  background: #f1f5f7;
  box-shadow: none;
}

.category-tabs button[aria-selected="true"] {
  background: #ffffff;
  color: var(--brand-ink);
  border-color: var(--line);
  box-shadow: 0 4px 12px rgba(18, 33, 38, 0.08);
}

.category-tabs__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  border-radius: 6px;
  padding: 0 0.35rem;
  background: #dfe7ec;
  color: #314047;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.category-tabs button[aria-selected="true"] .category-tabs__count {
  background: var(--brand);
  color: #ffffff;
}

.app-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 360px));
  justify-content: start;
  gap: 0.95rem;
}

.app-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow: hidden;
  border: 1px solid #cdd8df;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff 62%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--brand);
}

.app-card:hover {
  border-color: #9bb0ba;
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(18, 33, 38, 0.14);
}

.app-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}

.app-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #0d5f58;
  color: #ffffff;
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.12);
  font-weight: 800;
  line-height: 1;
}

.app-card h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.38;
  letter-spacing: 0;
}

.app-card p {
  margin: 0;
}

.app-card__tagline {
  color: var(--muted);
  font-size: 0.92rem;
}

.app-card__meta {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.12rem 0.5rem;
  background: #eef3f5;
  color: #34474f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.pill--ready {
  border-color: #b9ead8;
  background: var(--brand-soft);
  color: #0b5d3c;
}

.pill--mock {
  border-color: #c4d6ff;
  background: var(--blue-soft);
  color: #183e91;
}

.pill--planning {
  border-color: #f5d59a;
  background: var(--amber-soft);
  color: #7c3f06;
}

.app-card__actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.25rem;
}

.app-card__actions .button-link,
.app-card__actions .button-muted {
  width: 100%;
}

.app-card__actions .button-link {
  background: var(--ink);
  border-color: var(--ink);
}

.app-grid__empty {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0) 180px),
      var(--bg);
  }

  .topbar {
    display: block;
    padding: 1rem 1rem 1.15rem;
  }

  .topbar h1 {
    font-size: 1.55rem;
  }

  .lead {
    font-size: 0.9rem;
  }

  .topbar__meta {
    justify-content: flex-start;
    margin-top: 0.75rem;
  }

  main {
    padding: 0.85rem 0.75rem 1.6rem;
  }

  .toolbar {
    padding: 0.32rem;
  }

  .category-tabs button {
    min-height: 36px;
    padding: 0.48rem 0.62rem;
    font-size: 0.86rem;
  }

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

  .app-card {
    min-height: 0;
  }
}
