/* DoReColle v1.10. One theme rule set, no historical light/dark override stack.
   Layout: category sidebar + 3x3 albums / album sidebar + 3x3 DoReca.
   Design-space dimensions are deliberately preserved; scale the WHOLE tile. */
:root {
  color-scheme:only light;
  --page:#A0A0A0; --panel:#FAFAFA; --ink:#202020; --sub:#646464;
  --line:#dedede; --control:#fff; --active:#e6eff8; --active-ink:#125995;
  --focus:#247cbb; --content:1280px; --sidebar:224px; --gutter:24px;
}
:root[data-theme="dark"] {
  color-scheme:only dark;
  --page:#1A1A1A; --panel:#242424; --ink:#f2f2f2; --sub:#bcbcbc;
  --line:#414141; --control:#303030; --active:#243d51; --active-ink:#b8dfff;
  --focus:#8cc8ff;
}
* {box-sizing:border-box}
html {background:var(--page);color:var(--ink)}
body {margin:0;background:var(--page);color:var(--ink);font-family:Arial,'Hiragino Kaku Gothic ProN','Yu Gothic',Meiryo,sans-serif}
[hidden] {display:none!important}
button,select {font:inherit}
button {cursor:pointer}
button:disabled {cursor:default}
button:focus-visible,a:focus-visible,summary:focus-visible {outline:3px solid var(--focus);outline-offset:4px}
h1,h2,p {overflow-wrap:anywhere}
h1:focus,h2:focus {outline:none}
.site-header {border-bottom:1px solid var(--line);background:var(--page)}
.header-inner {max-width:var(--content);min-height:86px;margin:auto;padding:16px 24px;display:flex;align-items:center;gap:24px}
.wordmark {border:0;padding:0;background:transparent;font-size:35px;font-weight:850;letter-spacing:-1.4px;white-space:nowrap;color:var(--ink)}
.dore {color:#167ac0}.red {color:#e83d30}.colle {color:var(--ink)}
.header-tagline {font-size:14px;color:var(--sub)}
.theme-toggle {margin-left:auto;background:var(--control);color:var(--ink);border:1px solid var(--line);border-radius:24px;padding:11px 14px;font-size:12px;font-weight:700;white-space:nowrap;min-width:155px}
.demo-tag {font-size:10px;white-space:nowrap;color:var(--sub);border:1px solid var(--line);border-radius:16px;padding:7px 10px}
.content {max-width:var(--content);padding:26px 24px 32px;margin:auto}

/* v1.13: one-screen view. No ranking explanation block. */
.content {max-width:1480px;padding:18px 24px 30px;margin:auto}
.ranking-toolbar {display:flex;align-items:center;gap:16px;position:sticky;top:0;z-index:15;
  padding:10px 0 12px;background:var(--page);border-bottom:1px solid var(--line);margin-bottom:16px}
.rank-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;flex:1;max-width:850px}
.rank-tab {width:100%;min-height:44px;border:1px solid var(--line);border-radius:10px;
  color:var(--ink);background:var(--control);font-size:15px;font-weight:700;padding:8px 6px}
.rank-tab[aria-pressed="true"] {background:var(--active);color:var(--active-ink);border-color:var(--active-ink)}
.rank-tab:hover {border-color:var(--active-ink)}
.selection-label {color:var(--sub);font-size:12px;min-width:0;text-align:right}
.single-layout {display:grid;grid-template-columns:minmax(270px,320px) minmax(0,1fr);gap:20px;align-items:start}
.left-rail {display:flex;flex-direction:column;gap:14px;position:sticky;top:87px;min-width:0}
.panel {background:var(--panel);border:1px solid var(--line);border-radius:12px}
.album-qr-strip {display:flex;justify-content:center;gap:12px;padding:12px;align-items:center}
.single-album {min-width:0;max-width:172px;width:100%;margin:0 auto}
.single-album .album-tile {pointer-events:auto}
.compact-qr {width:100%;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
  border:1px solid var(--line);border-radius:9px;background:var(--control);color:var(--ink);text-align:center;padding:8px 3px}
.qr-unconnected-icon {font-size:47px;line-height:1;color:var(--sub)}
.compact-qr span {font-size:11px;color:var(--sub)}
.compact-qr small {font-size:10px;font-weight:600;line-height:1.4}
.category-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:12px;max-height:calc(100vh - 340px);
  overflow-y:auto;overscroll-behavior:contain}
.category-option {min-width:0;width:100%;min-height:39px;border:1px solid var(--line);border-radius:8px;text-align:center;
  padding:7px 3px;color:var(--ink);background:var(--control);font-size:12px;font-weight:600;line-height:1.25;
  display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere}
