/* Ugly Within Game Wiki: the Kamata floor plan.
   Lit lantern = official, half = seen or reported, dark = not announced. */
:root {
  --bg: #140d0c;
  --panel: #1c1311;
  --panel-2: #271b18;
  --line: #3d2d28;
  --ink: #ece5d5;
  --ink-2: #bcb19f;
  --red: #c23a30;
  --red-2: #f0877a;
  --amber: #f2b44e;
  --amber-dim: #9a7335;
  --ash: #756b5d;
  --serif: ui-serif, "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Songti SC", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans CJK JP", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; background: var(--bg); }
body.uw {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.uw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.uw-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: var(--bg); padding: 8px 14px; font-weight: 700; }
.uw-skip:focus { top: 12px; }
.uw-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.uw-main { min-height: 60vh; }

/* ---------- lanterns ---------- */
.uw-lamp {
  display: inline-block; flex: none; vertical-align: -2px;
  width: 11px; height: 15px; margin-right: 8px;
  border: 2px solid var(--amber); border-radius: 5px 5px 6px 6px;
}
.uw-lamp--lit { background: var(--amber); box-shadow: 0 0 9px 1px var(--amber-dim); }
.uw-lamp--half { background: linear-gradient(to top, var(--amber) 50%, var(--bg) 50%); border-color: var(--amber-dim); }
.uw-lamp--dark { background: var(--bg); border-color: var(--ash); }

/* source badges, added by script to table cells that say Official / Seen / Press / Not announced */
.uw-src { display: inline-flex; align-items: center; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.uw-src::before { content: ""; width: 10px; height: 14px; margin-right: 7px; border: 2px solid var(--amber); border-radius: 5px 5px 6px 6px; background: var(--amber); }
.uw-src--seen::before, .uw-src--press::before { background: linear-gradient(to top, var(--amber) 50%, var(--bg) 50%); border-color: var(--amber-dim); }
.uw-src--none { color: var(--ink-2); }
.uw-src--none::before { background: var(--bg); border-color: var(--ash); }

/* ---------- top bar and the floor-plan nav ---------- */
.uw-top { position: sticky; top: 0; z-index: 40; background: var(--panel); border-bottom: 1px solid var(--line); }
.uw-top-in { max-width: var(--wrap); margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 22px; }
.uw-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.uw-brand:hover { color: var(--amber); }
.uw-brand-lamp { fill: var(--amber); stroke: var(--bg); stroke-width: 1.4; }
.uw-brand-lamp rect:first-child, .uw-brand-lamp rect:last-child { fill: var(--ink-2); }
.uw-brand-lamp path { fill: none; }
.uw-brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.01em; line-height: 1.15; }
.uw-madori { display: flex; gap: 4px; flex: 1; justify-content: center; }
.uw-room {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 96px; padding: 5px 12px 6px; line-height: 1.2; text-decoration: none; text-align: center;
  color: var(--ink-2); background: var(--panel-2); border: 2px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 50% 50%;
}
.uw-room:hover { color: var(--ink); border-color: var(--amber-dim); }
.uw-room[aria-current] { color: var(--bg); background-color: var(--amber); background-image: none; border-color: var(--amber); }
.uw-room-kanji { font-family: var(--serif); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.12em; }
.uw-room-name { font-size: 0.75rem; letter-spacing: 0.02em; }
[data-room="release"] > .uw-room-kanji::before { content: "玄関"; }
[data-room="story"] > .uw-room-kanji::before { content: "座敷"; }
[data-room="gameplay"] > .uw-room-kanji::before { content: "廊下"; }
[data-room="studio"] > .uw-room-kanji::before { content: "蔵"; }

.uw-find { position: relative; flex: none; width: 230px; }
.uw-find input {
  width: 100%; font: inherit; font-size: 0.9375rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px; padding: 8px 12px;
}
.uw-find input::placeholder { color: var(--ink-2); opacity: 1; }
.uw-find input:focus { outline: none; border-color: var(--amber); }
.uw-hits {
  position: absolute; right: 0; top: calc(100% + 6px); width: min(420px, 92vw); max-height: 70vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--amber-dim); box-shadow: 0 18px 40px var(--bg);
}
.uw-hits a { display: block; padding: 10px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.uw-hits a:hover, .uw-hits a[data-on] { background: var(--panel-2); color: var(--amber); }
.uw-hit-t { display: block; font-weight: 600; line-height: 1.35; }
.uw-hit-m { display: block; font-size: 0.8125rem; color: var(--ink-2); }
.uw-hit-note { margin: 0; padding: 12px 14px; color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- type ---------- */
.uw-h1, .uw-h2, .uw-prose h2, .uw-prose h3, .uw-prose h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; letter-spacing: 0.005em; }
.uw-h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin: 0 0 14px; font-weight: 700; }
.uw-h1--hero { font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 1.12; }
.uw-h2 { font-size: 1.5rem; margin: 0 0 18px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.uw-h2::before { content: ""; width: 10px; height: 10px; background: var(--red); transform: rotate(45deg); flex: none; }
.uw-lede { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 0 0 22px; }
.uw-eyebrow, .uw-roomtag { font-family: var(--serif); font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin: 0 0 10px; }
.uw-roomtag .uw-room-kanji { font-size: 1.1rem; margin-right: 10px; }
.uw-stamp { font-size: 0.875rem; color: var(--ink-2); margin: 0 0 6px; }

.uw-btn {
  display: inline-block; margin: 0 10px 10px 0; padding: 11px 22px; font-weight: 700; text-decoration: none;
  color: var(--ink); background: var(--panel-2); border: 2px solid var(--line);
}
.uw-btn:hover { color: var(--amber); border-color: var(--amber-dim); }
.uw-btn--lit { color: var(--bg); background: var(--amber); border-color: var(--amber); }
.uw-btn--lit:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.uw-actions { margin: 0 0 20px; }

/* ---------- home: hero and status board ---------- */
.uw-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); }
.uw-hero::after {
  content: "醜イ"; position: absolute; right: 2%; top: -6%; z-index: 0;
  writing-mode: vertical-rl; font-family: var(--serif); font-weight: 900; line-height: 1;
  font-size: clamp(9rem, 26vw, 21rem); color: var(--ink); opacity: 0.045; pointer-events: none; user-select: none;
}
.uw-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: start; padding-top: 64px; padding-bottom: 56px; }
.uw-key { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.875rem; color: var(--ink-2); }
.uw-key li { display: flex; align-items: center; }

