/* =========================================================
   AI BRIEF — dark, content-first video briefing UI
   和文の行間は 1.5 基準（読み物ブロックは 1.9）、palt は未使用
   ========================================================= */

:root {
  --bg: #0a0a0b;
  --bg-soft: #0f1013;
  --surf: #15161a;
  --surf-2: #1b1d22;
  --surf-3: #22252b;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);

  --tx: #f2f3f5;
  --tx-2: rgba(242, 243, 245, 0.66);
  --tx-3: rgba(242, 243, 245, 0.44);

  --acc: #ff4d2e;
  --acc-soft: rgba(255, 77, 46, 0.14);

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 14px;

  --jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  --fs: "Inter Tight", var(--jp);
  --fd: "Zen Kaku Gothic New", "Inter Tight", var(--jp);
  --fm: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --hd-h: 56px;
  --bar-h: 53px;
  --wrap: 1420px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--fs);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: normal; /* palt 未使用 */
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------------- header ---------------- */

.hd {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--hd-h);
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.hd__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hd__spacer { flex: 1; }

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

.brand__mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--acc);
  display: grid;
  place-items: center;
  flex: none;
}
.brand__mark svg { width: 16px; height: 16px; fill: #0a0a0b; }

.brand__name {
  font-family: var(--fd);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.brand__tag {
  font-family: var(--fm);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--tx-3);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 2px 4px;
  margin-top: 1px;
}

.srch {
  position: relative;
  display: flex;
  align-items: center;
  width: min(340px, 42vw);
}
.srch__ico {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--tx-3);
  stroke-width: 1.6;
  stroke-linecap: round;
  pointer-events: none;
}
.srch input {
  width: 100%;
  height: 34px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 34px 0 31px;
  font-size: 13px;
}
.srch input::placeholder { color: var(--tx-3); }
.srch input:focus {
  outline: none;
  border-color: var(--acc);
  background: var(--surf-2);
}
.srch input:focus + .srch__kbd { opacity: 0; }
.srch input::-webkit-search-cancel-button { filter: invert(1) opacity(0.45); }

.srch__kbd {
  position: absolute;
  right: 8px;
  font-family: var(--fm);
  font-size: 10px;
  color: var(--tx-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 5px;
  pointer-events: none;
  transition: opacity 0.15s;
}

.hd__meta {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--tx-3);
  white-space: nowrap;
}

/* ---------------- hero ---------------- */

.hero { padding: 52px 0 28px; max-width: 760px; }

.hero__h {
  margin: 0;
  font-family: var(--fd);
  font-weight: 900;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.hero__lead {
  margin: 16px 0 0;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--tx-2);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 26px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.hero__stats > div { display: flex; flex-direction: column; gap: 3px; }
.hero__stats dt {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--tx-3);
  text-transform: uppercase;
}
.hero__stats dd {
  margin: 0;
  font-family: var(--fd);
  font-weight: 700;
  font-size: 16px;
}
.hero__stats dd small {
  font-family: var(--fs);
  font-weight: 500;
  font-size: 12px;
  color: var(--tx-2);
  margin-left: 2px;
}

/* ---------------- filter bar ---------------- */

.bar {
  position: sticky;
  top: var(--hd-h);
  z-index: 30;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
  margin-bottom: 26px;
}

.bar__in {
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--tx-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--surf); color: var(--tx); }
.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.chip__n { font-family: var(--fm); font-size: 10.5px; color: var(--tx-3); }
.chip[aria-selected="true"] {
  background: var(--tx);
  color: var(--bg);
  border-color: var(--tx);
}
.chip[aria-selected="true"] .chip__n { color: rgba(10, 10, 11, 0.55); }

.bar__right { display: flex; align-items: center; gap: 16px; flex: none; }
.bar__count { font-family: var(--fm); font-size: 11.5px; color: var(--tx-3); white-space: nowrap; }

.sel { display: flex; align-items: center; gap: 7px; }
.sel__lb { font-size: 11.5px; color: var(--tx-3); }
.sel select {
  height: 30px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12.5px;
  cursor: pointer;
}

/* ---------------- card grid ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
  gap: 26px 22px;
  padding-bottom: 56px;
}

.card { display: block; cursor: pointer; }

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-m);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s;
}
.card:hover .card__thumb img { transform: scale(1.045); }

.card__dur {
  position: absolute;
  right: 7px;
  bottom: 7px;
  font-family: var(--fm);
  font-size: 10.5px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  padding: 2px 5px;
  letter-spacing: 0.02em;
}

.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 11, 0.28);
  opacity: 0;
  transition: opacity 0.18s;
}
.card:hover .card__play, .card:focus-visible .card__play { opacity: 1; }
.card__play span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--acc);
  display: grid;
  place-items: center;
}
.card__play svg { width: 20px; height: 20px; fill: #0a0a0b; margin-left: 2px; }

.card__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.card__cat i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.card__t {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card__t { color: #fff; }

.card__hook {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--tx-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--tx-3);
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}
.card__meta b {
  font-weight: 500;
  color: var(--tx-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52%;
  flex: 0 1 auto;
}
.card__meta em { font-style: normal; opacity: 0.5; }

.empty { padding: 60px 0 90px; color: var(--tx-2); font-size: 14px; }

/* ---------------- detail ---------------- */