.category-option:hover {border-color:var(--active-ink)}
.category-option[aria-pressed="true"] {background:var(--active);color:var(--active-ink);font-weight:750;border-color:var(--active-ink)}
.cards-main {min-width:0}
.cards-heading {display:flex;align-items:center;justify-content:space-between;gap:9px;margin:0 0 9px;min-height:34px}
.cards-heading h1 {font-size:21px;line-height:1.2;margin:0}
.cards-heading span {font-size:11px;color:var(--sub)}
.switch-status {font-size:12px;color:var(--sub);margin:0 0 12px;min-height:17px}
.card-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 3px;min-width:0}
.album-tile {position:relative;width:100%;aspect-ratio:162 / 206.31;border:0;background:transparent;padding:0;text-align:initial;display:block}
.album-base {position:absolute;top:0;left:0;width:162px;height:206.31px;transform-origin:top left;border:4px solid var(--album-border,#b0b0b0);border-radius:16px;background:radial-gradient(circle 178.2px at 50% 50%,var(--album-bg,#ccc),var(--album-grad-edge,#e0e0e0));color:var(--album-title-ink,#212121);overflow:hidden;box-shadow:0 2px 5px rgba(0,0,0,.06)}
html[data-theme="dark"] .album-base {background:var(--album-bg)}
.album-title {position:absolute;left:8px;top:6px;width:138px;height:39px;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.2;font-size:15px;font-weight:700;overflow:hidden}
.album-thumbs {position:absolute;left:8px;top:48px;width:138px;display:grid;grid-template-columns:repeat(3,1fr);column-gap:5px;row-gap:4px}
.album-thumb-cell {position:relative;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;border:1.2px solid var(--album-thumb-border);background:var(--panel)}
.album-thumb-cell img {display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.4);transform-origin:center}
.album-thumb-cell .no-thumb {height:100%;font-size:7px;display:flex;align-items:center;justify-content:center;color:var(--sub)}
.album-unavailable .album-base {box-shadow:none}
.album-unavailable .album-title {color:var(--sub)}
.album-unavailable .album-thumb-cell {background:var(--page);border-color:transparent}
.album-tile:not(:disabled):hover .album-base {box-shadow:0 4px 12px rgba(0,0,0,.16)}
.card-shell {position:relative;aspect-ratio:63 / 88;width:100%;border:0;padding:0;background:transparent;text-align:left;display:block;color:inherit;text-decoration:none}
.card-playable {cursor:default}
.card-shell.card-demo {cursor:default}
.card-base {position:absolute;left:0;top:0;width:357.9545px;height:500px;padding:10px;background:var(--card-frame);border-radius:16px;transform-origin:top left;box-shadow:2px 4px 6px rgba(0,0,0,.16);overflow:hidden}
.card-inner {height:100%;width:100%;padding:11px;border-radius:10px;background:var(--card-bg);display:flex;flex-direction:column;gap:10px}
.card-title {height:55px;flex:none;border-radius:10px;background:var(--card-box);color:var(--card-box-ink);font-weight:600;font-size:16px;line-height:1.15;display:flex;justify-content:flex-start;align-items:center;text-align:left;padding:4px 10px;overflow:hidden}
.card-title-text {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;word-break:break-word;overflow-wrap:anywhere;width:100%;max-height:calc(2 * 16px * 1.15)}
.card-title.title-one-line .card-title-text {text-align:center}
.card-content {min-height:0;flex:1;display:flex;flex-direction:column;gap:10px}
.card-thumb-wrap {width:100%;aspect-ratio:16 / 9;overflow:hidden;border-radius:10px;flex:none;background:var(--panel)}
.card-thumb-wrap img {width:100%;height:100%;object-fit:cover;display:block}
.card-thumb-wrap .no-thumb {height:100%;display:flex;align-items:center;justify-content:center;color:var(--sub);font-size:15px}
.card-fields {display:flex;min-height:0;flex:1;flex-direction:column;gap:8px}
.card-field {flex:1;min-height:0;border-radius:10px;background:var(--card-box);color:var(--card-box-ink);padding:7px 9px;font-size:16px;line-height:1.3;font-weight:400;white-space:pre-line;overflow:hidden}
.card-footer {height:45px;flex:none;display:flex;align-items:center;justify-content:center;gap:9px;color:var(--card-box-ink)}
.card-footer .qr-trigger {color:var(--card-box-ink);border:1px solid color-mix(in srgb,var(--card-box-ink) 30%,transparent);border-radius:6px;background:transparent;width:48px;height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.card-footer .qr-trigger:disabled {opacity:.3;cursor:default}
.youtube-link {min-height:38px;min-width:130px;display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--card-box-ink);font-size:18px;text-decoration:none;font-weight:700}
.youtube-link:hover {background:color-mix(in srgb,var(--card-box-ink) 10%,transparent)}
.youtube-link.disabled {opacity:.5}
.card-rank {position:absolute;top:4px;left:4px;padding:2px 6px;background:#292929;color:#fff;border-radius:6px;font-weight:700;font-size:12px;z-index:2;pointer-events:none}
.album-footer {position:absolute;bottom:3px;left:8px;right:8px;height:18px;display:flex;justify-content:center;align-items:center}
.album-footer button {width:38px;height:19px;color:var(--album-title-ink);border:0;background:color-mix(in srgb,var(--album-bg) 85%,white);border-radius:5px;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}
.album-footer button svg {width:15px;height:15px}
/* There are no QR scanning instructions in the layout; only the QR itself is magnified. */
.qr-dialog {color-scheme:only light;border:1px solid #c2c2c2;background:#fff;color:#161616;border-radius:14px;padding:16px;max-width:calc(100vw - 32px);box-shadow:0 15px 45px rgba(0,0,0,.35)}
.qr-dialog::backdrop {background:rgba(0,0,0,.65)}
.qr-dialog-heading {display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:10px;font-size:16px}
.qr-dialog-close {border:0;border-radius:7px;background:#efefef;color:#111;font-size:24px;line-height:1;width:34px;height:34px}
.qr-image-wrap {padding:4px;background:#fff;display:flex;justify-content:center;align-items:center}
.qr-image-wrap img {display:block;width:min(288px,calc(100vw - 82px));height:auto;aspect-ratio:1;image-rendering:pixelated}
@media (max-width:1160px){
 .single-layout{grid-template-columns:252px minmax(0,1fr);gap:14px}
 .album-qr-strip{gap:7px;padding:8px}.category-grid{gap:5px;padding:8px}.card-grid{gap:12px}
 .rank-tab{font-size:13px}.header-inner{gap:14px}.header-tagline{display:none}
}
@media (max-width:800px){
 .content{padding:12px}.single-layout{grid-template-columns:225px minmax(0,1fr);gap:12px}
 .category-option{font-size:11px}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .header-inner{padding:10px 12px;min-height:65px}.wordmark{font-size:28px}
 .rank-tabs{gap:5px}.rank-tab{font-size:11px;padding:7px 2px}.selection-label{display:none}
}
@media (max-width:620px){
 .content{padding:10px 12px}.single-layout{grid-template-columns:1fr;gap:13px}
 .left-rail{position:static;display:grid;grid-template-columns:1fr;gap:10px}
 .album-qr-strip{justify-content:center}
 .category-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:190px;overflow-y:auto}
 .rank-tab{min-height:42px}.ranking-toolbar{top:0}.cards-heading h1{font-size:18px}
 .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .theme-toggle{min-width:125px;font-size:11px}.demo-tag{display:none}
}
@media (max-width:410px){
 .card-grid{grid-template-columns:1fr;max-width:330px;margin:auto}
 .cards-heading{flex-wrap:wrap}.album-qr-strip{justify-content:center}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media (forced-colors:active){.panel,.album-base,.card-base{border:1px solid CanvasText}.card-title,.card-field{border:1px solid CanvasText}}

/* v1.17: red-markup layout revisions: card-only, category single column, tabs centered. */
.header-inner{max-width:1700px;gap:18px;min-height:98px;padding:12px 24px;flex-wrap:wrap}
.brand-line{display:flex;align-items:center;gap:12px;flex:none}
.platform-tabs{display:flex;gap:4px;align-items:center;flex:1;justify-content:center;min-width:300px;flex-wrap:wrap}
.platform-tab{border:1px solid var(--line);border-radius:9px;background:var(--control);color:var(--ink);padding:10px 11px;font-weight:750;font-size:14px;min-height:43px;white-space:nowrap}
.platform-tab[aria-pressed="true"]{border-color:var(--active-ink);background:var(--active);color:var(--active-ink)}
.platform-tab:hover{border-color:var(--active-ink)}
.theme-toggle{margin-left:auto;min-width:88px;display:flex;justify-content:space-around;gap:12px;font-size:25px;padding:7px 12px;line-height:1}
.theme-toggle[aria-pressed="false"] .sun-mark,.theme-toggle[aria-pressed="true"] .moon-mark{color:var(--active-ink);font-weight:bold}
.theme-toggle[aria-pressed="false"] .moon-mark,.theme-toggle[aria-pressed="true"] .sun-mark{opacity:.45}
.content{max-width:1700px;padding:18px 24px 30px}
.ranking-toolbar{justify-content:center;position:sticky;top:0;margin:0 0 14px;padding:11px 0 13px}
.rank-tabs{flex:none;max-width:900px;width:min(900px,94%);gap:12px}
.rank-tab{font-size:16px;min-height:48px}
.platform-overview{font-size:21px;font-weight:bold;text-align:center;margin:4px auto;color:var(--ink)}
.single-layout{grid-template-columns:minmax(170px,210px) minmax(0,1fr);gap:22px}
.left-rail{top:90px}
.category-grid{grid-template-columns:1fr;max-height:calc(100vh - 120px);gap:8px;padding:10px}
.category-option{min-height:48px;display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:12px;padding:9px 12px;font-size:16px;font-weight:700;white-space:normal}
.category-icon{font-size:21px;line-height:1.1;width:26px;flex:none;text-align:center}
.category-text{line-height:1.25}
.switch-status{font-size:15px;line-height:1.4;min-height:0;margin:0 0 10px}
.card-grid{gap:16px;padding:0}
.card-rank{font-size:24px;display:flex;align-items:center;gap:5px;top:3px;left:3px;padding:4px 9px;border-radius:9px;background:#24262a;line-height:1.1}
.rank-medal{font-size:23px}
.card-field{font-size:24px;line-height:1.08;padding:5px 8px;display:flex;flex-direction:column;justify-content:center;gap:3px}
.stat-line{display:flex;align-items:center;gap:5px;white-space:nowrap}
.stat-symbol{font-size:24px;font-weight:bold;min-width:26px;text-align:center}
@media(max-width:1150px){
 .header-inner{gap:10px}.brand-line{flex-basis:100%}.platform-tabs{justify-content:flex-start}
 .single-layout{grid-template-columns:180px minmax(0,1fr);gap:14px}
 .category-grid{max-height:calc(100vh - 150px)}
 .category-option{font-size:14px;min-height:43px;gap:6px;padding:7px}
 .category-icon{font-size:19px;width:24px}
}
@media(max-width:790px){
 .header-inner{gap:10px}.brand-line{flex-basis:auto}
 .platform-tabs{order:3;flex-basis:100%;justify-content:space-around;min-width:0}
 .platform-tab{font-size:12px;padding:9px 6px}
 .theme-toggle{margin-left:auto;font-size:22px}
 .single-layout{grid-template-columns:152px minmax(0,1fr);gap:10px}
 .category-grid{padding:6px;gap:5px}
 .category-option{font-size:12px;min-height:38px;gap:4px}
 .category-icon{font-size:16px;width:20px}
 .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
}
@media(max-width:620px){
 .content{padding:10px}.header-inner{padding:10px}
 .single-layout{grid-template-columns:1fr}
 .left-rail{position:static;display:block}
 .category-grid{display:flex;flex-direction:row;gap:6px;max-height:none;overflow-x:auto;white-space:nowrap;padding:7px;overscroll-behavior-x:contain}
 .category-option{min-width:max-content;width:auto;font-size:13px;padding:8px 12px}
 .category-icon{font-size:17px}
 .platform-tabs{gap:3px}.platform-tab{font-size:11px;min-height:38px}
 .rank-tabs{width:100%;gap:5px}.rank-tab{font-size:13px;min-height:42px}
 .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:none}
}
@media(max-width:410px){
 .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;gap:7px}
 .wordmark{font-size:27px}.platform-tab{font-size:10px;padding:8px 4px}
 .card-rank{font-size:24px}
}
/* Place the enlarged rank badge above the title, not on top of it. */
.card-grid{padding-top:13px}
.card-rank{top:-10px;left:0;box-shadow:0 1px 4px rgba(0,0,0,.2)}

.stat-symbol svg{width:24px;height:24px;display:block}

/* ===== v1.18 site-only design update ===== */
.site-header{border:0;background:#070d20}
.header-inner{max-width:none;min-height:0;display:block;padding:0;margin:0}
.site-banner{display:block;width:100%;height:clamp(78px,9.2vw,135px);object-fit:cover;object-position:center top}
.content{max-width:1700px;padding:8px 20px 32px}
.ranking-toolbar{position:sticky;top:0;justify-content:space-between;gap:14px;padding:10px 0 12px;margin:0 0 14px;flex-wrap:wrap}
.rank-tabs{display:flex;justify-content:flex-start;flex:0 1 auto;width:auto;max-width:none;gap:10px}
.rank-tab{min-width:170px;width:auto;min-height:46px;font-size:16px;padding:9px 18px;white-space:nowrap}
.get-doreal{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-left:auto;white-space:nowrap}
.get-doreal-label{font-size:15px;font-weight:750;color:var(--ink);margin-right:3px}
.store-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:1px solid var(--line);border-radius:8px;background:var(--control);color:var(--ink);padding:9px 13px;min-height:42px;font-size:14px;font-weight:700}
.store-link:hover{border-color:var(--active-ink);background:var(--active);color:var(--active-ink)}
.theme-toggle{min-width:76px;flex:0 0 auto;margin-left:0;font-size:21px;padding:7px 10px;gap:8px;min-height:42px}
.single-layout{grid-template-columns:270px minmax(0,1fr);gap:18px}
.left-rail{top:83px}
.category-grid{grid-template-columns:1fr;max-height:calc(100vh - 130px);gap:7px;padding:10px}
.category-option{white-space:nowrap;overflow-wrap:normal;justify-content:flex-start;text-align:left;min-height:46px;padding:8px 11px;font-size:16px;gap:10px}
.category-text{white-space:nowrap;overflow:visible;text-overflow:clip;line-height:1.25}
.category-icon{width:27px;flex:0 0 27px;text-align:center;font-size:21px}
/* 基準カードの表示幅をv1.17の80%に。内部のDoReal比率・座標は維持 */
.card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;padding:0;justify-items:start}
.card-shell{width:80%;max-width:100%;aspect-ratio:63/88}
.card-heading{display:flex;align-items:center;gap:7px;height:55px;flex:none;min-width:0}
.card-heading .card-title{height:100%;flex:1;min-width:0}
.rank-badge{flex:0 0 42px;width:42px;height:47px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--card-box) 80%,transparent);font-weight:800}
.rank-crown .crown-icon{width:35px;height:30px;display:block}
.rank-crown-1{color:#f5c542}.rank-crown-2{color:#b9d7e8}.rank-crown-3{color:#eaa16a}
.rank-number{color:var(--card-box-ink);font-size:27px}
.card-field{font-size:16px;line-height:1.3;font-weight:400;padding:7px 9px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;white-space:normal}
.stat-line{display:flex;align-items:center;justify-content:flex-start;gap:6px;white-space:nowrap;text-align:left;width:100%}
.stat-symbol{display:inline-flex;min-width:22px;width:22px;align-items:center;justify-content:center}
.stat-symbol svg{display:block;width:21px;height:21px}
.stat-symbol--views{color:#3cafff}.stat-symbol--date{color:#8bc6ff}.stat-symbol--likes{color:#ff5779}.stat-symbol--likes svg{fill:currentColor;stroke:currentColor}.stat-symbol--comments{color:#36b4ff}
.youtube-link{gap:7px}
.youtube-play-icon{display:block;flex:none}
/* Disable old fixed-size floating badges; rank is inside the scaled card */
.card-rank{display:none}
@media(max-width:1350px){
  .ranking-toolbar{gap:8px}
  .rank-tab{min-width:138px;padding:7px 10px;font-size:14px}
  .get-doreal-label{font-size:13px}
  .store-link{font-size:12px;padding:7px 9px}
  .single-layout{grid-template-columns:250px minmax(0,1fr);gap:13px}
  .category-option{font-size:15px}
}
@media(max-width:1040px){
  .ranking-toolbar{justify-content:flex-start}
  .get-doreal{margin-left:auto}
  .single-layout{grid-template-columns:242px minmax(0,1fr)}
  .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .card-shell{width:88%}
}
@media(max-width:760px){
  .single-layout{grid-template-columns:1fr}
  .left-rail{position:static}
  .category-grid{display:flex;flex-direction:row;gap:6px;max-height:none;overflow-x:auto;padding:8px}
  .category-option{min-height:40px;width:auto;min-width:max-content;font-size:14px;padding:7px 11px}
  .category-icon{font-size:18px;width:23px;flex-basis:23px}
  .rank-tabs{width:100%;gap:5px}
  .rank-tab{flex:1;min-width:0;font-size:12px;min-height:40px;padding:7px 4px}
  .get-doreal{margin-left:0;flex:1;justify-content:flex-start}
  .get-doreal-label{font-size:12px}
  .theme-toggle{margin-left:auto}
  .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .card-shell{width:100%}
  .site-banner{height:90px;object-position:left top}
}
@media(max-width:390px){
  .get-doreal{gap:4px}
  .get-doreal-label{font-size:11px}
  .store-link{font-size:11px;padding:7px 5px}
  .theme-toggle{font-size:18px;min-width:57px;padding:6px}
}

/* ===== v1.19: user-requested revisions only ===== */
/* Application light background: user screenshot sampled #A0A0A0 (v1.24). */
:root[data-theme="light"]{--page:#A0A0A0;--panel:#FAFAFA;--ink:#202020}
/* Use the EXISTING header image; light mode recolors the displayed banner only.
   Dark mode leaves header_banner.png unchanged. Do not crop the image at maximum width. */
.site-banner{width:100%;height:auto;max-height:none;object-fit:contain;object-position:center;aspect-ratio:1448/133}
:root[data-theme="light"] .site-banner{filter:invert(1) hue-rotate(180deg) saturate(.88)}
:root[data-theme="light"] .site-header{background:#A0A0A0}
:root[data-theme="dark"] .site-banner{filter:none}
/* Official platform artwork loaded directly from the respective providers.
   Text fallback is shown when their badge servers are not reachable. */
.store-link{padding:0;border:0;border-radius:0;min-height:0;background:transparent;color:var(--ink);height:44px;min-width:120px;overflow:visible}
.store-link:hover{border:0;background:transparent;color:var(--ink)}
.store-badge{width:auto;height:44px;max-width:168px;object-fit:contain;display:block}
.store-badge-google{height:56px;margin:-6px -4px}
.store-fallback{display:none;font-size:13px;font-weight:700;border:1px solid var(--line);background:var(--control);border-radius:7px;padding:11px 12px}
.store-link.badge-failed .store-badge{display:none}
.store-link.badge-failed .store-fallback{display:inline-flex}
/* Compact true 3-column grouping: 80% of previous grid width without gaps between cards. */
.card-grid{width:80%;max-width:100%;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:10px;row-gap:32px;padding:17px 0 0;justify-items:stretch}
.card-shell{width:100%;max-width:100%;overflow:visible}
/* Rank badge remains OUTSIDE card title; half-size relative to v1.18 (42x47). */
.card-rank{display:none}
.rank-badge{position:absolute;z-index:5;top:calc(-17px * var(--card-scale,1));left:calc(10px * var(--card-scale,1));transform:scale(var(--card-scale,1));transform-origin:top left;width:26px;height:27px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#24262a;color:#fff;font-weight:800;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.15)}
.rank-crown .crown-icon{width:25px;height:25px;display:block}
.rank-crown-1{color:#f5c542}.rank-crown-2{color:#b9d7e8}.rank-crown-3{color:#eaa16a}
.rank-number{font-size:20px;line-height:1;color:#fff}
.card-inner>.card-title{height:55px;width:100%;flex:none}
/* DoReal message/comment format: strong text, top-to-bottom centered, left aligned. */
.card-field{font-weight:700;font-size:16px;line-height:1.3;justify-content:center;align-items:flex-start}
.stat-line{padding-left:2em;gap:6px;white-space:nowrap}
/* Readable icon pigments against pale light-mode boxes (dark unchanged). */
:root[data-theme="light"] .stat-symbol--views{color:#0069A8}
:root[data-theme="light"] .stat-symbol--date{color:#1262A0}
:root[data-theme="light"] .stat-symbol--likes{color:#D92858}
:root[data-theme="light"] .stat-symbol--comments{color:#0067A2}
/* QR icon exactly centered in footer while standard YouTube button stays on the right. */
.card-footer{position:relative;justify-content:flex-end;gap:0;padding-right:2px}
.card-footer .qr-trigger{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
.youtube-link{min-width:112px;gap:5px;margin-left:auto}
/* Do not change categories or append extra controls. */
@media(max-width:1040px){.card-grid{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px;row-gap:25px}.card-shell{width:100%}}
@media(max-width:760px){.card-grid{width:100%;column-gap:10px;row-gap:22px}.site-banner{height:auto;object-fit:contain;aspect-ratio:1448/133}}
@media(max-width:420px){.card-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px;row-gap:20px}}

/* Narrow screens: the two official badges and label must not widen the viewport. */
@media(max-width:420px){
  .get-doreal{width:100%;flex:0 1 100%;max-width:100%;gap:3px;justify-content:space-between}
  .get-doreal-label{font-size:11px;margin-right:0}
  .store-link{width:104px;min-width:0;max-width:104px;height:40px}
  .store-badge{height:40px;max-width:104px}
  .store-badge-google{height:48px;margin:-4px -2px}
  .store-fallback{font-size:11px;padding:9px 3px}
}

/* ===== v1.20: introductory copy immediately after the 高評価BEST9 tab ===== */
.doreal-intro{
  flex:1 1 390px;
  min-width:300px;
  font-size:13px;
  line-height:1.55;
  font-weight:600;
  color:var(--ink);
  text-align:left;
  overflow-wrap:normal;
}
.doreal-intro a{
  color:var(--active-ink);
  text-decoration:underline;
  text-underline-offset:2px;
  font-weight:750;
  white-space:nowrap;
}
.doreal-intro a:hover{text-decoration-thickness:2px}
/* Keep all three existing ranking buttons left-aligned, and retain store links. */
@media(min-width:761px) and (max-width:1599px){
  .rank-tab{min-width:146px;padding-left:10px;padding-right:10px}
  .doreal-intro{font-size:12.5px;min-width:290px}
  .doreal-intro-break{display:none}
}
@media(max-width:760px){
  .doreal-intro{flex:0 0 100%;width:100%;min-width:0;font-size:12px;line-height:1.5}
  .doreal-intro-break{display:none}
}

/* ===== v1.22: only the requested display adjustments ===== */
/* v1.24: Match the page background to the supplied app screenshot (#A0A0A0).
   Keep card colors, category panel, banner and dark mode unchanged. */
:root[data-theme="light"]{--page:#A0A0A0}
html[data-theme="light"],
:root[data-theme="light"] body,
:root[data-theme="light"] .content,
:root[data-theme="light"] .single-layout,
:root[data-theme="light"] .cards-main,
:root[data-theme="light"] .left-rail,
:root[data-theme="light"] .ranking-toolbar{background-color:#A0A0A0}
/* Message: left aligned views/likes; the date and comment columns share
   the same starting X coordinate on the right. */
.card-field--metrics{display:flex;align-items:center;justify-content:center;padding:6px 5px}
.stats-grid{width:100%;display:grid;grid-template-columns:48% 52%;grid-template-rows:repeat(2,minmax(0,1fr));align-items:center;row-gap:5px;column-gap:0}
.stats-grid .stat-line{padding:0 1em;gap:1em;min-width:0;width:100%;white-space:nowrap;font-size:16px;font-weight:700;letter-spacing:-.08em;justify-content:flex-start}
.stats-grid .stat-symbol{width:17px;min-width:17px;flex:0 0 17px}
.stats-grid .stat-symbol svg{width:17px;height:17px}
.stats-grid .stat-copy{display:block;min-width:0;white-space:nowrap;width:max-content;flex:0 0 auto;transform-origin:left center}
.stats-grid .stat-line{overflow:hidden}
/* QR centered only in the remaining space to the LEFT of the existing
   right-aligned YouTube link (not in the center of the full footer). */
.card-footer{display:flex;justify-content:flex-end;align-items:center}
.card-footer .qr-region{flex:1 1 auto;min-width:0;height:100%;display:flex;align-items:center;justify-content:center}
.card-footer .qr-trigger{position:static;left:auto;top:auto;transform:none;flex:none}
.card-footer .youtube-link{flex:0 0 auto;margin-left:0}

/* v1.25: categories above the cards, five columns, 80% button height. */
.single-layout{grid-template-columns:minmax(0,1fr)}
.left-rail{position:static;display:block;min-width:0}
.category-grid{display:grid;grid-template-columns:repeat(5,minmax(224px,1fr));grid-auto-flow:row;gap:7px;max-height:none;overflow-x:auto;overflow-y:hidden;padding:10px}
.category-option{height:36.8px;min-height:36.8px;min-width:0;width:100%;padding:0 11px;white-space:nowrap}
/* Keep the card size from the preceding sidebar layout. */
.cards-main{width:calc(100% - 288px)}
@media(max-width:1350px){.cards-main{width:calc(100% - 263px)}}
@media(max-width:1040px){.cards-main{width:calc(100% - 255px)}}
@media(max-width:760px){
 .cards-main{width:100%}
 .category-grid{grid-template-columns:repeat(5,minmax(194px,1fr));padding:8px;gap:6px}
 .category-option{height:32px;min-height:32px;padding:0 11px}
}

/* v1.29: responsive card columns, up to five on wide screens. */
.cards-main{width:100%}
.card-grid{width:100%;grid-template-columns:repeat(5,minmax(0,1fr));max-width:100%;margin-left:0;margin-right:0}

@media(max-width:1399px){.card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1119px){.card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:839px){.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:559px){.card-grid{grid-template-columns:minmax(0,1fr)}}

/* v1.31: YouTube stays centered; QR aligns to the right footer edge. */
.card-footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:0;padding-right:0}
.card-footer .qr-region{grid-column:3;grid-row:1;width:100%;justify-content:flex-end}
.card-footer .youtube-link{grid-column:2;grid-row:1;margin:0}

/* v1.32: unbroken YouTube name and reference-shaped play mark. */
.youtube-link{white-space:nowrap;word-spacing:0;letter-spacing:0}
.youtube-link>span{display:inline-block;white-space:nowrap;word-break:normal;overflow-wrap:normal;word-spacing:0;letter-spacing:0}
.youtube-play-icon{display:block;flex:0 0 auto}

/* v1.35: full square DoReal icon enlarged to 1.5 times 23px. */
.doreal-card-link{grid-column:1;grid-row:1;justify-self:start;display:flex;align-items:center;justify-content:center;width:48px;min-width:48px;height:38px;min-height:38px;border-radius:6px;text-decoration:none}
.doreal-card-icon{display:block;width:34.5px;height:34.5px;object-fit:contain;border-radius:6px}
.doreal-card-link:hover{background:color-mix(in srgb,var(--card-box-ink) 10%,transparent)}

/* v1.36: square QR button; DoReal image uses matching rounded corners. */
.card-footer .qr-trigger{width:38px;height:38px}

/* v1.38: remove the description panel and reclaim its vertical space. */
.card-shell{aspect-ratio:357.9545 / 415}
.card-base{height:415px}

/* v1.39: replace the banner with the DoReColle logo and requested copy. */
.site-header{background:var(--page)}
.header-inner{max-width:1700px;margin:0 auto;padding:12px 20px;display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;min-height:0}
.header-logo{display:block;width:300px;max-width:100%;height:auto;flex:0 0 auto}
.header-message{margin:0;flex:1 1 320px;min-width:0;color:var(--ink);font-size:20px;font-weight:700;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:760px){
 .header-inner{padding:12px 10px;gap:10px 16px}
 .header-logo{width:240px}
 .header-message{font-size:16px}
}

/* v1.42: normalize visible letters and padding to the DoReal reference. */
.header-logo{display:block;position:relative;overflow:hidden;width:189.0187px;height:51px;max-width:100%;flex:none;background:#fff;border-radius:6px}
.header-logo-image{position:absolute;display:block;width:179.6658px;height:60.7694px;max-width:none;left:4.7894px;top:-4.3630px;image-rendering:auto}

/* v1.44: header callout and theme control; store badges at the row's right edge. */
.header-site-link{display:inline-flex;align-items:center;gap:8px;margin-left:3px;color:inherit;text-decoration:none;vertical-align:middle;white-space:nowrap}
.header-site-link:hover span{text-decoration:underline}
.header-site-link .doreal-card-icon{flex:none}
.header-inner>.theme-toggle{margin-left:auto}
.ranking-toolbar .get-doreal{margin-left:auto;justify-content:flex-end;flex:0 1 auto;width:auto}
/* Place the existing crown badges inside the upper-left corner. */
.rank-badge{top:calc(4px * var(--card-scale,1));left:calc(4px * var(--card-scale,1))}
.rank-number{transform:scale(calc(var(--card-scale,1) * .5))}
@media(max-width:760px){
 .header-inner>.theme-toggle{order:1}
 .header-message{order:2;flex-basis:100%}
 .ranking-toolbar .get-doreal{flex-basis:100%;width:100%;justify-content:flex-end}
}

/* v1.45: reference-sized corner ranks; prominent crowns and compact numbers. */
.rank-badge{top:0;left:calc(3px * var(--card-scale,1));width:36px;height:36px;transform:scale(var(--card-scale,1));border-radius:5px}
.rank-crown .crown-icon{width:34px;height:34px}
.rank-number{width:18px;height:24px;font-size:20px;transform:scale(var(--card-scale,1));border-radius:2px}

/* Keep the larger corner crown clear of the title text. */


/* v1.46: gray rank labels, padded numbers and balanced grid spacing. */
.rank-badge{background:#444444;left:0}
.rank-crown{left:0}
.rank-number{width:24px;height:30px}

.card-grid{gap:10px;padding-top:0}
@media(max-width:1040px){.card-grid{gap:12px}}
@media(max-width:760px){.card-grid{gap:10px}}
@media(max-width:420px){.card-grid{gap:8px}}

/* v1.48: light-mode rank colors; dark-mode rules stay unchanged. */
:root[data-theme="light"] .rank-badge{background:#dddddd}
:root[data-theme="light"] .rank-crown .crown-icon text{fill:#ffffff}
:root[data-theme="light"] .rank-number{color:#000000}

/* v1.49: darker gold, silver and bronze for white rank numerals in light mode. */
:root[data-theme="light"] .rank-crown-1{color:#966900}
:root[data-theme="light"] .rank-crown-2{color:#526775}
:root[data-theme="light"] .rank-crown-3{color:#9c4f28}

/* v1.52: all rank numerals share the crown SVG typography and scale. */
.rank-number{font-family:inherit;font-size:15px;font-weight:900}
.rank-number .rank-numeral{display:block;width:34px;height:34px;flex:none;overflow:visible}

/* v1.53: explicit two-line header and matching app-download label size. */
:root{--header-copy-size:16px}
.header-message,.get-doreal-label{font-size:var(--header-copy-size)}
.ranking-toolbar .get-doreal{max-width:100%;flex-wrap:wrap;row-gap:6px}
@media(max-width:1350px){:root{--header-copy-size:15px}}
@media(max-width:760px){:root{--header-copy-size:14px}}

/* v1.54: indent the second header line by one full-width character. */
.header-second-line{display:inline-block;padding-left:1em;max-width:100%}

/* v1.55: unboxed categories and a divider below the header. */
.category-grid{border:0;border-radius:0;background:transparent;box-shadow:none}
.site-header{border-bottom:1px solid var(--line)}

/* v1.57: official-site-style round button showing the action's sun/moon icon. */
.theme-toggle{width:40px;min-width:40px;max-width:40px;height:40px;min-height:40px;flex:0 0 40px;display:grid;place-items:center;padding:9px;gap:0;border-radius:50%;font-size:inherit;line-height:1}
.theme-icon{width:20px;height:20px;display:none}
:root[data-theme="dark"] .theme-toggle{background:#000000;color:#ffffff;border:1px solid #444444;box-shadow:none}
:root[data-theme="light"] .theme-toggle{background:#ffffff;color:#10243a;border:1px solid #e0e5ec;box-shadow:0 4px 12px rgba(16,36,58,.14)}
:root[data-theme="dark"] .theme-sun,:root[data-theme="light"] .theme-moon{display:block}

/* v1.59: slightly raise the header introduction. */
.header-message{position:relative;top:-3px}

/* v1.61: header divider matches the ranking toolbar's content width. */
.site-header{border-bottom:0}
.site-header::after{content:"";display:block;width:calc(100% - 40px);max-width:1660px;margin:0 auto;border-bottom:1px solid var(--line)}

/* v1.62: equal vertical breathing room around header and ranking controls. */
:root{--section-vertical-space:12px}
.header-inner{padding-top:var(--section-vertical-space);padding-bottom:var(--section-vertical-space)}
.header-message{top:0}
.content{padding-top:0}
.ranking-toolbar{padding-top:var(--section-vertical-space);padding-bottom:var(--section-vertical-space)}

/* v1.63: categories use the same 12px vertical spacing as the ranking controls. */
.ranking-toolbar{margin-bottom:0}
.single-layout{row-gap:0}
.category-grid{padding-top:var(--section-vertical-space);padding-bottom:var(--section-vertical-space)}

/* v1.64: lower only the first header line without moving the second. */
.header-first-line{position:relative;top:3px}

/* v1.65: lower the second header line by the same 3px as the first. */
.header-second-line{position:relative;top:3px}

/* v1.66: colorful ranking icons and buttons 1.5 times the previous base width. */
.rank-tabs{flex-wrap:wrap;max-width:100%}
.rank-tab{width:255px;min-width:255px;flex:0 0 255px}
@media(min-width:761px) and (max-width:1599px){.rank-tab{width:219px;min-width:219px;flex-basis:219px}}
@media(max-width:760px){.rank-tab{width:calc((100% - 10px)/2);min-width:0;flex:0 0 calc((100% - 10px)/2)}}

/* v1.68: explicitly labeled display-only tenth card for completed legacy exports. */
.dummy-card-label{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--sub);font-size:24px;font-weight:700}
.card-placeholder .doreal-card-link{opacity:.5;pointer-events:none}

/* v1.70: match the title font AFTER the entire card has been scaled. */
.header-message,.get-doreal-label,.rank-tab,.category-option,.collection-note{font-size:var(--card-title-visible-size,16px)}

/* v1.71: all ranking titles use the same horizontal padding. */
.card-shell .card-title{padding-left:10px}

/* v1.72: display crowns and numerals without a badge background. */
.rank-badge,:root[data-theme="light"] .rank-badge{background:transparent;box-shadow:none}

/* v1.73: per-card message switch, collapsed by default. */
.card-grid{align-items:start}
.card-shell{aspect-ratio:357.9545 / 342}
.card-shell .card-base{height:342px}
html.message-layout-changing{overflow-anchor:none;scroll-behavior:auto!important}
.card-shell.message-open{aspect-ratio:357.9545 / 415}
.card-shell.message-open .card-base{height:415px}
.card-fields[hidden]{display:none}
.card-thumb-wrap{position:relative}
.ai-recommendation-badge{position:absolute;top:calc(4px * var(--card-scale,1) + 3px);right:calc(-4px * var(--card-scale,1));z-index:5;transform:scale(var(--card-scale,1)) translateY(-50%);transform-origin:top right;pointer-events:none;display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid #c4668a;border-radius:20px;background:#fff0f6;color:#702340;font-size:13px;font-weight:700;line-height:1.3;box-shadow:0 1px 4px #0003;white-space:nowrap}
.ai-oshi-icon{display:block;flex:none;width:15px;height:15px;color:#d62568}
.message-toggle{grid-column:1;grid-row:1;justify-self:start;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:48px;height:42px;border:0;background:transparent;color:var(--card-box-ink);padding:0;cursor:pointer}
.message-toggle-track{display:block;position:relative;width:34px;height:20px;border-radius:20px;background:#666;border:1px solid #444}
.message-toggle-track::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff}
.message-toggle[aria-checked="true"] .message-toggle-track{background:#1677d2;border-color:#105da8}
.message-toggle[aria-checked="true"] .message-toggle-track::after{left:16px}
.message-toggle-label{font-size:10px;font-weight:700;line-height:1}
.message-toggle:focus-visible{outline:2px solid var(--card-box-ink);outline-offset:2px;border-radius:6px}

/* v1.78: identify the metrics switch with views and likes icons. */
.message-toggle-label{display:flex;align-items:center;justify-content:center;gap:5px;height:12px}
.message-toggle-label .stat-symbol{display:flex;align-items:center;justify-content:center;width:12px;height:12px;min-width:12px}
.message-toggle-label .stat-symbol svg{width:12px;height:12px}

/* v1.79: metric icons above the switch. */
.message-toggle{flex-direction:column-reverse}

/* v1.80: official site uses its horizontal DoReal logo. */
.header-destinations .official-site-logo,
.header-destinations .doreal-web-link {
  flex: none;
  width: 95.04px;
  height: 34.5px;
  border-radius: 6px;
}
.header-site-link .official-site-logo{display:block;max-width:none}

/* v1.81: inline discovery and enjoyment icons in the header copy. */
.header-copy-icon{display:inline-block;width:1.2em;height:1.2em;margin-left:.3em;vertical-align:-.2em}

/* v1.82: two seven-day trend rankings. */
.rank-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;line-height:1.3;min-height:58px;padding:8px 10px}
.rank-tab span{max-width:100%;overflow-wrap:anywhere}

/* v1.84: keyword search over saved candidates. */
.ranking-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;max-width:100%}
.ranking-heading{font-size:var(--card-title-visible-size,16px);font-weight:700}
.rank-tab{width:180px;min-width:180px;flex-basis:180px;min-height:42px;flex-direction:row}
.keyword-search{padding:12px 0;border-bottom:1px solid var(--line);margin:0 0 12px}
.keyword-search[hidden],.left-rail[hidden]{display:none}
.keyword-search label{display:block;font-weight:700;margin-bottom:8px}
.keyword-input-row{display:flex;gap:8px;max-width:780px;flex-wrap:wrap}
.keyword-input-row input{min-width:0;flex:1 1 220px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit}
.keyword-input-row button{padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink)}
.search-hint{font-size:13px;color:var(--ink);margin:8px 0 0}
@media(max-width:760px){.ranking-controls{width:100%}.rank-tab{width:calc((100% - 10px)/2);min-width:0;flex-basis:calc((100% - 10px)/2)}}

/* v1.86: larger trend controls with leading icons. */
.ranking-heading,.rank-tab{font-size:18px;font-weight:700}
.ranking-heading{display:inline-flex;align-items:center;gap:8px}
.ranking-icon{display:block;flex:none;width:1.3em;height:1.3em}
.rank-tab{width:230px;min-width:230px;flex-basis:230px;min-height:48px;gap:8px}
.rank-tab>span{min-width:0}
@media(max-width:760px){.ranking-heading,.rank-tab{font-size:16px}.rank-tab{width:calc((100% - 10px)/2);min-width:0;flex-basis:calc((100% - 10px)/2)}}

/* v1.90: use the same scaled font size as category buttons at every width. */
.ranking-heading,.rank-tab{font-size:var(--card-title-visible-size,16px)}

/* v1.91: category-height controls, 80% width, one fullwidth-character gap. */
.ranking-controls{font-size:var(--card-title-visible-size,16px);column-gap:1em}
.rank-tab{height:36.8px;min-height:36.8px;width:184px;min-width:max-content;flex:0 0 184px;padding:0 10px}
.rank-tab>span{white-space:nowrap;overflow-wrap:normal}
@media(max-width:760px){.rank-tab{height:32px;min-height:32px;width:calc(40% - 4px);flex-basis:calc(40% - 4px)}}

/* v1.92: thumbnail opens the same video as the YouTube footer link. */
.thumbnail-link{display:block;width:100%;height:100%;color:inherit;text-decoration:none;cursor:pointer}


/* v1.94: channel name and card-wide native play link, with separate controls. */
.card-play-link{position:absolute;inset:0;z-index:1;display:block;border-radius:inherit;cursor:pointer}
.card-play-link:focus-visible{outline:3px solid var(--focus);outline-offset:-5px}
.card-footer{grid-template-columns:48px minmax(0,1fr) 38px;column-gap:8px}
.card-channel{grid-column:2;grid-row:1;min-width:0;max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;line-height:1.2;font-size:16px;font-weight:700;text-align:center;color:var(--card-box-ink)}
.card-footer .message-toggle,.card-footer .qr-trigger{position:relative;z-index:2}

/* v1.95: same alignment policy as card titles. */
.card-channel{text-align:left}
.card-channel.channel-one-line{text-align:center}


/* v1.97: collection reminder and illustrated QR import guide. */
.collection-note{font-weight:700;line-height:1.6;margin:0 0 12px;padding:0 10px;color:var(--ink)}
.save-guide-trigger{border:0;background:transparent;padding:0;color:var(--active-ink);text-decoration:underline;text-underline-offset:3px;font:inherit;font-weight:700;cursor:pointer}
.save-guide-dialog{width:min(94vw,820px);max-height:92vh;max-height:92dvh;box-sizing:border-box;overflow:auto;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink)}
.save-guide-dialog::backdrop{background:rgba(0,0,0,.65)}
.save-guide-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.guide-web{padding:14px 16px;background:var(--control);border:1px solid var(--line);border-radius:10px;line-height:1.6}
.guide-web h3,.guide-app-heading{font-size:1rem}
.guide-web h3{margin:0}
.guide-web p{margin:8px 0 0}
.guide-app-heading{margin:18px 0 8px}
.save-guide-image{display:block;width:100%;height:auto;border-radius:10px}

/* Mobile: one row each for ranking buttons, store badges and categories. */
@media(max-width:760px){
  .content{padding-left:12px;padding-right:12px}
  .ranking-toolbar{gap:8px}
  .ranking-controls{width:100%;min-width:0;flex:0 0 100%;flex-direction:column;align-items:stretch;gap:6px;font-size:12px}
  .ranking-controls .ranking-heading{font-size:12px;line-height:1.3;white-space:nowrap}
  .ranking-controls .rank-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:100%;gap:5px;flex:none}
  .ranking-controls .rank-tab{width:100%;min-width:0;max-width:100%;height:32px;min-height:32px;flex:auto;padding:0 4px;gap:3px;font-size:clamp(10px,2.8vw,12px);line-height:1;white-space:nowrap}
  .ranking-controls .rank-tab .ranking-icon{width:1.1em;height:1.1em}
  .ranking-toolbar .get-doreal{display:flex;flex:0 0 100%;width:100%;min-width:0;max-width:100%;flex-wrap:nowrap;justify-content:flex-end;gap:5px;margin-left:0}
  .ranking-toolbar .get-doreal-label{flex:0 0 auto;min-width:0;font-size:clamp(10px,2.8vw,12px);margin-right:0;white-space:nowrap}
  .ranking-toolbar .store-link{flex:0 1 96px;width:96px;max-width:96px;min-width:0;height:32px}
  .ranking-toolbar .store-badge{display:block;width:100%;max-width:100%;height:32px;object-fit:contain;margin:0}
  .ranking-toolbar .store-badge-google{height:40px;margin:-4px 0}
  .ranking-toolbar .store-fallback{font-size:11px;padding:5px}
  .left-rail .category-grid{display:flex;flex-direction:row;flex-wrap:nowrap;grid-template-columns:none;gap:6px;width:100%;max-width:100%;max-height:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding:10px 0;scroll-padding-inline:2px;-webkit-overflow-scrolling:touch}
  .left-rail .category-option{flex:0 0 auto;width:auto;min-width:max-content;height:32px;min-height:32px;padding:0 10px;font-size:12px;white-space:nowrap}
  .left-rail .category-icon{font-size:16px;width:20px;flex-basis:20px}
}

/* Video title and import help in the QR dialog. */
.qr-dialog-heading{align-items:flex-start;gap:12px}
#qr-dialog-title{color:#161616;min-width:0;overflow-wrap:anywhere;line-height:1.5}
.qr-dialog-close{flex-shrink:0}
.qr-save-guide{margin:12px 0 0;text-align:center;font-size:14px;line-height:1.5}
.qr-save-guide .save-guide-trigger{color:#146caa}
.qr-dialog{width:min(360px,calc(100vw - 32px));box-sizing:border-box}

/* Keep mobile categories below the sticky ranking/store toolbar. */
@media(max-width:760px){
  .single-layout{display:block}
  .left-rail{position:sticky;top:var(--ranking-toolbar-height,130px);z-index:14;align-self:start;background:var(--page);border-bottom:1px solid var(--line)}
}

/* Semantic headings retain the approved header and toolbar dimensions. */
h1.header-first-line{display:inline;margin:0;font:inherit}
h2.ranking-heading{margin:0}

.qr-import-hint{font-size:13px;line-height:1.6;text-align:center;margin:8px 0;color:#161616}
#qr-import-link[href]{display:inline-block;cursor:pointer}
#qr-import-link[href]:focus-visible{outline:3px solid #1681cb;outline-offset:4px;border-radius:4px}

/* Keep the daily-update/save reminder with the introduction, before rankings. */
.header-inner>.header-collection-note{order:3;flex:0 0 100%;min-width:0;margin:0;padding:0;overflow-wrap:anywhere}

.header-oshi-discovery{white-space:nowrap}
.ai-recommendation-badge--header{position:static;transform:none;vertical-align:middle;font-size:inherit;line-height:1.2;pointer-events:auto;cursor:pointer;font-family:inherit}

/* Keep the soft selected style, with a clearer tint and border in light mode. */
:root[data-theme="light"] .rank-tab[aria-pressed="true"],
:root[data-theme="light"] .category-option[aria-pressed="true"],:root[data-theme="light"] .market-switch a[aria-current=page]{background:#cfe0f1;color:var(--active-ink);border-color:#3478b0;box-shadow:inset 0 0 0 1px #3478b0}

.keyword-input-row .ai-picks-search{display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}
.keyword-input-row .ai-picks-search[aria-pressed="true"]{background:#fff0f6;color:#702340;border-color:#c4668a;box-shadow:inset 0 0 0 1px #c4668a}

.header-oshi-question{margin-left:.5em}
#header-ai-picks:focus-visible{outline:3px solid #1681cb;outline-offset:3px}

.ai-recommendation-badge--search-tab{position:static;transform:none;flex-shrink:0}
#keyword-search-tab{flex-basis:auto;width:auto}
@media(max-width:760px){
 .ranking-controls #keyword-search-tab{width:100%;height:100%;min-height:48px;flex-direction:column;gap:2px;padding:3px 2px}
 .ranking-controls .rank-tabs{align-items:stretch}
 .ranking-controls .rank-tab{height:100%;min-height:48px}
}

/* Move the card list down on phones while preserving badge placement on cards. */
@media(max-width:760px){
 .card-grid{--mobile-card-gap:10px;gap:var(--mobile-card-gap);padding-top:var(--mobile-card-gap)}
}
@media(max-width:420px){.card-grid{--mobile-card-gap:8px}}

.keyword-search-label{display:inline-flex;align-items:center;justify-content:center;gap:3px;white-space:nowrap}

@media(max-width:760px){
 .ranking-controls .rank-tab[data-slot]>span{font-size:clamp(11px,calc(2.8vw + 1px),13px)}
}

.category-icon svg{display:block;width:1.2em;height:1.2em;margin:auto;color:inherit}

.header-heart-icon{display:inline-block;width:1em;height:1em;vertical-align:-.12em;color:#d62568}
.qr-dialog-close .close-icon{display:block;width:20px;height:20px;margin:auto}

#switch-status{color:var(--ink)}

.ranking-heading{gap:4px}
.ranking-heading>.ranking-icon{width:1.95em;height:1.95em}

/* Same route-based EN / JA switch as the official site. */
.language-switch{flex:0 0 auto;min-width:42px;height:40px;display:grid;place-items:center;padding:0 10px;border:1px solid var(--line);border-radius:999px;color:var(--active-ink);background:var(--control);font-size:12px;font-weight:900;letter-spacing:.06em;text-decoration:none;box-shadow:0 5px 15px #10274714}
.language-switch:hover{border-color:#ee8b3f;color:#ee8b3f}.language-switch:focus-visible{outline:3px solid #1681cb;outline-offset:2px}
.header-inner>.theme-toggle{margin-left:0}
@media(max-width:1040px){.header-inner>.language-switch{order:1;margin-left:auto}.header-inner>.theme-toggle{order:1}}
.translation-note{margin:10px 0 14px;font-size:13px;line-height:1.5;color:var(--ink)}
.card-english .card-title{position:relative;padding-right:38px}
.original-title-toggle{position:absolute;right:5px;top:24px;z-index:3;display:grid;place-items:center;width:28px;height:28px;padding:4px;border:1px solid currentColor;border-radius:6px;background:var(--card-box);color:var(--card-box-ink);cursor:pointer;pointer-events:auto}
.original-title-toggle svg{width:18px;height:18px}.original-title-toggle:focus-visible{outline:3px solid #1681cb}
.original-title-dialog{width:min(92vw,640px);padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink);overflow-wrap:anywhere}
.original-title-dialog::backdrop{background:#0009}.original-title-dialog p{line-height:1.6}.original-title-dialog .muted{color:var(--sub)}
.english-save-guide{line-height:1.6}.english-save-guide h3{margin:8px 0}.english-save-guide section{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--control)}
.guide-install strong{font-size:19px}.guide-store-links{display:flex;flex-wrap:wrap;gap:10px}.guide-store-links a{padding:8px 14px;border-radius:20px;background:#1681cb;color:#fff;text-decoration:none;font-weight:700}
.guide-paths{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0}.guide-device{height:100px}.guide-device svg{display:block;height:100px;width:100px;margin:auto}.guide-qr-example{display:flex;align-items:center;gap:12px;color:var(--active-ink);font-weight:700}.guide-qr-example svg{flex:none;width:44px;height:44px}
.guide-nine-cards{display:grid;grid-template-columns:repeat(3,40px);gap:5px;float:right;margin:0 0 10px 14px}.guide-nine-cards span{display:grid;place-items:center;height:48px;border:2px solid #999;border-radius:5px;color:#444}.guide-album{display:flow-root}.guide-troubleshooting{color:var(--sub);font-size:14px}
@media(max-width:560px){.guide-paths{grid-template-columns:1fr}}

/* Region selectors share the ranking button colors in both themes. */
.market-switch{display:flex;gap:8px;margin:8px 0}.market-switch a{display:inline-block;padding:6px 16px;border:1px solid var(--line);border-radius:20px;color:var(--ink);background:var(--control);text-decoration:none;font-weight:700}.market-switch a[aria-current=page]{background:var(--active);color:var(--active-ink);border-color:var(--active-ink)}.market-switch a:hover{border-color:var(--active-ink)}

/* Keep the region next to the heading on phones; ranking tabs get their own row. */
@media(max-width:760px){
  .ranking-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;row-gap:6px}
  .ranking-controls .ranking-heading{grid-column:1;grid-row:1;min-width:0}
  .ranking-controls .market-switch{grid-column:2;grid-row:1;flex-wrap:nowrap;gap:5px;margin:0;font-size:12px;white-space:nowrap}
  .ranking-controls .market-switch a{padding:5px 10px}
  .ranking-controls .rank-tabs{grid-column:1/-1;grid-row:2}
}

.ranking-pages{display:flex;justify-content:center;gap:8px;margin:0 0 12px;flex-wrap:wrap}
.ranking-pages[hidden]{display:none}
.ranking-pages button{font:inherit;font-weight:700;padding:7px 16px;border-radius:8px;border:1px solid var(--line);background:var(--control);color:var(--ink);cursor:pointer}
.ranking-pages button[aria-pressed="true"]{background:var(--active);color:var(--active-ink);border-color:#3478b0}
:root[data-theme="light"] .ranking-pages button[aria-pressed="true"]{background:#cfe0f1;color:var(--active-ink);border-color:#3478b0}
@media(max-width:760px){.ranking-pages{gap:6px}.ranking-pages button{padding:6px 12px}}

/* Page controls sit between likes and keyword search in the ranking toolbar. */
.ranking-controls .ranking-pages{align-self:center;flex:0 0 auto;flex-wrap:nowrap;gap:5px;margin:0}
.ranking-controls .ranking-pages button{height:36.8px;min-height:36.8px;padding:0 10px;white-space:nowrap;font-size:var(--card-title-visible-size,16px)}
@media(max-width:760px){
 .ranking-controls .rank-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
 .ranking-controls .rank-tab[data-slot]>span{font-size:clamp(9px,2.6vw,12px)}
 .ranking-controls .rank-tab[data-slot="0"]{grid-column:1;grid-row:1}
 .ranking-controls .rank-tab[data-slot="1"]{grid-column:2;grid-row:1}
 .ranking-controls #keyword-search-tab{grid-column:3;grid-row:1;min-height:48px;height:100%;flex-direction:row;font-size:10px}
 .ranking-controls .ranking-pages{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;min-width:0;gap:4px}
 .ranking-controls .ranking-pages[hidden]{display:none}
 .ranking-controls .ranking-pages button{width:100%;min-width:0;height:32px;min-height:32px;padding:0 2px;font-size:clamp(9px,2.6vw,12px)}
}

/* Keep download links beside the daily-update note, above the ranking controls. */
.header-inner>.header-note-row{order:3;flex:0 0 100%;min-width:0;line-height:1.6}
.header-note-row .header-collection-note{display:inline;margin:0;padding:0;overflow-wrap:anywhere}
.header-note-row .get-doreal{display:inline-flex;width:auto;max-width:100%;vertical-align:middle;margin:0 0 0 10px;gap:5px;white-space:nowrap}
.header-note-row .store-link{flex:0 1 96px;width:96px;min-width:0;height:32px}
.header-note-row .store-badge{display:block;width:100%;height:32px;object-fit:contain;margin:0}
.header-note-row .store-badge-google{height:40px;margin:-4px 0}
@media(max-width:760px){
 .ranking-controls .rank-tabs .rank-tab,.ranking-controls #keyword-search-tab{height:36.8px;min-height:36.8px;max-height:36.8px}
 .header-note-row .get-doreal{flex:none;margin-left:0;gap:5px;justify-content:flex-start}
 .header-note-row .get-doreal-label{font-size:clamp(10px,2.8vw,12px);margin:0}
 .header-note-row .store-link{width:80px;flex:0 1 80px}
 .header-note-row .store-fallback{font-size:11px;padding:5px}
}

/* Share horizontal padding and gaps with the views ranking button. */
.ranking-controls{--ranking-button-padding-x:10px;--ranking-button-gap:10px}
.ranking-controls .rank-tabs .rank-tab,.ranking-controls #keyword-search-tab,.ranking-controls .ranking-pages button{padding-left:var(--ranking-button-padding-x);padding-right:var(--ranking-button-padding-x)}
.ranking-controls .ranking-pages{gap:var(--ranking-button-gap)}
@media(max-width:760px){.ranking-controls{--ranking-button-padding-x:4px;--ranking-button-gap:5px}}

/* Size controls to their content so visible text insets match as well as padding. */
.header-inner>.header-note-row{display:flex;flex-wrap:wrap;align-items:center;column-gap:12px;row-gap:4px}
.header-note-row .header-collection-note{flex:1 1 540px;min-width:0}
.header-note-row .get-doreal{flex:0 0 auto;width:auto;margin-left:auto;justify-content:flex-end}
.ranking-controls .rank-tabs .rank-tab,.ranking-controls #keyword-search-tab{width:auto;min-width:0;flex:0 0 auto}
.ranking-label-compact{display:none}
@media(max-width:760px){
 .ranking-controls{--ranking-button-padding-x:10px}
 .ranking-controls .rank-tabs{grid-template-columns:repeat(3,max-content);justify-content:space-between;gap:5px}
 .ranking-controls .rank-tabs .rank-tab,.ranking-controls #keyword-search-tab,.ranking-controls .ranking-pages button{height:32px;min-height:32px;max-height:32px;font-size:12px;line-height:1;gap:3px}
 .ranking-controls .rank-tab[data-slot]>span{font-size:inherit}
 .ranking-controls .rank-tab .ranking-label-full{display:none}
 .ranking-controls .rank-tab .ranking-label-compact{display:inline}
 .ranking-controls .ranking-pages{display:flex;justify-content:space-between;grid-column:1/-1;gap:5px}
 .ranking-controls .ranking-pages button{width:auto;flex:0 0 auto}
 .header-note-row .get-doreal{margin-left:auto;justify-content:flex-end}
}

/* Equal mobile columns keep every button aligned with a consistent gap. */
.keyword-label-compact{display:none}
@media(max-width:760px){
 .header-note-row .get-doreal-label{font-size:14px}
 .ranking-controls{--ranking-button-padding-x:4px}
 .ranking-controls .rank-tabs{grid-template-columns:repeat(3,minmax(0,1fr));justify-content:stretch;gap:5px}
 .ranking-controls .rank-tabs .rank-tab,.ranking-controls #keyword-search-tab{width:100%;max-width:100%;min-width:0}
 .ranking-controls .ranking-pages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;justify-content:stretch;gap:5px}
 .ranking-controls .ranking-pages button{width:100%;min-width:0}
 .keyword-search-label .keyword-label-full{display:none}
 .keyword-search-label .keyword-label-compact{display:inline}
}

@media(max-width:760px){
 .ranking-controls .rank-tab .ranking-label-compact{white-space:normal;overflow-wrap:normal;line-height:1.05;text-wrap:balance}
}

.ranking-controls .rank-tab .ranking-label-part{white-space:nowrap;overflow-wrap:normal;display:inline-block}

/* Give each control row its own inset, matching the category row. */
:root{--control-row-inset:12px}
.ranking-toolbar{padding-top:0;padding-bottom:0}
.ranking-controls .rank-tabs{padding-top:var(--control-row-inset);padding-bottom:var(--control-row-inset)}
.header-note-row .header-collection-note{padding-top:var(--control-row-inset);padding-bottom:var(--control-row-inset)}
@media(max-width:760px){
 :root{--control-row-inset:10px}
 .ranking-controls{row-gap:0}
 .ranking-controls .ranking-heading,.ranking-controls .market-switch{margin-top:var(--control-row-inset);margin-bottom:var(--control-row-inset)}
 .ranking-controls .rank-tabs{row-gap:5px}
}

/* The note row uses one outer inset; do not add another inset inside its text. */
:root{--header-layout-row-gap:16px}
.header-inner{row-gap:var(--header-layout-row-gap);padding-bottom:var(--control-row-inset)}
.header-inner>.header-note-row{margin-top:calc(var(--control-row-inset) - var(--header-layout-row-gap));row-gap:var(--control-row-inset)}
.header-note-row .header-collection-note{padding-top:0;padding-bottom:0}
@media(max-width:1040px){:root{--header-layout-row-gap:10px}}

/* Reserve a stable start position for the first card and its optional AI badge. */
@media(max-width:760px){.card-grid{padding-top:10px}}

/* Preserve card geometry while the thumbnail loads and decodes. */
.card-shell.card-image-pending{visibility:hidden}

.qr-web-create{display:block;margin-top:14px;padding:12px 10px;border-radius:8px;background:#146caa;color:#fff;text-align:center;text-decoration:none;font-weight:700;font-size:15px}
.qr-web-create:hover{background:#105687}
.qr-web-create:focus-visible{outline:3px solid #ed8f29;outline-offset:3px}

/* Keep the two destinations side by side on the second header line. */
.doreal-web-link{display:inline-flex;align-items:center;justify-content:center;gap:2px;border:0;background:#fff;color:#222;text-decoration:none;font-size:11px;line-height:1;font-weight:700;white-space:nowrap}
.doreal-web-link img{display:block;width:auto;height:22px;object-fit:contain}
.doreal-web-link:hover{box-shadow:0 0 0 2px var(--active-ink)}
.doreal-web-link:focus-visible{outline:3px solid #1681cb;outline-offset:3px}
.header-destinations{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px 10px;max-width:100%;vertical-align:middle}
