:root {
  --bg: #ececec;
  --panel: rgba(236, 236, 236, 0.94);
  --line: rgba(0, 0, 0, 0.12);
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.72);
  --accent: #fff20d;
  --accent-strong: #fff47a;
  --shadow: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "HarmonyOS Sans", "Noto Sans JP", system-ui, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, #ededed 0%, #e1e1e1 100%);
  padding-left: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent 55%),
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0 2px, transparent 2px 18px);
  opacity: 0.55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent 55%);
}

.backdrop,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.035), transparent 40%);
  opacity: 0.08;
}

.grain {
  display: none;
}

.page {
  width: min(1440px, calc(100% - 240px));
  margin: 0 18px 48px 110px;
  padding-top: 18px;
}

.topbar {
  width: min(1440px, calc(100% - 240px));
  margin: 16px 18px 0 110px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  background: var(--text);
  color: var(--accent);
  font-family: "HarmonyOS Sans", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
}

h1, h2, h3, .code-title {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

h1, h2, h3 {
  font-family: "HarmonyOS Sans", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 800;
}

h1 {
  font-size: 1rem;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
}

.topbar-note {
  padding: 10px 14px;
  border: 1px solid rgba(255, 242, 13, 0.65);
  border-radius: 999px;
  background: rgba(236, 236, 236, 0.96);
  box-shadow: 0 8px 24px var(--shadow);
  font-size: 0.92rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 28px var(--shadow);
  backdrop-filter: blur(4px);
}

section {
  scroll-margin-top: 24px;
}

.hero {
  position: relative;
  margin-top: 12px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  overflow: hidden;
}

.video-panel {
  margin-top: 18px;
  padding: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.9);
  box-shadow: 0 10px 24px var(--shadow);
}

.video-shell-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
  min-height: 260px;
}

.video-thumb-wrap {
  min-height: 260px;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(236, 236, 236, 0.98), rgba(226, 226, 226, 0.98));
  color: var(--text);
}

.video-title {
  margin: 0;
  line-height: 1.2;
  font-weight: 800;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.video-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.96rem;
}

.hero-visual {
  position: relative;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.9);
  box-shadow: 0 10px 24px var(--shadow);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1200ms ease, transform 4200ms ease;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% 18% -10%;
  height: 120px;
  background: linear-gradient(90deg, transparent 0 8%, rgba(210, 210, 205, 0.95) 8% 92%, transparent 92% 100%);
  opacity: 0.72;
  transform: rotate(-4deg);
  z-index: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding-right: 12px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(236, 236, 236, 0.96);
  box-shadow: 0 6px 14px var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.button-primary {
  background: var(--accent);
  color: var(--text);
  font-weight: 800;
  border-color: rgba(0, 0, 0, 0.1);
}

.button-secondary {
  background: rgba(236, 236, 236, 0.98);
}

.section-head,
.code-meta,
.info-grid {
  display: flex;
}

.section-head {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 26px 26px 0;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px 0;
  position: relative;
}

.tab-header-label {
  flex: 0 0 auto;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.tab-header .filter-tabs {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.tab-header .filter-tabs::-webkit-scrollbar {
  height: 6px;
}

.tab-header .filter-tabs::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.tab-header .tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.tab-header::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 242, 13, 1), transparent);
}

.tab-indicator {
  position: absolute;
  left: 26px;
  bottom: -1px;
  height: 2px;
  width: 120px;
  background: rgba(255, 242, 13, 1);
  border-radius: 999px;
  transform: translateX(0);
  transition: transform 220ms ease, width 220ms ease;
}

.search-box {
  display: grid;
  gap: 6px;
  min-width: min(100%, 320px);
}

.search-box span {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(236, 236, 236, 0.96);
  color: var(--text);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(255, 242, 13, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 242, 13, 0.18);
}

.tab {
  border: 1px solid var(--line);
  background: rgba(236, 236, 236, 0.96);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.tab.active {
  background: rgba(255, 242, 13, 1);
  font-weight: 800;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 22px 26px 26px;
}

.code-card {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(238, 238, 238, 0.98), rgba(226, 226, 226, 0.98));
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.code-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 18px var(--shadow);
}

.code-thumb.no-photo {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(244, 244, 244, 1), rgba(228, 228, 228, 1)),
    linear-gradient(90deg, transparent 0 18%, rgba(255, 242, 13, 0.55) 18% 82%, transparent 82% 100%);
  color: #111111;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.code-thumb.no-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 62%, rgba(255, 242, 13, 0.22) 62% 68%, transparent 68% 100%);
  opacity: 0.9;
}

