:root {
  color-scheme: dark;
  --bg: #02050d;
  --bg-soft: #06101f;
  --panel: rgba(9, 17, 34, 0.78);
  --panel-strong: rgba(13, 24, 47, 0.92);
  --line: rgba(89, 133, 220, 0.28);
  --line-strong: rgba(91, 147, 255, 0.58);
  --text: #f4f7ff;
  --text-soft: #b9c5dc;
  --muted: #73809d;
  --blue: #2f7cff;
  --blue-2: #5fa1ff;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --radius: 8px;
  --max: 1180px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% 26%, rgba(47, 124, 255, 0.18), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.11), transparent 34%),
    linear-gradient(180deg, #01030a 0%, var(--bg) 46%, #030916 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, #000, rgba(0,0,0,0.72), transparent 96%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto auto -260px -160px;
  z-index: -1;
  width: 820px;
  height: 520px;
  pointer-events: none;
  border: 1px solid rgba(47, 124, 255, 0.36);
  border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 0 0 80px rgba(47,124,255,0.3);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  letter-spacing: 0;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  width: min(var(--max), calc(100% - 32px));
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(96, 142, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(3, 8, 18, 0.76);
  box-shadow: 0 18px 55px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  border: 1px solid rgba(95, 161, 255, 0.6);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(47,124,255,0.85), rgba(139,92,246,0.7));
  box-shadow: 0 0 28px rgba(47,124,255,0.44);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.top-nav a,
.text-link,
.micro-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
}

.top-nav a:hover,
.text-link:hover {
  color: #ffffff;
}

.header-actions,
.hero-actions,
.card-actions,
.sort-row,
.chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.detail-button,
.like-button,
.chip,
.sort-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.primary-button,
.detail-button {
  color: #ffffff;
  border: 1px solid rgba(105, 158, 255, 0.74);
  background: linear-gradient(135deg, var(--blue), #1c56d9);
  box-shadow: 0 12px 34px rgba(47,124,255,0.38);
}

.ghost-button,
.like-button,
.chip,
.sort-row button {
  color: var(--text-soft);
  border: 1px solid rgba(102, 136, 210, 0.26);
  background: rgba(8, 15, 30, 0.62);
}

.ghost-button:hover,
.like-button:hover,
.chip:hover,
.sort-row button:hover {
  color: #ffffff;
  border-color: rgba(95,161,255,0.58);
}

.like-button[aria-pressed="true"],
.chip[aria-pressed="true"],
.sort-row button[aria-pressed="true"] {
  color: #ffffff;
  border-color: rgba(95,161,255,0.72);
  background: rgba(47,124,255,0.22);
  box-shadow: 0 0 26px rgba(47,124,255,0.24);
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: 56px;
  min-height: 100svh;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 118px 0 72px;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2,5,13,0.95) 0 34%, rgba(2,5,13,0.58) 54%, rgba(2,5,13,0.86)),
    url("./assets/workroom-dark-hero.png") center / cover no-repeat;
  opacity: 0.72;
  filter: saturate(1.08);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: 5rem;
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy h1 span:last-child {
  color: var(--blue);
}

.hero-lead {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.9;
}

.hero-actions {
  margin-top: 34px;
}

.micro-link {
  display: inline-block;
  margin-top: 20px;
  color: #6f86b7;
}

.hero-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.22fr) minmax(0, 0.88fr);
  align-items: center;
  gap: 14px;
  min-height: 520px;
}

.hero-work-card {
  position: relative;
  display: block;
  overflow: hidden;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(91,147,255,0.34);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.74);
  box-shadow: 0 26px 80px rgba(0,0,0,0.48), 0 0 34px rgba(47,124,255,0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-work-card:hover {
  border-color: rgba(95,161,255,0.82);
  box-shadow: 0 30px 90px rgba(0,0,0,0.58), 0 0 44px rgba(47,124,255,0.42);
  transform: translateY(-6px);
}

.hero-work-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #02050d;
}

.hero-work-card--1 {
  order: 2;
  z-index: 2;
  transform: translateY(-12px);
}

.hero-work-card--2 {
  order: 1;
  opacity: 0.72;
}

.hero-work-card--3 {
  order: 3;
  opacity: 0.8;
}

.hero-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.hero-card-body small,
.work-meta,
.author small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-card-body strong {
  font-size: 1rem;
  line-height: 1.5;
}

.hero-card-body span:last-child {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.6;
}

.featured-badge,
.image-count {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(3, 8, 18, 0.72);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.featured-badge {
  top: 12px;
  left: 12px;
  background: rgba(47,124,255,0.72);
}

.image-count {
  top: 12px;
  right: 12px;
}

.category-strip,
.showcase-section,
.catalog-section,
.pickup-section,
.guide-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.section-title {
  margin-bottom: 22px;
}

.row-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1.25;
}

.section-title p:not(.eyebrow),
.pickup-section p,
.guide-section p {
  max-width: 760px;
  color: var(--text-soft);
  line-height: 1.9;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(91,147,255,0.22);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.68);
  cursor: pointer;
}

.category-card:hover {
  border-color: rgba(95,161,255,0.62);
  box-shadow: 0 0 34px rgba(47,124,255,0.16);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: var(--blue-2);
  border: 1px solid rgba(91,147,255,0.3);
  border-radius: var(--radius);
  background: rgba(47,124,255,0.12);
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card small {
  margin-top: 4px;
  color: var(--muted);
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(91,147,255,0.2);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.56);
}

.search-box,
.filter-group {
  display: grid;
  gap: 9px;
}