.uw-board { background: var(--panel); border: 2px solid var(--line); border-top: 4px solid var(--amber); padding: 18px 20px 8px; }
.uw-board-title { font-family: var(--serif); font-size: 1.0625rem; margin: 0 0 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.uw-board-list { list-style: none; margin: 0; padding: 0; }
.uw-board-row { display: grid; grid-template-columns: 22px 108px 1fr; align-items: baseline; gap: 4px 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.45; }
.uw-board-row .uw-lamp { margin: 0; align-self: center; }
.uw-board-k { color: var(--ink-2); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }
.uw-board-v { color: var(--ink); }

/* ---------- home: bands, floor plan, hall ---------- */
.uw-band { padding-top: 52px; padding-bottom: 8px; }
.uw-plan { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.uw-plan-room {
  position: relative; grid-column: span 6; padding: 22px 24px 18px; background: var(--panel);
  border: 3px solid var(--line); transition: border-color 0.18s, background-color 0.18s;
}
.uw-plan-room:nth-child(1) { grid-column: 1 / 8; }
.uw-plan-room:nth-child(2) { grid-column: 8 / 13; }
.uw-plan-room:nth-child(3) { grid-column: 1 / 6; }
.uw-plan-room:nth-child(4) { grid-column: 6 / 13; }
.uw-plan-room::after { content: ""; position: absolute; width: 38px; height: 5px; background: var(--bg); right: 28px; bottom: -4px; }
.uw-plan-room:nth-child(2n)::after { right: auto; left: 28px; top: -4px; bottom: auto; }
.uw-plan-room::before {
  position: absolute; right: 16px; top: 8px; font-family: var(--serif); font-weight: 900; font-size: 3.2rem; line-height: 1;
  color: var(--ink); opacity: 0.07; letter-spacing: 0.04em; pointer-events: none;
}
.uw-plan-room[data-room="release"]::before { content: "玄関"; }
.uw-plan-room[data-room="story"]::before { content: "座敷"; }
.uw-plan-room[data-room="gameplay"]::before { content: "廊下"; }
.uw-plan-room[data-room="studio"]::before { content: "蔵"; }
.uw-plan-room:hover, .uw-plan-room:focus-within { border-color: var(--amber-dim); background: var(--panel-2); box-shadow: inset 0 0 36px var(--bg); }
.uw-plan-name { font-family: var(--serif); font-size: 1.375rem; margin: 0 0 2px; line-height: 1.25; }
.uw-plan-name a { color: var(--ink); text-decoration: none; }
.uw-plan-name a:hover { color: var(--amber); }
.uw-plan-count { margin: 0 0 10px; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.uw-plan-text { margin: 0 0 12px; color: var(--ink-2); font-size: 0.9688rem; line-height: 1.55; }
.uw-plan-list { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.uw-plan-list li { padding: 5px 0 5px 16px; border-top: 1px dashed var(--line); position: relative; line-height: 1.4; }
.uw-plan-list li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 6px; height: 6px; background: var(--red); }

.uw-hall { list-style: none; counter-reset: door; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--line); border-left: 2px solid var(--line); }
.uw-hall-door { counter-increment: door; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); background: var(--panel); }
.uw-hall-door a { position: relative; display: block; height: 100%; padding: 18px 20px 18px 66px; text-decoration: none; color: var(--ink); }
.uw-hall-door a::before { content: counter(door, decimal-leading-zero); position: absolute; left: 18px; top: 14px; font-family: var(--serif); font-size: 1.75rem; font-weight: 700; color: var(--amber-dim); line-height: 1; }
.uw-hall-door a:hover { background: var(--panel-2); }
.uw-hall-door a:hover .uw-hall-title { color: var(--amber); }
.uw-hall-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.125rem; line-height: 1.3; margin-bottom: 4px; }
.uw-hall-text { display: block; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- ledger rows (lists of pages) ---------- */
.uw-ledger { list-style: none; counter-reset: row; margin: 0 0 8px; padding: 0; border-top: 2px solid var(--line); }
.uw-row { counter-increment: row; border-bottom: 1px solid var(--line); }
.uw-row-link {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px;
  padding: 16px 12px 16px 56px; text-decoration: none; color: var(--ink);
}
.uw-row-link::before { content: counter(row, decimal-leading-zero); position: absolute; left: 10px; top: 17px; font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--amber-dim); }
.uw-row-link:hover { background: var(--panel); }
.uw-row-title { grid-column: 1; font-family: var(--serif); font-weight: 700; font-size: 1.125rem; line-height: 1.35; }
.uw-row-link:hover .uw-row-title { color: var(--amber); }
.uw-row-sum { grid-column: 1; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.5; }
.uw-row-date { grid-column: 2; grid-row: 1; font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; align-self: start; padding-top: 4px; }

