/* JDorama.com — retro remaster. No external fonts or frameworks; system fonts echo the old
   Trebuchet/Verdana look and fall back to the platform's Japanese fonts. */

:root {
  --blue: #13619f;
  --blue-deep: #0b3f6e;
  --blue-bar-top: #1094e7;
  --blue-bar-edge: #0d4978;
  --frame: #c7d6dc;
  --steel: #eeeff4;
  --steel-dark: #dfe4ea;
  --yellow: #ffce00;
  --yellow-edge: #c99300;
  --link: #0071ae;
  --navy: #000066;
  --text: #333333;
  --muted: #666666;
  --white: #ffffff;
  --font: "Trebuchet MS", "Segoe UI", Verdana, "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  --font-body: Verdana, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.6 var(--font-body);
  color: var(--text);
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--blue-deep), var(--blue) 60%, var(--blue-deep));
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font); color: var(--navy); line-height: 1.25; margin: 0; }
img { display: block; max-width: none; }   /* never stretch low-res photos */
[lang="ja"] { font-family: "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- header ---- */
.site-header { background: var(--blue); border-bottom: 1px solid var(--blue-bar-edge); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.site-header__inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.wordmark { font: italic 700 26px/1 var(--font); color: var(--white); letter-spacing: -.5px; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark__j { display: inline-block; background: #8fc3ea; color: var(--blue-deep); padding: 0 3px; margin-right: 1px; transform: rotate(-6deg); border-radius: 3px; }
.wordmark__tld { color: var(--yellow); font-size: .7em; }
.wordmark--small { font-size: 18px; }
.site-search { display: flex; flex: 1 1 260px; max-width: 420px; }
.site-search input { flex: 1; min-width: 0; border: 1px solid var(--blue-bar-edge); border-right: 0; border-radius: 4px 0 0 4px; padding: 7px 10px; font: inherit; }
.site-search button { border: 1px solid var(--yellow-edge); background: var(--yellow); font: 700 13px var(--font); padding: 0 14px; border-radius: 0 4px 4px 0; cursor: pointer; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--white); font: 600 15px var(--font); padding: 6px 10px; border-radius: 4px; }
.site-nav a.is-active { background: var(--yellow); color: #222; }

/* ---- layout ---- */
.site-main { padding-top: 20px; padding-bottom: 32px; }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.col-main, .col-side { display: grid; gap: 20px; min-width: 0; }
@media (max-width: 900px) { .layout-2col { grid-template-columns: minmax(0, 1fr); } }

/* ---- panels ---- */
.panel { background: var(--white); border: 1px solid var(--frame); border-radius: 10px; box-shadow: 0 2px 5px rgba(0,15,40,.18); overflow: hidden; }
.panel--narrow { max-width: 560px; margin: 40px auto; }
.panel__body { padding: 16px; }
.panel__foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--steel-dark); text-align: center; }
.bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 7px 14px; font-size: 16px; color: var(--white);
  background: linear-gradient(180deg, var(--blue-bar-top), var(--blue));
  border-bottom: 1px solid var(--blue-bar-edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  text-shadow: 0 1px 2px rgba(0,0,40,.5);
}
.bar::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); flex: none; }
.bar__note { margin-left: auto; font: 700 11px var(--font-body); text-transform: uppercase; letter-spacing: .5px; opacity: .85; }

