@import 'tailwindcss';

:root {
  --ink: #202534;
  --muted: #8e96a5;
  --line: #eceef2;
  --paper: #f8f9fb;
  --accent: #f4bf18;
  --accent-deep: #e9a900;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 70px;
  border-bottom: 1px solid rgba(227, 230, 236, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand-word {
  color: #232633;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.07em;
}

.brand-word span {
  color: #e4a70c;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50% 50% 45% 45%;
  background: var(--accent);
  box-shadow: inset 0 -2px 0 rgba(182, 117, 0, 0.18);
  transform: rotate(-12deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: '';
  width: 7px;
  height: 7px;
  border: 2px solid #262b35;
  border-radius: 50%;
  top: 8px;
}

.brand-mark::before { left: 5px; }
.brand-mark::after { right: 5px; }

.brand-mark span {
  width: 21px;
  height: 4px;
  border-top: 2px solid #262b35;
  border-bottom: 2px solid #262b35;
}

.main-nav {
  display: flex;
  align-items: stretch;
  gap: 22px;
}

.nav-item {
  position: relative;
  min-width: 52px;
  padding: 8px 2px 7px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  color: #9ba1ae;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-item:hover,
.nav-item.is-active {
  color: #303542;
}

.nav-item:hover {
  transform: translateY(-1px);
}

.nav-item.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: var(--accent);
  content: '';
}

.nav-icon {
  height: 22px;
  color: currentColor;
  font-size: 23px;
  font-weight: 400;
  line-height: 20px;
}

.page-content {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 27px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #b6bdc9;
  font-size: 10px;
  font-weight: 650;
}

.breadcrumb i {
  color: #d2d6dc;
  font-style: normal;
}

.breadcrumb strong {
  color: #8f97a4;
  font-weight: 700;
}

.intro-copy h1 {
  margin: 0;
  color: #252a38;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.2;
}

.intro-copy p {
  max-width: 700px;
  margin: 10px 0 0;
  color: #9aa2b0;
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.005em;
  line-height: 1.7;
}

.updated-at {
  display: block;
  margin-top: 6px;
  color: #bdc3cc;
  font-size: 9px;
  font-weight: 600;
}

.period-tabs {
  display: flex;
  align-self: center;
  gap: 27px;
  padding-top: 36px;
}

.period-tabs button {
  position: relative;
  padding: 10px 0 12px;
  color: #c3c8d0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: color 180ms ease;
}

.period-tabs button:hover,
.period-tabs button.is-active {
  color: #343945;
}

.period-tabs button.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
  content: '';
}

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

.video-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 0.59;
  border-radius: 13px;
  background: #dfe4e8;
  box-shadow: 0 8px 22px rgba(42, 47, 59, 0.08);
  cursor: pointer;
  transform: translateZ(0);
}

.video-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.clip-video,
.motion-scene,
.video-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-video {
  z-index: -3;
  filter: saturate(1.2) contrast(0.94) brightness(1.06);
  transform: scale(1.08);
  transition: transform 700ms cubic-bezier(.2,.75,.25,1), filter 250ms ease;
}

.video-card:hover .clip-video {
  transform: scale(1.15);
  filter: saturate(1.34) contrast(0.96) brightness(1.08);
}

.motion-scene {
  z-index: -4;
  overflow: hidden;
  background: linear-gradient(148deg, color-mix(in srgb, var(--tone) 70%, white), var(--tone) 54%, color-mix(in srgb, var(--tone) 58%, #253148));
  animation: sceneHue 12s ease-in-out infinite alternate;
}

.motion-scene::before,
.motion-scene::after,
.motion-scene span {
  position: absolute;
  display: block;
  border-radius: 50%;
  content: '';
}

.motion-scene::before {
  top: 8%;
  left: -25%;
  width: 130%;
  height: 40%;
  background: rgba(255,255,255,.24);
  filter: blur(12px);
  transform: rotate(-12deg);
  animation: sceneDrift 10s ease-in-out infinite alternate;
}

.motion-scene::after {
  right: -24%;
  bottom: -7%;
  width: 83%;
  height: 36%;
  background: rgba(22, 32, 46, .27);
  filter: blur(14px);
  animation: sceneDriftReverse 13s ease-in-out infinite alternate;
}

.motion-scene span {
  top: 30%;
  right: 18%;
  width: 46%;
  height: 21%;
  background: rgba(255,255,255,.16);
  filter: blur(8px);
  animation: sceneFloat 8s ease-in-out infinite alternate;
}

@keyframes sceneHue {
  0% { filter: saturate(1) brightness(1); }
  100% { filter: saturate(1.24) brightness(1.06); }
}

@keyframes sceneDrift {
  0% { transform: translate3d(-5%, -4%, 0) rotate(-12deg); }
  100% { transform: translate3d(9%, 6%, 0) rotate(-5deg); }
}

@keyframes sceneDriftReverse {
  0% { transform: translate3d(6%, 0, 0) scale(.92); }
  100% { transform: translate3d(-10%, -7%, 0) scale(1.12); }
}

@keyframes sceneFloat {
  0% { transform: translate3d(-16%, 2%, 0) scale(.82); opacity: .5; }
  100% { transform: translate3d(12%, -6%, 0) scale(1.2); opacity: .9; }
}

.video-wash {
  z-index: -2;
  background: linear-gradient(165deg, rgba(255,255,255,.08), transparent 46%, rgba(16,19,28,.17) 100%);
  mix-blend-mode: soft-light;
}

.video-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(27,32,47,.12) 0%, transparent 22%, transparent 61%, rgba(12,17,24,.76) 100%);
  content: '';
}

.video-card::after {
  position: absolute;
  z-index: -4;
  inset: 0;
  background: var(--tone, #acc6d4);
  content: '';
}

.tone-coral { --tone: #dc927f; }
.tone-violet { --tone: #aaa1c8; }
.tone-sky { --tone: #9dbbd0; }
.tone-moss { --tone: #aabb9b; }
.tone-peach { --tone: #e5ae99; }
.tone-amber { --tone: #d5b271; }
.tone-rose { --tone: #d39bab; }
.tone-indigo { --tone: #9ca8d2; }
.tone-fern { --tone: #8fae87; }
.tone-plum { --tone: #b79ab9; }
.tone-ocean { --tone: #86afc3; }
.tone-lime { --tone: #b5c58b; }

.rank-chip {
  position: absolute;
  top: 11px;
  left: 11px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 8px 5px 7px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #f1f3f6;
  background: rgba(25, 30, 42, 0.87);
  box-shadow: 0 4px 10px rgba(22, 25, 32, .12);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
}

.rank-chip span {
  color: var(--accent);
}

.preview-label {
  position: absolute;
  top: 15px;
  right: 12px;
  color: rgba(255,255,255,.74);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.clip-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  padding: 34px 12px 13px;
  color: #fff;
}

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

.creator-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1.5px solid rgba(255,255,255,.82);
  border-radius: 50%;
  color: rgba(255,255,255,.94);
  background: rgba(255,255,255,.16);
  box-shadow: 0 1px 8px rgba(0,0,0,.14);
  font-size: 11px;
  font-weight: 800;
}

.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.creator-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.creator-copy strong,
.creator-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-copy strong {
  max-width: 115px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
}

.creator-copy small {
  max-width: 125px;
  color: rgba(255,255,255,.78);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-action {
  display: grid;
  width: 22px;
  height: 26px;
  place-items: center;
  color: rgba(255,255,255,.88);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.card-action:hover,
.card-action.is-active {
  color: var(--accent);
  transform: translateY(-2px);
}

.action-glyph {
  position: relative;
  display: block;
  width: 17px;
  height: 18px;
}

.action-download::before {
  position: absolute;
  top: 0;
  left: 7px;
  width: 2px;
  height: 11px;
  border-radius: 99px;
  background: currentColor;
  content: '';
}

.action-download::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  left: 1px;
  height: 7px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  content: '';
}

.action-download {
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 2px 2px;
}

.action-heart::before {
  position: absolute;
  inset: 1px 0 0;
  content: '♡';
  font-size: 24px;
  line-height: 16px;
}

.is-active .action-heart::before {
  content: '♥';
}

.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 170px;
  margin: 30px auto 0;
  padding: 12px 22px;
  border: 1px solid #e1e5ea;
  border-radius: 999px;
  color: #79818f;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(49, 55, 68, .05);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.load-more:hover {
  border-color: var(--accent);
  color: #39404d;
  transform: translateY(-2px);
}

.load-more span {
  color: var(--accent-deep);
  font-size: 18px;
  line-height: 10px;
}

.explore-section {
  margin: 88px 0 14px;
  padding: 38px 0 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
}

.explore-section h2 {
  margin: 0;
  color: #313745;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.045em;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
  margin: 24px auto 0;
}

.explore-card {
  display: grid;
  grid-template-columns: 43px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #656e7c;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(42, 47, 59, .035);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.explore-card:hover {
  border-color: #f1d071;
  box-shadow: 0 12px 24px rgba(42, 47, 59, .07);
  transform: translateY(-3px);
}

.explore-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #d99e0b;
  background: #fff7dc;
  font-size: 23px;
}

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

.explore-card strong {
  color: #444b58;
  font-size: 13px;
  font-weight: 800;
}

.explore-card small {
  margin-top: 3px;
  color: #a2a8b3;
  font-size: 10px;
  font-weight: 600;
}

.arrow {
  color: #c6cbd3;
  font-size: 18px;
  transition: color 180ms ease, transform 180ms ease;
}

.explore-card:hover .arrow {
  color: var(--accent-deep);
  transform: translateX(3px);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand .brand-mark {
  width: 23px;
  height: 23px;
  transform: scale(.82) rotate(-12deg);
}

.footer-brand .brand-word {
  font-size: 16px;
}

.footer-inner p,
.footer-links a {
  color: #b0b6c0;
  font-size: 9px;
  font-weight: 650;
}

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

.footer-links a:hover {
  color: #606876;
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 15;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #4b3d08;
  background: var(--accent);
  box-shadow: 0 9px 22px rgba(198, 153, 0, .23);
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.to-top:hover {
  background: #ffd239;
  transform: translateY(-3px);
}

@media (max-width: 1050px) {
  .main-nav { gap: 12px; }
  .nav-item { min-width: 46px; }
  .ranking-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header { height: 62px; }
  .header-inner,
  .page-content,
  .footer-inner { width: min(100% - 32px, 620px); }
  .header-inner { gap: 12px; }
  .brand-word { font-size: 17px; }
  .brand-mark { width: 25px; height: 25px; }
  .main-nav { flex: 1; justify-content: end; gap: 2px; }
  .nav-item { min-width: 39px; padding-right: 1px; padding-left: 1px; font-size: 7px; letter-spacing: 0; }
  .nav-item:nth-child(n+5) { display: none; }
  .nav-icon { font-size: 18px; }
  .page-content { padding-top: 24px; }
  .page-intro { display: block; }
  .period-tabs { justify-content: start; gap: 25px; padding-top: 18px; }
  .ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .explore-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; justify-content: center; padding: 20px 0; }
  .footer-inner p { order: 3; width: 100%; text-align: center; }
  .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  .intro-copy h1 { font-size: 22px; }
  .intro-copy p { font-size: 11px; }
  .video-card { border-radius: 10px; }
  .clip-meta { padding-right: 9px; padding-left: 9px; }
  .creator-copy strong { max-width: 78px; }
  .creator-copy small { max-width: 82px; font-size: 7px; }
  .card-actions { gap: 7px; }
  .preview-label { right: 9px; font-size: 8px; }
}