/* ---------- room pages (section lists) ---------- */
.uw-roompage { padding-top: 26px; padding-bottom: 56px; }
.uw-roomhead { position: relative; padding: 18px 0 18px; margin-bottom: 20px; border-bottom: 3px solid var(--line); }
.uw-roomhead[data-room]::after {
  position: absolute; right: 0; top: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(4rem, 12vw, 7.5rem); line-height: 1;
  color: var(--ink); opacity: 0.06; pointer-events: none; letter-spacing: 0.05em;
}
.uw-roomhead[data-room="release"]::after { content: "玄関"; }
.uw-roomhead[data-room="story"]::after { content: "座敷"; }
.uw-roomhead[data-room="gameplay"]::after { content: "廊下"; }
.uw-roomhead[data-room="studio"]::after { content: "蔵"; }
.uw-roomintro { margin-bottom: 24px; max-width: 760px; }
.uw-finder { margin: 6px 0 22px; }
.uw-finder input { width: 100%; max-width: 420px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); padding: 9px 14px; }
.uw-finder input::placeholder { color: var(--ink-2); opacity: 1; }
.uw-finder input:focus { outline: none; border-color: var(--amber); }
.uw-group { margin-bottom: 30px; }

/* ---------- article sheet ---------- */
.uw-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 0.875rem; margin: 0 0 20px; color: var(--ink-2); }
.uw-trail a { color: var(--ink-2); }
.uw-trail a:hover { color: var(--amber); }
.uw-trail i { font-style: normal; color: var(--ash); }
.uw-trail span { color: var(--ink); }
.uw-doc { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0 52px; padding-top: 28px; padding-bottom: 64px; align-items: start; }
.uw-sheet { grid-column: 2; grid-row: 1; min-width: 0; }
.uw-rail { grid-column: 1; grid-row: 1; position: sticky; top: 92px; align-self: start; font-size: 0.9375rem; }
.uw-plain { max-width: 820px; padding-top: 28px; padding-bottom: 64px; }
.uw-sheet-head { margin-bottom: 20px; }
.uw-cover { margin: 0 0 26px; border: 2px solid var(--line); background: var(--panel); }
.uw-cover img { width: 100%; }