.dt { padding: 20px 0 70px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 9px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--tx-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.back:hover { background: var(--surf); color: var(--tx); }
.back svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.dt__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 34px;
  align-items: start;
}

.player {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-l);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.player iframe { width: 100%; height: 100%; border: 0; display: block; }

.dt__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.dt__cat i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.dt__t {
  margin: 8px 0 0;
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.dt__bar {
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.chan { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chan__av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--fd);
  font-weight: 700;
  font-size: 14px;
  color: var(--bg);
}
.chan__n { font-size: 13.5px; font-weight: 700; }
.chan__s { font-size: 11.5px; color: var(--tx-3); font-family: var(--fm); }

.dt__stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
  font-size: 11.5px;
  color: var(--tx-3);
  font-family: var(--fm);
  flex-wrap: wrap;
}
.dt__stats b { color: var(--tx-2); font-weight: 500; }

.acts { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--tx);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--surf-2); }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn--pri {
  background: var(--acc);
  border-color: var(--acc);
  color: #0a0a0b;
}
.btn--pri:hover { background: #ff6247; border-color: #ff6247; }
.btn--pri svg { stroke: #0a0a0b; }

.sec { margin-top: 30px; }

.sec__h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tx-3);
}
.sec__h span { height: 1px; flex: 1; background: var(--line); }

.desc {
  font-size: 13px;
  line-height: 1.95;
  color: var(--tx-2);
  white-space: pre-wrap;
  position: relative;
  max-height: 11.7em;
  overflow: hidden;
}
.desc a { color: #7fb7ff; text-decoration: underline; text-underline-offset: 2px; }
.desc.is-open { max-height: none; }
.desc:not(.is-open)::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3.4em;
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0), var(--bg) 78%);
}
.more {
  margin-top: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--tx);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
}
.more:hover { color: var(--acc); border-color: var(--acc); }

.rel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 16px;
}
.rel .card__t { font-size: 13px; }
.rel .card__hook { display: none; }
.rel .card__meta b { max-width: 42%; }

/* ---------------- right rail ---------------- */

.rail {
  position: sticky;
  top: calc(var(--hd-h) + 16px);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - var(--hd-h) - 32px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.rail::-webkit-scrollbar { width: 7px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.pnl {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 17px 17px 18px;
}

.pnl__h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.pnl__h i { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); flex: none; }
.pnl__h em {
  font-style: normal;
  margin-left: auto;
  font-family: var(--fm);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--tx-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 5px;
}

.pnl--sum { background: linear-gradient(180deg, rgba(255, 77, 46, 0.07), rgba(255, 77, 46, 0) 60%), var(--surf); }
.pnl__sum { margin: 0; font-size: 13.5px; line-height: 1.92; }

.kp { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; counter-reset: k; }
.kp li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  font-size: 12.8px;
  line-height: 1.75;
  color: var(--tx-2);
  counter-increment: k;
}
.kp li::before {
  content: counter(k);
  font-family: var(--fm);
  font-size: 10px;
  color: var(--acc);
  background: var(--acc-soft);
  border-radius: 4px;
  height: 18px;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.aud { margin: 0; font-size: 13px; line-height: 1.8; color: var(--tx-2); }
.aud b { color: var(--tx); font-weight: 700; }

.chp {
  display: grid;
  gap: 1px;
  margin: -4px -6px -6px;
  max-height: 268px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.chp::-webkit-scrollbar { width: 6px; }
.chp::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.chp button {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: baseline;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--r-s);
  padding: 7px 6px;
  cursor: pointer;
  color: var(--tx-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.chp button:hover { background: var(--surf-3); color: var(--tx); }
.chp time {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--acc);
}
.chp span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.dl > div { min-width: 0; }
.dl dt { font-size: 10.5px; color: var(--tx-3); letter-spacing: 0.04em; }
.dl dd {
  margin: 3px 0 0;
  font-family: var(--fm);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note {
  display: flex;
  gap: 9px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--tx-2);
  background: rgba(255, 194, 75, 0.07);
  border: 1px solid rgba(255, 194, 75, 0.22);
  border-radius: var(--r-m);
  padding: 11px 12px;
}
.note b { color: #ffc24b; font-weight: 700; flex: none; }

/* ---------------- footer / toast ---------------- */

.ft { border-top: 1px solid var(--line); background: var(--bg-soft); }
.ft__in {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-block: 22px 26px;
}
.ft p { margin: 0; font-size: 11.5px; line-height: 1.75; color: var(--tx-3); }
.ft__l { max-width: 640px; }
.ft__r { font-family: var(--fm); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  background: var(--tx);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 60;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- view transition ---------------- */

.view { animation: rise 0.26s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 1180px) {
  .dt__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; }
}

@media (max-width: 1000px) {
  .dt__grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; overflow: visible; }
  .chp { max-height: none; }
  .hero { padding-top: 36px; }
  .rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .wrap, .hd__in { padding-inline: 16px; }
  .srch { width: auto; flex: 1; }
  .srch__kbd, .hd__meta, .brand__tag { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 16px; }
  .bar__in { gap: 12px; }
  .sel__lb, .bar__count { display: none; }
  .dt__stats { margin-left: 0; width: 100%; }
  .rel { grid-template-columns: minmax(0, 1fr); }
}