.search-box span,
.filter-group > span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  color: #ffffff;
  border: 1px solid rgba(102, 136, 210, 0.28);
  border-radius: var(--radius);
  background: rgba(3, 8, 18, 0.72);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(95,161,255,0.8);
  box-shadow: 0 0 0 4px rgba(47,124,255,0.18);
}

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

.work-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  border: 1px solid rgba(91,147,255,0.24);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 25, 48, 0.92), rgba(5, 10, 22, 0.94));
  box-shadow: 0 18px 60px rgba(0,0,0,0.36);
}

.work-card:hover {
  border-color: rgba(95,161,255,0.66);
  box-shadow: 0 24px 80px rgba(0,0,0,0.44), 0 0 32px rgba(47,124,255,0.18);
}

.work-image {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.work-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #02050d;
  transition: transform 220ms ease;
}

.work-card:hover .work-image img {
  transform: scale(1.035);
}

.work-body {
  display: grid;
  gap: 13px;
  padding: 18px 18px 16px;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue-2);
}

.work-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.55;
}

.work-card h3 a {
  color: #ffffff;
  text-decoration: none;
}

.work-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.75;
}

.metric-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(102, 136, 210, 0.24);
  border-radius: var(--radius);
  background: rgba(3, 8, 18, 0.48);
}

.metric-box span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.metric-box strong {
  color: var(--blue-2);
  font-size: 1.05rem;
}

.metric-box strong span {
  color: #73809d;
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-list span {
  min-height: 28px;
  padding: 5px 10px;
  color: #8fb3ff;
  border: 1px solid rgba(91,147,255,0.22);
  border-radius: 999px;
  background: rgba(47,124,255,0.08);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid rgba(91,147,255,0.18);
}

.author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: #ffffff;
  border: 1px solid rgba(95,161,255,0.54);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(47,124,255,0.7), rgba(139,92,246,0.58));
}

.author strong,
.author small {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author strong {
  color: #ffffff;
  font-size: 0.88rem;
}

.like-button {
  min-height: 36px;
  padding: 0 11px;
}

.detail-button {
  min-height: 36px;
  padding: 0 13px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--blue-2);
  border: 1px solid rgba(91,147,255,0.3);
  border-radius: var(--radius);
  background: rgba(47,124,255,0.1);
  font-weight: 900;
}

.empty-state {
  color: var(--text-soft);
  line-height: 1.8;
}

.pickup-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: 26px;
  border-top: 1px solid rgba(91,147,255,0.18);
  border-bottom: 1px solid rgba(91,147,255,0.18);
}

.pickup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pickup-grid article {
  padding: 18px;
  border: 1px solid rgba(91,147,255,0.22);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.62);
}

.pickup-grid span {
  color: var(--blue-2);
  font-weight: 900;
}

.pickup-grid h3 {
  margin: 12px 0 8px;
}

.pickup-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.guide-section {
  padding-bottom: 96px;
}

/* Detail pages */
.detail-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 92px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.74fr);
  gap: 34px;
  align-items: start;
}

.detail-image {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(91,147,255,0.34);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.7);
  box-shadow: 0 24px 80px rgba(0,0,0,0.42);
}

.detail-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #02050d;
}

.detail-summary {
  display: grid;
  gap: 18px;
}

.back-link {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 800;
}

.detail-summary h1 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1.2;
}

.detail-lead {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.9;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-section {
  margin-top: 36px;
  padding-top: 34px;
  border-top: 1px solid rgba(91,147,255,0.18);
}

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

.detail-box {
  padding: 18px;
  border: 1px solid rgba(91,147,255,0.22);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.62);
}

.detail-box h2,
.detail-box h3 {
  margin: 0 0 10px;
}

.detail-box p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.85;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(91,147,255,0.22);
  border-radius: var(--radius);
  background: rgba(8, 15, 31, 0.62);
}

.related-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #02050d;
}

.related-card span {
  display: block;
  padding: 13px;
  font-weight: 900;
  line-height: 1.55;
}

@media (max-width: 1060px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero-section,
  .pickup-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .hero-showcase {
    min-height: 430px;
  }

  .work-grid,
  .category-row,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    gap: 10px;
  }

  .top-nav {
    gap: 10px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .primary-button,
  .header-actions .ghost-button {
    flex: 1;
  }

  .hero-section {
    width: min(100% - 20px, 540px);
    min-height: auto;
    padding: 194px 0 52px;
  }

  .hero-copy h1 {
    font-size: 3.1rem;
  }

  .hero-lead {
    font-size: 0.96rem;
    line-height: 1.78;
  }

  .hero-showcase {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 12px;
  }

  .hero-work-card,
  .hero-work-card--1,
  .hero-work-card--2,
  .hero-work-card--3 {
    position: relative;
    inset: auto;
    width: 100%;
    opacity: 1;
  }

  .hero-work-card img {
    height: auto;
  }

  .category-strip,
  .showcase-section,
  .catalog-section,
  .pickup-section,
  .guide-section,
  .detail-main {
    width: min(100% - 20px, 540px);
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .row-title,
  .card-footer,
  .metric-box {
    align-items: stretch;
    flex-direction: column;
  }

  .work-grid,
  .category-row,
  .pickup-grid,
  .detail-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .card-actions,
  .detail-button,
  .like-button {
    width: 100%;
  }

  .card-actions {
    flex-direction: column;
  }

  .detail-summary h1 {
    font-size: 2rem;
  }

  .detail-main {
    padding-top: 172px;
  }
}

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