.code-thumb.no-photo::after {
  content: "END FIELD";
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: rgba(17, 17, 17, 0.42);
}

.code-thumb.no-photo {
  align-items: center;
  justify-items: center;
}

.code-thumb.no-photo {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.code-meta {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.code-title {
  font-size: 1rem;
  font-weight: 800;
}

.badge {
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #111111;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.76rem;
  background: rgba(255, 242, 13, 1);
}

.code-card code {
  display: block;
  margin: 8px 0 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #111111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #f5f5f5;
  word-break: break-all;
  font-family: "HarmonyOS Sans", "Noto Sans JP", monospace;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.code-card.is-collapsed .code-thumb,
.code-card.is-collapsed code,
.code-card.is-collapsed .copy-btn,
.code-card.is-collapsed .info-note {
  display: none;
}

.code-card.is-collapsed {
  padding: 16px 14px 14px;
  min-height: 156px;
  display: grid;
  place-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(236, 236, 236, 0.98), rgba(255, 242, 13, 0.12));
  border-color: rgba(255, 242, 13, 0.48);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.code-card.is-collapsed .code-meta {
  margin-bottom: 0;
  justify-content: center;
}

.code-card.is-collapsed .code-title {
  font-size: 0.98rem;
}

.code-card.is-collapsed::after {
  content: "Tap to reveal code";
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.code-card.is-collapsed .badge {
  display: inline-flex;
}

.code-card.is-collapsed .code-meta {
  gap: 8px;
}

.code-card:hover {
  border-color: rgba(140, 140, 140, 0.45);
}

.code-card.is-collapsed:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 0 0 3px rgba(255, 242, 13, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.08);
}

.code-card.is-copied {
  border-color: rgba(255, 242, 13, 1);
  box-shadow:
    0 0 0 4px rgba(255, 242, 13, 0.28),
    0 0 28px rgba(255, 242, 13, 0.26),
    0 14px 30px rgba(0, 0, 0, 0.14);
  background: linear-gradient(180deg, rgba(255, 242, 13, 0.18), rgba(245, 245, 245, 1));
  transform: translateY(-2px);
}

.code-card:not(.is-collapsed) {
  transform: translateY(-1px);
}

.code-card:not(.is-collapsed)::before {
  content: "";
  display: block;
  height: 4px;
  margin: -14px -14px 12px;
  background: linear-gradient(90deg, transparent, rgba(255, 242, 13, 1), transparent);
  border-radius: 999px;
}

.code-card:not(.is-collapsed) .code-thumb {
  animation: revealGlow 220ms ease;
}

@keyframes revealGlow {
  from {
    filter: brightness(0.92);
    transform: scale(0.98);
  }
  to {
    filter: brightness(1);
    transform: scale(1);
  }
}

.copy-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #111111;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, filter 160ms ease;
}

.button:hover,
.copy-btn:hover,
.tab:hover {
  transform: translateY(-1px);
}

.side-tabs {
  position: fixed;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  z-index: 20;
  pointer-events: none;
  padding: 6px 0;
  background: transparent;
}

.side-tabs::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 14px;
  width: 8px;
  height: 320px;
  background:
    linear-gradient(180deg, rgba(255, 242, 13, 1) 0 33%, rgba(0, 230, 164, 1) 33% 66%, rgba(255, 52, 165, 1) 66% 100%);
  border-radius: 4px;
  opacity: 0.95;
  pointer-events: none;
}

.side-tab {
  position: relative;
  pointer-events: auto;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.side-tab.active {
  background: rgba(255, 242, 13, 0.22);
  box-shadow: inset 3px 0 0 rgba(255, 242, 13, 1);
}

.side-tab-icon {
  font-size: 1.45rem;
  line-height: 1;
  opacity: 1;
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: scale(1.05);
}

.side-tab-label {
  position: absolute;
  left: 62px;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateX(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.side-tab:hover .side-tab-label,
.side-tab:focus-visible .side-tab-label {
  opacity: 1;
  transform: translateX(0);
}

.is-hidden {
  display: none !important;
}

.button:active,
.copy-btn:active,
.tab:active {
  transform: translateY(0);
}

.info-panel {
  margin-top: 18px;
  padding: 26px;
}

.info-grid {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.info-grid p,
.info-note {
  color: var(--muted);
  line-height: 1.8;
}

.kijitsu-panel {
  margin-top: 18px;
  padding-bottom: 26px;
}

.calendar-panel {
  margin-top: 18px;
  padding-bottom: 26px;
}

.calendar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.calendar-shell {
  margin: 18px 0 26px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}

.calendar-head {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 242, 13, 0.14);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.7);
}

.calendar-head-date,
.calendar-head-time {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.calendar-head-time {
  text-align: right;
}

.calendar-board {
  min-height: 420px;
  padding: 6px 12px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.calendar-gantt {
  display: grid;
  gap: 12px;
}

.calendar-section {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.32);
  overflow: hidden;
}

.calendar-section-label {
  display: grid;
  align-items: center;
  min-height: 100%;
  padding-left: 4px;
  grid-row: 1 / span 2;
}

.calendar-axis {
  grid-column: 2;
}

.calendar-section-rows {
  display: grid;
  gap: 10px;
  grid-column: 2;
}

.calendar-axis {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  padding: 4px 2px 8px;
}

.calendar-axis-spacer {
  min-height: 1px;
}

.calendar-axis-track {
  position: relative;
  min-height: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.calendar-axis-tick {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  padding-top: 8px;
  font-size: 0.68rem;
  color: rgba(17, 17, 17, 0.56);
  letter-spacing: 0.08em;
}

.calendar-axis-tick::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 6px;
  background: rgba(0, 0, 0, 0.14);
  transform: translateX(-50%);
}

.calendar-row {
  display: block;
  min-height: 72px;
}

.calendar-row-label {
  display: none;
}

.calendar-row-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 6px 2px;
  border-radius: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #30410d;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.24);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  line-height: 1.15;
  overflow: hidden;
}

.calendar-row-kind.is-scout {
  background: rgba(255, 255, 255, 0.4);
}

.calendar-row-kind.is-weapon {
  background: rgba(255, 255, 255, 0.48);
}

.calendar-row-kind.is-event {
  background: rgba(255, 255, 255, 0.36);
}

.calendar-row-title {
  font-size: 1.02rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.calendar-row-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.calendar-row-group {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(17, 17, 17, 0.58);
  text-transform: uppercase;
}

.calendar-row-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.calendar-row-lane {
  position: relative;
  min-height: 72px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.calendar-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  min-height: 40px;
  padding: 5px 14px 5px 18px;
  border-radius: 12px;
  display: grid;
  align-content: center;
  gap: 1px;
  overflow: hidden;
  color: #111111;
  left: 0;
  width: 100%;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.22);
}

.calendar-bar-type {
  display: inline-flex;
  width: fit-content;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
}

.calendar-bar-name {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-bar-date {
  display: inline-flex;
  width: fit-content;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
}

.calendar-row.is-red .calendar-bar {
  background: linear-gradient(90deg, #8f1111, #cc1f1f 55%, #f04a4a);
  color: #ffffff;
}

.calendar-row.is-orange .calendar-bar {
  background: linear-gradient(90deg, #8b2d07, #c84e10 55%, #f08b2d);
  color: #ffffff;
}

.calendar-row.is-yellow .calendar-bar {
  background: linear-gradient(90deg, #cec10e, #f0df19 55%, #fff47a);
  color: #111111;
}

.calendar-row.is-scout .calendar-bar,
.calendar-row.is-weapon .calendar-bar {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.calendar-row.is-scout.is-red .calendar-bar {
  background: linear-gradient(90deg, #5d0f24, #a41f45 58%, #f15e8d);
}

.calendar-row.is-scout.is-orange .calendar-bar {
  background: linear-gradient(90deg, #5f2408, #ab4a12 58%, #f3a14a);
}

.calendar-row.is-scout.is-yellow .calendar-bar {
  background: linear-gradient(90deg, #7f7608, #c8bb16 58%, #fff08a);
}

.calendar-row.is-weapon.is-red .calendar-bar {
  background: linear-gradient(90deg, #6f1224, #bc2b4b 58%, #ff7b97);
}

.calendar-row.is-weapon.is-orange .calendar-bar {
  background: linear-gradient(90deg, #74310c, #c65c17 58%, #ffab56);
}

.calendar-row.is-weapon.is-yellow .calendar-bar {
  background: linear-gradient(90deg, #86790a, #dcc91a 58%, #fff08a);
}

.calendar-row.is-event .calendar-bar {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.calendar-row.is-event.is-red .calendar-bar {
  background: linear-gradient(90deg, #7a1414, #d12d2d 58%, #ff6a6a);
}

.calendar-row.is-event.is-orange .calendar-bar {
  background: linear-gradient(90deg, #7d3a0b, #d16518 58%, #ff9b3f);
}

.calendar-row.is-event.is-yellow .calendar-bar {
  background: linear-gradient(90deg, #c8ba10, #f0df19 58%, #fff47a);
}

.calendar-bar.is-open-ended {
  background-size: 100% 100%;
  clip-path: inset(0 0 0 0 round 12px);
}

.calendar-row.is-red .calendar-bar.is-open-ended {
  background: linear-gradient(90deg, rgba(143, 17, 17, 0.95) 0%, rgba(204, 31, 31, 0.82) 58%, rgba(240, 74, 74, 0.22) 100%);
}

.calendar-row.is-orange .calendar-bar.is-open-ended {
  background: linear-gradient(90deg, rgba(139, 45, 7, 0.95) 0%, rgba(200, 78, 16, 0.82) 58%, rgba(240, 139, 45, 0.22) 100%);
}

.calendar-row.is-yellow .calendar-bar.is-open-ended {
  background: linear-gradient(90deg, rgba(206, 193, 14, 0.95) 0%, rgba(240, 223, 25, 0.82) 58%, rgba(255, 244, 122, 0.2) 100%);
}

.calendar-bar.is-open-ended::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, 0.18) 78%, rgba(255, 255, 255, 0.5) 100%);
  mix-blend-mode: screen;
}

.calendar-bar-end-note {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  backdrop-filter: blur(2px);
}

.calendar-empty {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  color: rgba(17, 17, 17, 0.56);
  background: rgba(245, 245, 245, 0.56);
  letter-spacing: 0.08em;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .calendar-row {
    min-height: 64px;
  }

  .calendar-axis {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
  }

  .calendar-row-lane {
    min-height: 64px;
  }

  .calendar-bar {
    width: 100%;
  }
}

.kijitsu-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 26px 0;
}

.kijitsu-field {
  display: grid;
  gap: 6px;
}

.kijitsu-field span {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kijitsu-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(236, 236, 236, 0.96);
  color: var(--text);
}

.kijitsu-field select:focus {
  border-color: rgba(255, 242, 13, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 242, 13, 0.16);
  outline: none;
}

.panel-lite {
  border: 0;
  border-radius: 16px;
  background: rgba(239, 239, 239, 0.72);
}

.name-reverse {
  margin: 14px 26px 0;
  padding: 12px 8px 8px;
}

.name-reverse-head h4 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.15;
}

.name-reverse-controls {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.name-pick-group {
  display: grid;
  gap: 6px;
}

.kijitsu-pick-title {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

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

.kijitsu-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.kijitsu-pick input {
  accent-color: #fff20d;
}

.kijitsu-match-note {
  margin: 12px 2px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.name-reverse-areas {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kijitsu-section-label {
  margin: 10px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(45, 45, 45, 0.68);
}

.kijitsu-area-chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 242, 13, 0.45);
  background: rgba(255, 242, 13, 0.14);
  padding: 6px 10px;
  font-size: 0.78rem;
}

.kijitsu-area-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 2px;
}

.kijitsu-area-panels {
  display: grid;
  gap: 12px;
}

.kijitsu-area-panel {
  display: none;
  gap: 12px;
}

.kijitsu-area-panel.is-active {
  display: grid;
}

.kijitsu-area-chip.is-active {
  background: rgba(255, 242, 13, 0.26);
  border-color: rgba(255, 242, 13, 0.78);
  transform: scale(1.08);
  padding: 9px 16px;
  min-height: 38px;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(255, 242, 13, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.kijitsu-area-tabs .kijitsu-area-chip {
  appearance: none;
  cursor: default;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  font-weight: 800;
  letter-spacing: 0.04em;
  outline: none;
}

.kijitsu-area-tabs .kijitsu-area-chip:hover {
  background: rgba(255, 242, 13, 0.22);
  border-color: rgba(255, 242, 13, 0.72);
}

.kijitsu-result-block {
  display: grid;
  gap: 10px;
}

.name-reverse-panels {
  display: grid;
  gap: 10px;
}

.name-reverse-panel {
  display: none;
}

.name-reverse-panel.is-active {
  display: grid;
}

.name-reverse-lock {
  display: grid;
  gap: 8px;
}

.name-reverse-weapon-list {
  display: grid;
  gap: 10px;
}

.name-reverse-weapons {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.name-weapon-group {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 6px 0 2px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
}

.parallel-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.parallel-card {
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.42);
}

.parallel-card.top {
  background: rgba(255, 242, 13, 0.14);
}

.parallel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.parallel-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.kijitsu-mini-card {
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.42);
}

.kijitsu-mini-card--reverse {
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.kijitsu-mini-card--reverse .weapon-card-layout {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.kijitsu-mini-card--reverse .weapon-card-body {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  align-content: start;
  padding: 0 4px 0 0;
}

.weapon-card-layout {
  display: grid;
  grid-template-columns: minmax(160px, 180px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.weapon-card-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.weapon-thumb-wrap {
  width: 100%;
  min-height: 150px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
}

.weapon-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, 0.08);
}

.kijitsu-mini-card--reverse .weapon-thumb-wrap {
  background: rgba(0, 0, 0, 0.05);
  width: 156px;
  min-width: 156px;
  height: 156px;
  min-height: 156px;
}

.kijitsu-mini-card--reverse .kijitsu-mini-title {
  font-size: 0.96rem;
  text-align: left;
}

.kijitsu-mini-card--reverse .kijitsu-mini-meta {
  font-size: 0.74rem;
  text-align: left;
}

.weapon-no-photo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

@media (max-width: 640px) {
  .kijitsu-mini-card--reverse .weapon-card-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .weapon-card-layout {
    grid-template-columns: 1fr;
  }

  .weapon-thumb-wrap {
    max-width: 220px;
    margin-inline: auto;
  }
}

.kijitsu-mini-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.kijitsu-mini-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

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

.kijitsu-card {
  border: 0;
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(238, 238, 238, 0.96), rgba(228, 228, 228, 0.96));
}

.kijitsu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kijitsu-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.kijitsu-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.kijitsu-tag {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  padding: 4px 8px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.62);
}

.kijitsu-row {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.kijitsu-reco {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 242, 13, 0.45);
  background: rgba(255, 242, 13, 0.12);
  font-size: 0.84rem;
}

.kijitsu-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.info-grid p {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(242, 242, 238, 0.96);
}

.info-note {
  margin: 18px 0 0;
}

.code-card .info-note {
  font-size: 0.92rem;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.94);
  border: 1px solid rgba(248, 245, 1, 0.7);
  color: #f5f5f5;
  opacity: 0;
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
  }

  .side-tabs {
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 42px;
    flex-direction: column;
    gap: 2px;
    justify-content: flex-start;
    padding: 2px 0;
  }

  .side-tabs::after {
    left: 14px;
    width: 6px;
    height: 180px;
  }

  .side-tab {
    min-height: 38px;
  }

  .side-tab-icon {
    font-size: 1.12rem;
  }

  .side-tab-label {
    left: 46px;
    top: -38px;
    font-size: 0.66rem;
  }

  .hero,
  .code-grid,
  .kijitsu-grid,
  .kijitsu-controls,
  .parallel-grid,
  .video-shell-split {
    grid-template-columns: 1fr;
  }

  .page,
  .topbar {
    width: calc(100% - 48px);
    margin-left: 44px;
    margin-right: 8px;
  }

  .video-thumb-wrap {
    min-height: 220px;
  }

  .video-panel {
    padding: 14px;
  }

  .hero-visual {
    min-height: 240px;
  }

  .section-head,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    width: 100%;
  }
}

@media (min-width: 901px) and (max-width: 1199px) {
  .code-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page,
  .topbar {
    width: calc(100% - 40px);
    margin-left: 34px;
    margin-right: 6px;
  }

  .side-tabs {
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 34px;
    padding: 2px 0;
  }

  .side-tabs::after {
    left: 12px;
    width: 4px;
    height: 120px;
  }

  .side-tab {
    min-height: 34px;
  }

  .side-tab-icon {
    font-size: 0.98rem;
  }

  .side-tab-label {
    left: 38px;
    top: -34px;
    font-size: 0.62rem;
  }

  .hero,
  .section-head,
  .code-grid,
  .info-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .hero,
  .video-shell-split {
    gap: 14px;
  }

  .hero-visual {
    min-height: 200px;
  }

  .video-thumb-wrap {
    min-height: 180px;
  }

  .code-grid,
  .kijitsu-grid,
  .parallel-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-head {
    padding-top: 18px;
  }

  .tab-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .code-grid {
    padding: 16px 12px 18px;
  }

  .calendar-shell,
  .name-reverse,
  .calendar-panel {
    margin-left: 12px;
    margin-right: 12px;
  }

  .calendar-board {
    min-height: 320px;
    padding: 12px;
  }

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

  .calendar-row {
    min-height: 64px;
  }

  .calendar-axis {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
  }

  .calendar-row-lane {
    min-height: 54px;
  }

  .calendar-bar {
    min-height: 34px;
    padding: 5px 14px 5px 14px;
  }

  .calendar-bar-name {
    font-size: 0.86rem;
  }

  .calendar-bar-end-note {
    font-size: 0.58rem;
  }

  .calendar-head {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .calendar-head-time {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .slide,
  .button,
  .copy-btn,
  .tab {
    transition: none;
  }

  .slide {
    opacity: 1;
  }

  .slide:not(.is-active) {
    opacity: 0;
  }
}
