/* リンクバナー工房 — ホームページ黎明期の個人サイト × Win98 の工房ウィンドウ */

:root {
  --navy: #000080;
  --blue: #1084d0;
  --gray: #c0c0c0;
  --gray-d: #808080;
  --ink: #1a1a1a;
  --link: #0000ee;
  --visited: #551a8b;
  --paper: #ffffff;
  --cream: #ffffe6;
  --pink: #ff3399;
  --dot: "DotGothic16", "MS Gothic", "Osaka-Mono", monospace;
  --body: "MS PGothic", "ＭＳ Ｐゴシック", "Osaka", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --bevel-out: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --bevel-in: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
  --field: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0;
  color: var(--ink);
  font: 14px/1.75 var(--body);
  /* 壁紙：水色に、ドットの星と十字を散らしたタイル */
  background-color: #dbe7ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' shape-rendering='crispEdges'%3E%3Cg fill='%23ffffff'%3E%3Crect x='8' y='6' width='2' height='6'/%3E%3Crect x='6' y='8' width='6' height='2'/%3E%3Crect x='34' y='30' width='2' height='2'/%3E%3Crect x='30' y='8' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%23fff3a6'%3E%3Crect x='36' y='14' width='2' height='6'/%3E%3Crect x='34' y='16' width='6' height='2'/%3E%3Crect x='14' y='36' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%23ffc6e6'%3E%3Crect x='20' y='26' width='2' height='2'/%3E%3Crect x='42' y='40' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 48px 48px;
}
img, canvas { image-rendering: pixelated; }
a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: #ff0000; }

.skip { position: absolute; left: -9999px; top: 0; background: #ffff00; padding: 6px 10px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.page {
  max-width: 1000px;
  margin: 14px auto;
  background: var(--paper);
  border: 3px ridge #b9c9f0;
  box-shadow: 4px 4px 0 rgba(0, 0, 128, .25);
}