/* ---- title block ---- */
.title-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 18px; }
.title-block__text { min-width: 0; }
.title-block h1 { font-size: 30px; margin: 4px 0 2px; }
.title-block__sub { margin: 0 0 10px; color: #444; font-size: 15px; }
.title-block__still { margin: 0; text-align: center; }
.title-block__still figcaption { font-size: 11px; color: var(--muted); font-style: italic; margin-top: 4px; }
.title-block .facts { grid-column: 1 / -1; }
@media (max-width: 600px) { .title-block { grid-template-columns: minmax(0, 1fr); } .title-block__still { justify-self: start; } }
.breadcrumb { font-size: 12px; color: var(--muted); }
.season-tabs { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.season-tabs li { font: 700 11px var(--font); padding: 3px 8px; border-radius: 4px; background: var(--steel); color: var(--muted); }
.season-tabs li.is-current { background: var(--yellow); border: 1px solid var(--yellow-edge); color: #222; }

.facts { width: 100%; border-collapse: collapse; border: 1px solid var(--frame); }
.facts th, .facts td { padding: 7px 12px; border-bottom: 1px solid var(--frame); text-align: left; vertical-align: middle; }
.facts th { width: 150px; background: var(--steel); color: var(--blue); font: 700 13px var(--font); border-right: 1px solid var(--frame); }
.facts tr:nth-child(even) td { background: #f7f8fb; }
@media (max-width: 480px) { .facts th { width: 104px; } }

/* ---- photos ---- */
.photo-frame { display: inline-block; background: var(--white); padding: 3px; border: 4px solid var(--frame); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.2); line-height: 0; flex: none; }
.photo-frame img { border-radius: 3px; }
.no-image {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--steel); border: 1px dashed #a8bcc5; border-radius: 3px; color: #7a8a99;
  font: 700 8px/1.15 var(--font-body); text-transform: uppercase; letter-spacing: .3px;
  text-align: center;                        /* "No image" wraps to two lines in 50px tiles */
}
.no-image span { display: block; width: 100%; text-align: center; }
.no-image--50x75 { width: 50px; height: 75px; }
.no-image--100x150 { width: 100px; height: 150px; }
.no-image--200x136 { width: 200px; height: 136px; }

/* ---- chips, badges, buttons ---- */
.chip { display: inline-block; font: 700 11px var(--font); padding: 2px 9px; border-radius: 999px; background: #e6f0f8; border: 1px solid #b0cee2; color: var(--blue); margin: 1px 0; }
.badge { display: inline-block; font: 700 11px var(--font); padding: 2px 8px; border-radius: 4px; }
.badge--warn { background: #ffe9e6; color: #a1260f; border: 1px solid #f2b5a9; }
.label { display: block; font: 700 10px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.score-badge { display: inline-block; min-width: 34px; text-align: center; font: 700 13px var(--font); color: var(--navy); background: var(--yellow); border: 1px solid #dca400; border-radius: 3px; padding: 2px 6px; }
.score-badge--big { font-size: 26px; padding: 6px 10px; }
.score-pill { font: 700 12px var(--font); color: #5c4700; background: #fff6cc; border: 1px solid #f0d36b; border-radius: 4px; padding: 1px 7px; white-space: nowrap; }
.stars { color: #e6a800; letter-spacing: 1px; }
.button { display: inline-block; font: 700 13px var(--font); color: #222; background: linear-gradient(180deg, var(--yellow), #f5b700); border: 1px solid var(--yellow-edge); border-radius: 4px; padding: 7px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.button:hover { text-decoration: none; filter: brightness(1.04); }
.link-accent { font: 700 13px var(--font); color: #9a6b00; }
.more { font: 700 12px var(--font); }

/* ---- sections ---- */
.prose p { margin: 0 0 10px; }
/* Clickable tiles: the whole card is one link (cast, artistes, dramas). Use .tile for every listing. */
.tile {
  display: flex; gap: 10px; align-items: center; height: 100%;
  color: inherit; text-decoration: none; cursor: pointer;
  border: 1px solid var(--frame); border-radius: 8px; padding: 8px; background: var(--white);
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover, .tile:focus-visible {
  text-decoration: none;
  background: #fffde8;                       /* the old site's pale-yellow row highlight */
  border-color: var(--blue);
  box-shadow: 0 3px 8px rgba(0,15,40,.18);
  transform: translateY(-1px);
}
.tile:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.tile:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0,15,40,.18); }
.tile:hover .photo-frame, .tile:focus-visible .photo-frame { border-color: #9fc3dc; }
.tile__text { display: block; min-width: 0; }
.tile__title { display: block; font: 700 14px var(--font); color: var(--link); }
@media (prefers-reduced-motion: reduce) { .tile, .tile:hover, .tile:active { transition: none; transform: none; } }

.cast-grid { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cast-grid > li { min-width: 0; }
.cast-card { align-items: flex-start; }
.cast-card__name { color: var(--navy); }
.cast-card__ja { display: block; font-size: 12px; color: var(--muted); }
.cast-card__role { display: block; font-size: 12px; margin-top: 4px; }
.songs { list-style: none; margin: 0; }
.songs li { padding: 4px 0; }
.songs__icon { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 6px; border-radius: 50%; background: #e6f0f8; color: var(--blue); }
.video-grid { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.video { min-width: 0; }
.video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 6px; background: #000; }
.video__title { display: block; margin-top: 6px; overflow-wrap: anywhere; }

.review-summary { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 12px; margin-bottom: 14px; background: #f7f8fb; border: 1px solid var(--frame); border-radius: 8px; }
.review-summary__score { display: flex; align-items: baseline; gap: 6px; }
.dist { flex: 1 1 240px; border-collapse: collapse; }
.dist th { width: 36px; font: 700 12px var(--font); text-align: right; padding-right: 8px; color: #444; }
.dist td { padding: 2px 0; }
.dist td.num { width: 40px; font-size: 12px; color: var(--muted); }
.dist__bar { display: block; width: 100%; height: 8px; }
.dist__track { fill: #f0ece0; }
.dist__fill { fill: #c0392b; }
.review { border: 1px solid var(--frame); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.review__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.review__head h3 { font-size: 15px; }
.review p { margin: 4px 0; overflow-wrap: anywhere; }

.cover-panel { padding: 14px; text-align: center; }
.cover-panel p { margin: 6px 0 0; font-style: italic; }
.thread-list, .mini-list, .link-list { list-style: none; margin: 0; padding: 0; }
.thread-list li { position: relative; padding: 6px 0 6px 24px; border-bottom: 1px solid var(--steel-dark); }
.thread-list li:last-child { border-bottom: 0; }
.thread-list .small { display: block; }
.folder { position: absolute; left: 0; top: 10px; width: 16px; height: 12px; background: var(--yellow); border-radius: 2px; box-shadow: inset 0 -3px 0 #e0ad00; }
.folder::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 4px; background: var(--yellow); border-radius: 2px 2px 0 0; }
.mini-list { display: grid; gap: 8px; }
.mini-tile .tile__title { font-size: 13px; }
.link-list li { padding: 4px 0; overflow-wrap: anywhere; }

/* ---- page headings on the blue backdrop ---- */
.page-title { color: var(--white); font-size: 28px; margin: 4px 0 2px; text-shadow: 0 1px 2px rgba(0,0,40,.5); }
.page-sub { color: #d7e7f5; margin: 0 0 16px; }
.page-sub a, .breadcrumb.on-dark a { color: var(--yellow); }
.breadcrumb.on-dark { color: #bcd3e8; }
.panel--page { max-width: 760px; }
.prose ul { padding-left: 20px; }
.notice { background: #fff6cc; border: 1px solid #f0d36b; border-radius: 8px; padding: 10px 14px; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ja { display: block; font-size: 12px; color: var(--muted); }
.button--secondary { background: linear-gradient(180deg, #f7f9fa, #e4e9ed); border-color: #a8bcc5; color: var(--navy); }
.button--block { display: block; width: 100%; text-align: center; cursor: pointer; }

/* ---- listings ---- */
.tile-list { list-style: none; margin: 0; display: grid; gap: 8px; }
.tile-grid { list-style: none; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile-grid--3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile-grid--5 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.tile-list > li, .tile-grid > li { min-width: 0; }
.drama-row__rank { flex: none; width: 28px; text-align: center; font: 700 18px var(--font); color: var(--blue); }
.drama-row__main { flex: 1; }
.drama-row__stats { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.drama-row__view { font: 700 15px var(--font); color: var(--navy); }
.lead-tag { font: 700 10px var(--font-body); background: var(--yellow); color: #222; border-radius: 3px; padding: 0 4px; vertical-align: middle; }
.decade-tile, .year-tile { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 14px; }
.decade-tile .tile__title, .year-tile .tile__title { font-size: 18px; }
.tile--empty { cursor: default; opacity: .6; flex-direction: column; align-items: flex-start; padding: 14px; }
.year-grid { list-style: none; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.year-grid--seasons { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.board-tile { align-items: flex-start; padding: 12px; }
.board-tile .tile__text > span { display: block; }
.now-tile .tile__text > span { display: block; }
.now-tile__cast { margin-top: 2px; }
.folder--big { position: relative; top: 4px; left: 0; width: 24px; height: 18px; flex: none; }
.station-list { list-style: none; margin: 0; display: grid; gap: 4px; }
.station-list li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--steel-dark); padding: 3px 0; }
.rules { margin: 0; padding-left: 32px; }
.sub-bar { font-size: 14px; background: var(--steel); color: var(--blue); padding: 5px 10px; border-radius: 4px; margin: 14px 0 8px; }
.sub-bar:first-child { margin-top: 0; }

/* ---- hero ---- */
.hero { margin-bottom: 20px; }
.hero h1 { font-size: 26px; margin-bottom: 12px; }
.hero__search, .search-panel__row, .inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.hero__search input, .search-panel__row input, .inline-form input { flex: 1 1 240px; min-width: 0; padding: 9px 12px; font: inherit; border: 1px solid #9ab2be; border-radius: 4px; }
.quick-links { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.search-panel { margin-bottom: 20px; }

/* ---- stat tiles ---- */
.stat-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.col-main .stat-tiles { margin-bottom: 0; }
.stat { background: var(--white); border: 1px solid var(--frame); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 2px 5px rgba(0,15,40,.18); }
.stat__label { font: 700 11px var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.stat__value { font: 700 22px var(--font); color: var(--blue); }

/* ---- browse ---- */
.layout-filter { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .layout-filter { grid-template-columns: minmax(0, 1fr); } }
.filters fieldset { border: 0; border-top: 1px solid var(--steel-dark); margin: 12px 0 0; padding: 10px 0 0; }
.filters legend { font: 700 12px var(--font); color: var(--blue); text-transform: uppercase; letter-spacing: .5px; padding: 0; }
.filters label { display: block; padding: 2px 0; font-size: 13px; }
.field { display: block; margin-top: 10px; font: 700 12px var(--font); color: var(--blue); }
.field input, .field select, .inline-form select { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; font: 13px var(--font-body); border: 1px solid #9ab2be; border-radius: 4px; background: var(--white); }
.inline-form select { width: auto; margin: 0; }
.chip-toggles { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-toggle { padding: 0 !important; }
.chip-toggle input { position: absolute; opacity: 0; }
.chip-toggle span { display: inline-block; font: 700 11px var(--font); padding: 3px 9px; border-radius: 999px; background: #e6f0f8; border: 1px solid #b0cee2; color: var(--blue); cursor: pointer; }
.chip-toggle input:checked + span { background: var(--yellow); border-color: var(--yellow-edge); color: #222; }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 1px; }
.filters .button--block { margin-top: 14px; }

/* ---- tabs, pager, letters ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.tabs a, .pill-group a, .letters a { font: 700 13px var(--font); padding: 6px 12px; border-radius: 6px 6px 0 0; background: rgba(255,255,255,.18); color: var(--white); }
.tabs a.is-current { background: var(--white); color: var(--navy); box-shadow: inset 0 3px 0 var(--yellow); }
.pill-group { display: inline-flex; border: 1px solid var(--frame); border-radius: 6px; overflow: hidden; }
.pill-group a { border-radius: 0; background: var(--white); color: var(--blue); padding: 5px 12px; }
.pill-group a.is-current { background: var(--blue); color: var(--white); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.letters { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 12px; }
.letters a { background: var(--steel); color: var(--blue); border-radius: 4px; padding: 3px 8px; }
.letters a.is-current { background: var(--yellow); color: #222; }
.letters--top { margin: 0; padding-bottom: 0; }
.pager { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pager a, .pager span { min-width: 30px; text-align: center; padding: 3px 8px; border: 1px solid var(--frame); border-radius: 4px; font: 700 13px var(--font); }
.pager .is-current { background: var(--yellow); border-color: var(--yellow-edge); color: #222; }
.pager__gap { border: 0 !important; }

/* ---- forum ---- */
.thread-table { width: 100%; border-collapse: collapse; }
.thread-table th { font: 700 11px var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--white); background: linear-gradient(180deg, var(--blue-bar-top), var(--blue)); padding: 7px 10px; text-align: left; }
.thread-table td { padding: 8px 10px; border-bottom: 1px solid var(--steel-dark); vertical-align: top; }
.thread-table tbody tr:nth-child(even) { background: #f7f8fb; }
.thread-table tbody tr:hover { background: #fffde8; }
.thread-table tr.is-pinned { background: #fffbea; }
.thread-table td:first-child { width: 28px; position: relative; }
.thread-table .folder { top: 12px; left: 8px; }
.thread-table__title { font: 700 14px var(--font); }
.thread-table .small { display: block; }
.folder--locked { background: #c9d2da; box-shadow: inset 0 -3px 0 #a9b4be; }
.folder--locked::before { background: #c9d2da; }
.badge--pin { background: var(--yellow); color: #222; }
.badge--mod { background: var(--blue); color: var(--white); }
@media (max-width: 640px) { .thread-table th:nth-child(4), .thread-table td:nth-child(4), .thread-table th:nth-child(5), .thread-table td:nth-child(5) { display: none; } }
.thread-head { margin-bottom: 20px; }
.thread-head h1 { font-size: 22px; }
.thread-head__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.thread-head__drama { max-width: 320px; }
/* Each post is its own card with a gap between cards, so one post is never mistaken for the next.
   phpBB-style author column on the left; on phones it becomes a strip above the post. */
.post-list { display: grid; gap: 14px; padding: 14px; background: var(--steel); }
.post {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); scroll-margin-top: 12px;
  background: var(--white); border: 1px solid var(--frame); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,15,40,.12);
}
.post:target { border-color: var(--blue); box-shadow: 0 0 0 3px #fff3b0; }
.post__author {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 10px; background: #f4f7fa; border-right: 1px solid var(--steel-dark);
}
.post__who { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.post__name { font: 700 13px var(--font); color: var(--navy); overflow-wrap: anywhere; }
a.post__name { color: var(--link); }
.post__meta { font-size: 11px; color: var(--muted); }
.post__main { display: flex; flex-direction: column; min-width: 0; }
.post__head {
  display: flex; gap: 8px; align-items: center; padding: 7px 14px;
  background: linear-gradient(180deg, #fbfcfd, #f1f4f7); border-bottom: 1px solid var(--steel-dark);
}
.post__num { margin-left: auto; font: 700 12px var(--font); color: var(--muted); }
.post__body { padding: 12px 14px 16px; overflow-wrap: anywhere; line-height: 1.55; }
@media (max-width: 640px) {
  .post-list { padding: 10px; gap: 10px; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post__author { flex-direction: row; text-align: left; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--steel-dark); }
  .post__who { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
}

/* letter avatars (templates/partials/avatar.php) */
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  font: 700 18px var(--font); color: var(--white); text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.2);
}
.avatar--big { width: 96px; height: 96px; font-size: 44px; border: 4px solid var(--white); box-shadow: 0 0 0 1px var(--frame), 0 2px 5px rgba(0,15,40,.25); }
.avatar--0 { background: #13619f; } .avatar--1 { background: #c8501e; } .avatar--2 { background: #2e8b57; }
.avatar--3 { background: #8e44ad; } .avatar--4 { background: #d4881a; } .avatar--5 { background: #c0392b; }
.avatar--6 { background: #1f8a9e; } .avatar--7 { background: #5d6d7e; }
@media (max-width: 640px) { .post .avatar { width: 30px; height: 30px; font-size: 14px; } }
.quote { margin: 6px 0; padding: 6px 10px; background: var(--steel); border-left: 3px solid var(--yellow); border-radius: 0 4px 4px 0; }
.quote cite { display: block; font: 700 12px var(--font); font-style: normal; color: var(--navy); }
.spoiler { background: var(--steel); border: 1px solid var(--frame); border-radius: 4px; padding: 4px 10px; margin: 6px 0; }
.spoiler summary { cursor: pointer; font: 700 12px var(--font); color: #9a6b00; }

/* ---- artiste ---- */
.profile { padding: 18px; }
.profile__row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.profile__photo { margin: 0; text-align: center; }
.profile__photo figcaption { font-size: 11px; color: var(--muted); font-style: italic; margin-top: 4px; }
.profile__text { flex: 1 1 280px; min-width: 0; }
.profile__text h1 { font-size: 28px; }
.artiste-tools .inline-form { max-width: 620px; }
.vchart { width: 100%; height: auto; max-height: 220px; display: block; }
.vchart__bar { fill: var(--blue); }
.vchart__lead { fill: #e6b800; }
.vchart__val { font: 700 10px var(--font-body); fill: #333; text-anchor: middle; }
.vchart__year { font: 10px var(--font-body); fill: #666; text-anchor: middle; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: middle; }
.key--lead { background: #e6b800; margin-left: 0; }
.key--bar { background: var(--blue); }
.station-bars { width: 100%; border-collapse: collapse; }
.station-bars th { text-align: left; font: 700 12px var(--font); color: var(--blue); padding: 6px 8px 6px 0; vertical-align: top; white-space: nowrap; }
.station-bars td { padding: 6px 0; vertical-align: top; font-size: 12px; }
.station-bars td.num { padding-left: 8px; font-weight: 700; }
.dist__fill--blue { fill: var(--blue); }

/* Panel bodies keep their padding even when the same element is also a list (.link-list, .mini-list…),
   whose resets come later in this file. */
.panel > .panel__body { padding: 16px; }
.panel > .rules { padding-left: 32px; }
.panel > .letters--top { padding-bottom: 0; }

/* ---- seasons index ---- */
.season-decade + .season-decade { margin-top: 20px; }   /* same gap as panels in .col-main */
.season-years { list-style: none; margin: 0; display: grid; gap: 14px; }
.season-year { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: stretch; scroll-margin-top: 16px; }
.season-year__label { font: 700 20px var(--font); color: var(--blue); align-self: center; }
/* A season card holds two links: a blue bar to the season page, and the season's top drama as a tile. */
.season-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 6px; background: var(--white); border: 1px solid var(--frame); border-radius: 8px; }
.season-card__link {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; padding: 5px 8px; border-radius: 5px;   /* count wraps under the name on phones */
  background: #e6f0f8; border: 1px solid #b0cee2; color: var(--link);
  transition: background-color .15s, color .15s, border-color .15s;
}
.season-card__name { font: 700 13px var(--font); }
.season-card__count { margin-left: auto; font: 700 11px var(--font); white-space: nowrap; }
a.season-card__link:hover, a.season-card__link:focus-visible { text-decoration: none; background: var(--blue); border-color: var(--blue); color: var(--white); }
a.season-card__link:hover .season-icon, a.season-card__link:focus-visible .season-icon { color: var(--white); }
a.season-card__link:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.season-card--empty .season-card__link { background: var(--steel); border-color: var(--frame); color: var(--muted); }
.season-pick {
  display: flex; align-items: center; gap: 8px; flex: 1; padding: 4px;
  border: 1px solid transparent; border-radius: 6px; color: inherit;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.season-pick:hover, .season-pick:focus-visible {
  text-decoration: none; background: #fffde8; border-color: var(--blue);
  box-shadow: 0 3px 8px rgba(0,15,40,.18); transform: translateY(-1px);
}
.season-pick:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.season-pick:hover .photo-frame, .season-pick:focus-visible .photo-frame { border-color: #9fc3dc; }
.season-pick .photo-frame { padding: 2px; border-width: 2px; border-radius: 6px; }
.season-pick__title { font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.season-pick__rating { display: inline-block; margin-top: 3px; font: 700 11px var(--font); color: #5c4700; background: #fff6cc; border: 1px solid #f0d36b; border-radius: 4px; padding: 0 5px; }
.season-card--empty { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .season-pick, .season-pick:hover, .season-card__link { transition: none; transform: none; } }
.season-icon { flex: none; width: 18px; height: 18px; }
.season-icon--winter { color: #4a90c2; }
.season-icon--spring { color: #e07aa0; }
.season-icon--summer { color: #e6a800; }
.season-icon--autumn { color: #c8501e; }
/* four cards a row on wide screens, two on tablets and phones */
@media (max-width: 900px) {
  .season-year { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-year__label { grid-column: 1 / -1; }
}

/* ---- footer ---- */
.site-footer { background: #e9edf2; border-top: 1px solid var(--frame); padding: 20px 0; font-size: 12px; color: var(--muted); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer p { margin: 4px 0 0; }
.site-footer .wordmark { color: var(--blue); }
.site-footer .wordmark__j { background: transparent; color: var(--blue); padding: 0; transform: none; }

/* ---- collapsible content (public/assets/app.js) ----
   The full content is always in the HTML. Only with JavaScript (html.js) is the extra part hidden,
   and the script adds a toggle button; without it everything simply shows. */
.js [data-collapse-items="12"]:not(.is-expanded) > :nth-child(n+13),
.js [data-collapse-items="5"]:not(.is-expanded) > :nth-child(n+6),
.js [data-collapse-items="4"]:not(.is-expanded) > :nth-child(n+5) { display: none; }
.js .clamp:not(.is-expanded) {
  max-height: 9.5em; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
}
.more-toggle__wrap { margin: 6px 0 0; }
.panel > .more-toggle__wrap { margin: 0; padding: 10px 16px; border-top: 1px solid var(--steel-dark); text-align: center; }
.more-toggle { font: 700 12px var(--font); color: var(--link); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.more-toggle::after { content: " ▾"; }
.more-toggle[aria-expanded="true"]::after { content: " ▴"; }
.more-toggle:hover { text-decoration: underline; }
.more-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.panel > .more-toggle__wrap .more-toggle { font-size: 13px; }

/* ---- member profile ---- */
.member-card .profile__row { align-items: center; margin-top: 0; }
.member-card__badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.badge--legacy { background: #fff6cc; color: #5c4700; border: 1px solid #f0d36b; }
.activity { list-style: none; margin: 0; display: grid; gap: 8px; }
.activity__preview { display: block; margin-top: 3px; font-size: 13px; color: #333; overflow-wrap: anywhere; }
.review--member { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.review--member .mini-tile { height: auto; }
@media (max-width: 640px) { .review--member { grid-template-columns: minmax(0, 1fr); } }
.mini-tile .score-pill { display: inline-block; margin-top: 3px; }
.member-link { font-weight: 700; }

/* ---- member accounts (login, register, /account pages) ---- */
.form .field:first-of-type { margin-top: 0; }
.field textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; font: 13px/1.5 var(--font-body); border: 1px solid #9ab2be; border-radius: 4px; background: var(--white); resize: vertical; }
.field__hint { display: block; margin-top: 3px; font: 11px var(--font-body); color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--blue); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.flash { border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }
.flash--ok { background: #e7f6e7; border: 1px solid #9fd29f; color: #1d5a1d; }
.flash--error { background: #ffe9e6; border: 1px solid #f2b5a9; color: #8a1f0c; }
body > main > .flash { margin-bottom: 16px; }
.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.account-head__links { display: flex; gap: 8px; flex-wrap: wrap; }
.account-head__links .button, .button--small { cursor: pointer; }
.button--small { padding: 4px 10px; font-size: 12px; }
button.button { cursor: pointer; }
.pick-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.pick__tile { flex: 1 1 260px; min-width: 0; }
.pick__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pick__actions select, .field select[aria-label] { padding: 5px 6px; font: 13px var(--font-body); border: 1px solid #9ab2be; border-radius: 4px; background: var(--white); }
.search-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.search-row .field { flex: 1 1 260px; margin-top: 0; }
.flag { display: inline-block; vertical-align: -1px; border: 1px solid var(--frame); }
.member-card__about { border-top: 1px solid var(--steel-dark); }
.member-card__about p { margin: 6px 0 0; overflow-wrap: anywhere; }
.review .toolbar { margin-top: 8px; }