.uw-strip { margin: 0 0 26px; background: var(--panel); border: 2px solid var(--line); border-left: 6px solid var(--red); padding: 14px 20px 6px; }
.uw-strip-title { font-family: var(--serif); font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin: 0 0 6px; }
.uw-strip dl { margin: 0; }
.uw-strip-row { display: grid; grid-template-columns: 22px 150px 1fr; align-items: baseline; gap: 2px 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.9688rem; line-height: 1.5; }
.uw-strip-row:first-child { border-top: 0; }
.uw-strip-row .uw-lamp { margin: 0; align-self: center; }
.uw-strip-row dt { grid-column: 2; color: var(--ink-2); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }
.uw-strip-row dd { grid-column: 3; margin: 0; }
.uw-strip-row dt:first-child { grid-column: 1 / 3; }

.uw-verdict { margin: 0 0 28px; padding: 16px 22px; background: var(--panel-2); border-left: 4px solid var(--amber); }
.uw-verdict p { margin: 0; }
.uw-verdict-label { font-family: var(--serif); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 4px !important; }

/* ---------- prose ---------- */
.uw-prose { max-width: 70ch; }
.uw-home-text .uw-prose { max-width: 78ch; }
.uw-prose > :first-child { margin-top: 0; }
.uw-prose p { margin: 0 0 1.1em; }
.uw-prose h2 { font-size: 1.55rem; margin: 2.1em 0 0.6em; padding-top: 0.9em; border-top: 2px solid var(--line); display: flex; align-items: baseline; gap: 12px; }
.uw-prose h2::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--red); transform: rotate(45deg) translateY(-1px); }
.uw-prose h3 { font-size: 1.25rem; margin: 1.7em 0 0.5em; }
.uw-prose h4 { font-size: 1.0625rem; margin: 1.5em 0 0.4em; }
.uw-prose ul, .uw-prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.uw-prose li { margin-bottom: 0.4em; }
.uw-prose li::marker { color: var(--amber-dim); }
.uw-prose strong { color: var(--ink); }
.uw-prose blockquote { margin: 1.4em 0; padding: 4px 20px; border-left: 3px solid var(--red); color: var(--ink-2); }
.uw-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.uw-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--panel-2); padding: 2px 6px; }
.uw-prose img { border: 2px solid var(--line); margin: 1.4em 0 0.4em; }
.uw-prose em { color: var(--ink); }
.uw-scroll { overflow-x: auto; margin: 1.4em 0; border: 2px solid var(--line); background: var(--panel); }
.uw-prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.9688rem; line-height: 1.5; }
.uw-prose th, .uw-prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.uw-prose th { background: var(--panel-2); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); white-space: nowrap; }
.uw-prose tr:last-child td { border-bottom: 0; }
.uw-prose td:first-child { color: var(--ink); font-weight: 600; }
.uw-fine { font-size: 1rem; }