/* ---------- 上の看板 ---------- */
.marquee { background: var(--navy); color: #ffff66; font: 13px/1 var(--dot); overflow: hidden; white-space: nowrap; padding: 7px 0; border-bottom: 2px solid #ffff66; }
.marquee-in { display: inline-flex; animation: marquee 48s linear infinite; }
.marquee-in span { padding-right: 3em; }
@keyframes marquee { to { transform: translateX(-50%); } }

.mast-body {
  text-align: center;
  padding: 20px 16px 16px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.0) 0 3px, rgba(255,255,255,.55) 3px 4px),
    linear-gradient(180deg, #fff0fa 0%, #e8f0ff 100%);
  border-bottom: 3px double #9999cc;
}
.mast-pre { margin: 0 0 4px; font: 13px var(--dot); color: #333399; }
.logo { margin: 0; line-height: 1.1; }
.logo-row { display: inline-flex; align-items: center; gap: clamp(8px, 1.6vw, 14px); max-width: 100%; }
.logo-pre {
  flex: none;
  padding: .28em .5em .2em .62em;
  font: clamp(15px, 3.4vw, 26px)/1 var(--dot);
  letter-spacing: .12em;
  color: #fff;
  background: var(--navy);
  box-shadow: 3px 3px 0 #cc00cc;
}
.logo-ja {
  position: relative;
  display: inline-block;
  font: clamp(28px, 7vw, 54px)/1.15 var(--dot);
  white-space: nowrap;
  letter-spacing: .04em;
  color: transparent;
  background: linear-gradient(90deg, #ff0040, #ff8a00, #ffd400, #19c419, #00a0ff, #5a3cff, #d400ff, #ff0040);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbow 6s linear infinite;
}
.logo-ja::before {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; z-index: -1;
  color: var(--navy);
  transform: translate(3px, 3px);
  -webkit-text-stroke: 0;
}
@keyframes rainbow { to { background-position: 200% 0; } }
.logo-en { display: block; margin-top: 8px; font: 10px/1.4 "Press Start 2P", var(--dot); color: #cc00cc; letter-spacing: .12em; }
.mast-lead { margin: 12px auto 10px; max-width: 40em; font-size: 14px; }
.mast-lead span { display: inline-block; }

.counter { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font: 13px var(--dot); }
.odo { display: inline-flex; gap: 2px; }
.odo i {
  font: 18px/1 var(--dot);
  font-style: normal;
  color: #7dff7d;
  background: linear-gradient(180deg, #111 0 48%, #000 52% 100%);
  border: 1px solid #555;
  padding: 3px 3px 2px;
  min-width: 1.15em;
  text-align: center;
}
.mast-tools { margin-top: 10px; }

.new { display: inline-block; font: 9px/1 "Press Start 2P", monospace; color: #ff0000; background: #ffff00; padding: 3px 3px 2px; vertical-align: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- 2段組み ---------- */
.cols { display: grid; grid-template-columns: 180px minmax(0, 1fr); }
.menu {
  background: var(--cream);
  border-right: 2px dotted #c9b26b;
  padding: 14px 12px;
  font-size: 13.5px;
}
.menu-title { margin: 0 0 8px; font: 11px/1 "Press Start 2P", var(--dot); color: #fff; background: #cc3366; padding: 7px 8px 6px; text-align: center; letter-spacing: .1em; }
.menu-in { position: sticky; top: 12px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { margin: 0 0 4px; padding-left: 1.1em; position: relative; }
.menu li::before { content: "■"; position: absolute; left: 0; color: #cc3366; font-size: 11px; top: 2px; }
.menu li:nth-child(3n+2)::before { color: #3366cc; }
.menu li:nth-child(3n)::before { color: #33aa33; }
.menu-env { margin: 16px 0 0; font-size: 11.5px; color: #775; line-height: 1.6; }

.main { padding: 16px; min-width: 0; }

/* ---------- Win98 のウィンドウ ---------- */
.win { background: var(--gray); box-shadow: var(--bevel-out); padding: 3px; }
.win-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(90deg, var(--navy), var(--blue));
  color: #fff; padding: 3px 4px 3px 8px;
}
.win-title h2 { margin: 0; font: bold 13px/1.4 var(--body); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-ctrl { display: flex; gap: 2px; }
.win-ctrl i, .win-close {
  display: inline-grid; place-items: center;
  width: 18px; height: 16px; font: bold 11px/1 var(--body); font-style: normal;
  color: #000; background: var(--gray); box-shadow: var(--bevel-out);
}
.win-close { width: 30px; height: 26px; border: 0; font-size: 15px; cursor: pointer; padding: 0; }
.win-close:active { box-shadow: var(--bevel-in); }
.win-body { padding: 10px; }

.b98 {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 4px 14px;
  font: 14px/1.2 var(--dot);
  color: #000; background: var(--gray);
  border: 0; box-shadow: var(--bevel-out);
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a.b98, a.b98:visited, a.b98:hover { color: #000; }
.b98:active:not(:disabled), .b98[aria-pressed="false"] { box-shadow: var(--bevel-in); }
.b98[aria-pressed="false"] { color: #555; }
.b98:disabled { color: #808080; text-shadow: 1px 1px #fff; cursor: default; }
.b98:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.b98-main { outline: 1px solid #000; outline-offset: 0; font-weight: bold; }
.b98-main:focus-visible { outline: 1px solid #000; box-shadow: var(--bevel-out), inset 0 0 0 4px var(--gray), inset 0 0 0 5px #000; }

/* ---------- 見本（プレビュー） ---------- */
.stage { background: var(--gray); padding-bottom: 8px; }
@media (min-height: 600px) {
  .stage { position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 0 var(--gray); }
}
.stage-view {
  position: relative;
  display: grid; place-items: center;
  min-height: 112px;
  padding: 14px;
  box-shadow: var(--field);
  overflow: hidden;
}
.stage-view[data-bgmode="tile"] { background: #dbe7ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%23ffffff'/%3E%3Crect width='8' height='8' fill='%23eeeeff'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23eeeeff'/%3E%3C/svg%3E"); }
.stage-view[data-bgmode="white"] { background: #fff; }
.stage-view[data-bgmode="black"] { background: #000; }
.stage-inner { line-height: 0; }
.stage-inner img, .stage-inner canvas { display: block; }
.stage-busy { position: absolute; right: 6px; bottom: 5px; font: 11px/1 var(--dot); background: #ffffe1; border: 1px solid #000; padding: 3px 5px; }
.stage-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; margin: 6px 2px 0; }
.stage-info { margin: 0; font: 12px/1.5 var(--dot); color: #222; }
.stage-opts { display: flex; gap: 10px; font-size: 12.5px; }
.stage-opts select { font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.actions .b98-main { margin-left: auto; }

/* ---------- タブ ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 10px 0 0; padding: 0 2px; position: relative; z-index: 1; }
.tabs [role="tab"] {
  font: 13.5px/1 var(--dot);
  color: #000; background: var(--gray);
  border: 0; padding: 8px 10px 7px; margin-top: 3px;
  box-shadow: inset 1px 1px #fff, inset -1px 0 #0a0a0a, inset -2px 0 #808080, inset 2px 2px #dfdfdf;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tabs [role="tab"][aria-selected="true"] { margin-top: 0; padding-bottom: 10px; margin-bottom: -2px; position: relative; z-index: 2; font-weight: bold; }
.tabs [role="tab"]:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.pane { box-shadow: var(--bevel-out); padding: 12px; background: var(--gray); }

.grp { border: 0; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #808080, inset 2px 2px #fff; margin: 0 0 12px; padding: 12px 12px 10px; min-width: 0; }
.grp legend { font: 13px var(--dot); padding: 0 4px; background: var(--gray); }
.grp:last-child { margin-bottom: 0; }
.hint { font-size: 12.5px; color: #333; margin: 6px 0; line-height: 1.6; }
.hint.center { text-align: center; }

.field { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0; font-size: 13.5px; }
.field > input[type="text"], .field > input[type="url"] { flex: 1 1 220px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 6px 0; }
.row .field { margin: 0; }
.check { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.color { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.range { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 4.5em; align-items: center; gap: 8px; margin: 4px 0; font-size: 13.5px; }
.range output { font: 12.5px var(--dot); text-align: right; }
.range input { width: 100%; accent-color: var(--navy); }

input[type="text"], input[type="url"], input[type="number"], select, textarea {
  font: 15px/1.3 var(--body);
  color: #000; background: #fff;
  border: 0; border-radius: 0;
  box-shadow: var(--field);
  padding: 6px 7px;
  min-height: 32px;
}
input[type="number"] { width: 5.5em; }
select { padding-right: 4px; max-width: 100%; }
textarea { width: 100%; font: 13px/1.6 "MS Gothic", "Osaka-Mono", ui-monospace, monospace; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
input[type="color"] { width: 44px; height: 30px; padding: 2px; border: 0; background: var(--gray); box-shadow: var(--field); cursor: pointer; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-name { display: inline-flex; align-items: center; gap: 2px; flex: 1 1 240px; }
.file-name input { flex: 1 1 auto; min-width: 0; width: 100%; }
.file-name span { font: 13px var(--dot); white-space: nowrap; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.seg button { font: 13.5px/1 var(--dot); min-height: 34px; padding: 4px 14px; color: #000; background: var(--gray); border: 0; box-shadow: var(--bevel-out); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.seg button[aria-pressed="true"] { box-shadow: var(--bevel-in); background: #d8d8d8 repeating-conic-gradient(#c0c0c0 0 25%, #e8e8e8 0 50%) 0 0 / 2px 2px; font-weight: bold; }

/* テンプレ・サイズ・アイコンの一覧 */
.tpl-filter { margin: 2px 0 10px; }
.tpl-filter button { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tpl-grid[data-wide="1"] { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tpl-grid[data-wider="1"] { grid-template-columns: 1fr; }
.tpl {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 8px; min-width: 0;
  font: 12.5px/1.2 var(--dot); color: #000;
  background: var(--gray); border: 0; box-shadow: var(--bevel-out); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tpl canvas { max-width: 100%; height: auto; }
.tpl[aria-pressed="true"] { box-shadow: var(--bevel-in); background: #d4d4ff; }
.tpl:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.size-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  min-height: 74px; padding: 8px 6px;
  font: 12.5px/1.25 var(--dot); color: #000;
  background: var(--gray); border: 0; box-shadow: var(--bevel-out); cursor: pointer;
}
.size-btn i { display: block; background: #fff; border: 1px solid #000; box-shadow: 2px 2px 0 #808080; }
.size-btn[aria-pressed="true"] { box-shadow: var(--bevel-in); background: #d4d4ff; }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin: 4px 0 6px; }
.icon-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; font: 11.5px/1.1 var(--dot); color: #000; background: var(--gray); border: 0; box-shadow: var(--bevel-out); cursor: pointer; }
.icon-btn[aria-pressed="true"] { box-shadow: var(--bevel-in); background: #d4d4ff; }

.zip-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 10px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
.book-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 8px; background: var(--gray); box-shadow: var(--bevel-out); min-width: 0; }
.book-item img { max-width: 100%; height: auto; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Crect width='8' height='8' fill='%23ffffff'/%3E%3Crect width='4' height='4' fill='%23dddddd'/%3E%3Crect x='4' y='4' width='4' height='4' fill='%23dddddd'/%3E%3C/svg%3E"); }
.book-cap { margin: 0; font: 12px/1.4 var(--dot); text-align: center; word-break: break-all; }
.book-item .row { margin: 0; justify-content: center; }
.book-item .b98 { min-height: 30px; padding: 3px 12px; font-size: 13px; }

/* ---------- ページの各セクション ---------- */
.sec { margin: 26px 0 0; padding-top: 18px; border-top: 4px solid; border-image: linear-gradient(90deg, #ff0040, #ff8a00, #ffd400, #19c419, #00a0ff, #5a3cff, #d400ff) 1; }
.bar {
  margin: 0 0 12px;
  font: 17px/1.4 var(--dot);
  color: var(--navy);
  text-align: center;
  background: #e2e2ff;
  border-top: 1px dashed #6666cc;
  border-bottom: 1px dashed #6666cc;
  padding: 6px 8px;
}
.sec p { margin: 8px 0; }

.linklist {
  background: #fffff0;
  border: 1px solid #ccc;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--cell, 110px), 1fr));
  gap: 14px 10px;
  justify-items: center;
}
.linklist figure { margin: 0; text-align: center; font-size: 12px; line-height: 1.4; min-width: 0; }
.linklist figcaption { margin-top: 4px; color: var(--link); text-decoration: underline; word-break: break-all; }
.linklist .mine figcaption { color: #cc0000; text-decoration: none; font: 12px var(--dot); }
.linklist .mine { position: relative; }
.linklist canvas, .linklist img { display: block; margin: 0 auto; max-width: 100%; height: auto; }

.tagform { background: #f4f4f4; border: 1px solid #ccc; padding: 12px; }
.tagform textarea { margin-top: 8px; }

.steps { margin: 0; padding-left: 1.6em; }
.steps li { margin: 0 0 8px; }
.faq { margin: 0; }
.faq dt { font-weight: bold; color: #000080; margin-top: 12px; }
.faq dt::before { content: "Q. "; color: #cc0000; font-family: var(--dot); }
.faq dd { margin: 4px 0 0 1.6em; }
.faq dd::before { content: "A. "; margin-left: -1.6em; color: #009900; font-family: var(--dot); }
.history .date { font: 13px var(--dot); color: #006600; }
.sister { font: 16px/1.6 var(--dot); }
.sister a::before { content: "▶ "; color: #cc3366; }
.linkus { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; margin: 10px 0; }
.linkus figure { margin: 0; text-align: center; }
.linkus figcaption { font: 11px var(--dot); color: #666; margin-top: 4px; }
.disclaimer ul { margin: 0; padding-left: 1.3em; font-size: 13px; }
.disclaimer li { margin: 0 0 6px; }
.back-top { text-align: right; margin: 24px 0 0; font-size: 13px; }

.pagefoot { text-align: center; font-size: 12px; color: #555; padding: 18px 12px 22px; border-top: 3px double #9999cc; background: #f6f6ff; line-height: 2.1; }
.pagefoot a { color: #333399; }
.pagefoot a:visited { color: #333399; }
.pagefoot nav span { margin: 0 8px; color: #aaa; }
.pagefoot .op { margin: 2px 0 0; }

/* ---------- 保存モーダル ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 64, .45);
  overflow-y: auto; overscroll-behavior: contain;
  padding: max(24px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
  opacity: 0; transition: opacity .16s ease;
}
.modal.show { opacity: 1; }
.modal-card { max-width: 520px; margin: 0 auto; transform: translateY(10px); transition: transform .18s ease; }
.modal.show .modal-card { transform: none; }
.modal-card:focus { outline: none; }
.modal-img { display: grid; place-items: center; padding: 18px 10px; box-shadow: var(--field); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%23ffffff'/%3E%3Crect width='8' height='8' fill='%23eeeeff'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23eeeeff'/%3E%3C/svg%3E"); }
.modal-img img { max-width: 100%; height: auto; -webkit-touch-callout: default; user-select: auto; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.modal-actions .b98 { min-width: 9em; min-height: 42px; }
body.lock { overflow: hidden; }

.toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #ffffe1; border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0,0,0,.3);
  font: 13px/1.5 var(--dot); padding: 6px 12px; max-width: calc(100vw - 32px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* キラキラカーソル */
.spark { position: fixed; z-index: 70; pointer-events: none; font: 14px/1 var(--body); animation: spark .8s ease-out forwards; }
@keyframes spark { to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3) rotate(90deg); } }

.noscript { background: #ffff00; padding: 10px; text-align: center; margin: 0; }

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  .page { margin: 0; border-width: 0; box-shadow: none; }
  .cols { display: block; }
  .menu { border-right: 0; border-bottom: 2px dotted #c9b26b; padding: 10px 12px; }
  .menu-title { display: none; }
  .menu-in { position: static; }
  .menu ul { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .menu li { margin: 0; }
  .menu-env { display: none; }
  .main { padding: 12px; }
  .win-body { padding: 6px; }
  .pane { padding: 8px; }
  .grp { padding: 10px 8px 8px; }
  .tabs [role="tab"] { padding: 9px 8px 8px; font-size: 13px; }
  .range { grid-template-columns: 5.6em minmax(0, 1fr) 3.6em; }
  .actions .b98 { flex: 1 1 auto; padding: 4px 8px; }
  .actions .b98-main { flex-basis: 100%; margin-left: 0; order: -1; min-height: 40px; }
  .stage-view { min-height: 90px; padding: 10px; }
}
@media (max-width: 760px) and (min-height: 600px) {
  .stage { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-in, .logo-ja, .new { animation: none; }
  .modal, .modal-card, .toast { transition: none; }
}