.uw-faq { margin-top: 44px; max-width: 70ch; }
.uw-faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.uw-faq details:last-child { border-bottom: 1px solid var(--line); }
.uw-faq summary { cursor: pointer; padding: 10px 28px 10px 0; font-family: var(--serif); font-weight: 700; font-size: 1.0625rem; list-style: none; position: relative; }
.uw-faq summary::-webkit-details-marker { display: none; }
.uw-faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; color: var(--amber); font-size: 1.4rem; line-height: 1; }
.uw-faq details[open] summary::after { content: "−"; }
.uw-faq summary:hover { color: var(--amber); }
.uw-faq p { margin: 0 0 14px; color: var(--ink-2); }
.uw-next { margin-top: 48px; }

/* ---------- side rail ---------- */
.uw-rail-title { font-family: var(--serif); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin: 0 0 8px; }
.uw-toc { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.uw-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.uw-toc li { counter-increment: toc; margin: 0; }
.uw-toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.uw-toc a:hover { color: var(--ink); border-left-color: var(--amber-dim); }
.uw-toc a[data-on] { color: var(--amber); border-left-color: var(--amber); }
.uw-toc .uw-toc-sub a { padding-left: 26px; font-size: 0.875rem; }
.uw-rail-key ul { list-style: none; margin: 0; padding: 0; color: var(--ink-2); }
.uw-rail-key li { display: flex; align-items: center; padding: 3px 0; font-size: 0.875rem; }

/* ---------- footer: door plates ---------- */
.uw-foot { margin-top: 72px; background: var(--panel); border-top: 3px solid var(--line); }
.uw-foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding-top: 36px; padding-bottom: 20px; }
.uw-foot-name { font-family: var(--serif); font-weight: 700; font-size: 1.1875rem; margin: 0 0 8px; }
.uw-foot-note { margin: 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; max-width: 44ch; }
.uw-foot-col { display: flex; flex-direction: column; gap: 6px; font-size: 0.9688rem; }
.uw-foot-col a { color: var(--ink-2); text-decoration: none; width: fit-content; }
.uw-foot-col a:hover { color: var(--amber); text-decoration: underline; }
.uw-foot-head { font-family: var(--serif); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin: 0 0 6px; }
.uw-foot-copy { margin-top: 0; margin-bottom: 0; padding-top: 14px; padding-bottom: 26px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); }

.uw-lost { padding-top: 72px; }

/* ---------- narrow screens ---------- */
@media (max-width: 960px) {
  .uw-top-in { flex-wrap: wrap; gap: 10px 16px; }
  .uw-madori { order: 3; flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .uw-find { margin-left: auto; width: 210px; }
  .uw-hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; }
  .uw-doc { grid-template-columns: minmax(0, 1fr); }
  .uw-sheet { grid-column: 1; grid-row: 2; }
  .uw-rail { grid-column: 1; grid-row: 1; position: static; margin-bottom: 22px; }
  .uw-toc { display: none; }
  .uw-hall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uw-foot-in { grid-template-columns: 1fr 1fr; }
  .uw-foot-plate { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body.uw { font-size: 1rem; }
  .uw-wrap { padding: 0 18px; }
  .uw-top-in { padding: 8px 18px; }
  .uw-find { width: 100%; margin-left: 0; order: 2; flex: 1 0 100%; }
  .uw-madori { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow: visible; }
  .uw-room { min-width: 0; }
  .uw-plan { display: flex; flex-direction: column; gap: 14px; }
  .uw-plan-room { padding: 18px 18px 14px; }
  .uw-plan-room::after { display: none; }
  .uw-hall { grid-template-columns: 1fr; }
  .uw-board-row { grid-template-columns: 22px 1fr; }
  .uw-board-v { grid-column: 2; }
  .uw-strip-row { grid-template-columns: 22px 1fr; }
  .uw-strip-row dt, .uw-strip-row dd { grid-column: 2; }
  .uw-strip-row dt:first-child { grid-column: 1 / -1; }
  .uw-row-link { grid-template-columns: 1fr; padding-left: 46px; }
  .uw-row-date { grid-column: 1; grid-row: auto; padding-top: 2px; }
  .uw-foot-in { grid-template-columns: 1fr; }
  .uw-hits { right: auto; left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
