:root {
  --bg: #0d0b16;
  --bg2: #15121f;
  --panel: #1a1626;
  --panel2: #241e33;
  --panel3: #2e2742;
  --line: rgba(255, 214, 170, 0.12);
  --ink: #f6ead9;
  --muted: #b7a9c4;
  --orange: #ff7a1a;
  --orange2: #ffa23a;
  --glow: #ffcf6b;
  --green: #8dff7a;
  --purple: #9a6bff;
  --radius: 14px;
  --top-h: 56px;
  --panel-w: 340px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 500 15px/1.45 Outfit, "Segoe UI", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.35; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--orange); color: #111; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* icons */
[data-icon]::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
[data-icon="yards"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 4l9 7v9H3z'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E"); }
[data-icon="share"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 13.5 6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E"); }
[data-icon="photo"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v12H3z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E"); }
[data-icon="sound"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h4l5-4v14l-5-4H4z'/%3E%3Cpath d='m17 9 5 6M22 9l-5 6'/%3E%3C/svg%3E"); }
[data-icon="sound"][data-on="1"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h4l5-4v14l-5-4H4z'/%3E%3Cpath d='M17 8a5 5 0 0 1 0 8M19.5 5a9 9 0 0 1 0 14'/%3E%3C/svg%3E"); }
[data-icon="help"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.7.4-1 1-1 1.7M12 17h.01'/%3E%3C/svg%3E"); }
[data-icon="undo"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 0 12h-3'/%3E%3C/svg%3E"); }
[data-icon="redo"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 14 5-5-5-5'/%3E%3Cpath d='M20 9H10a6 6 0 0 0 0 12h3'/%3E%3C/svg%3E"); }

/* header */
.hy-top { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 0 124px; background: linear-gradient(180deg, #1a1426, #110e1a); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.hy-top h1 { margin: 0; font-size: 21px; font-weight: 700; white-space: nowrap; color: #ffe6c8; letter-spacing: 0.2px; }
.hy-h1-a { font-family: Creepster, Outfit, cursive; font-weight: 400; font-size: 27px; color: var(--orange2); letter-spacing: 1px; text-shadow: 0 0 16px rgba(255, 122, 26, 0.55); margin-right: 4px; }
.hy-top-actions { display: flex; gap: 8px; align-items: center; }

.hy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-weight: 600; white-space: nowrap; transition: transform 0.12s, background 0.2s, box-shadow 0.2s; }
.hy-btn:hover:not(:disabled) { background: var(--panel3); }
.hy-btn:active:not(:disabled) { transform: scale(0.97); }
.hy-btn.ghost { background: transparent; }
.hy-btn.ghost:hover { background: var(--panel2); }
.hy-btn.hot { background: linear-gradient(180deg, #ff9a3c, #f06a12); color: #1a0a00; border-color: transparent; box-shadow: 0 4px 18px rgba(255, 110, 20, 0.35); }
.hy-btn.hot:hover { background: linear-gradient(180deg, #ffad5a, #ff7a1a); }
.hy-btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.hy-btn.danger { color: #ffb0a0; }
.hy-icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); }
.hy-icon-btn:hover:not(:disabled) { background: var(--panel3); }
.hy-icon { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); }
.hy-icon:hover { background: var(--panel2); color: var(--ink); }

/* studio layout */
.hy-studio { display: grid; grid-template-columns: var(--panel-w) 1fr; height: calc(100svh - var(--top-h)); min-height: 520px; }
.hy-stage { position: relative; overflow: hidden; background: #05060c; }
#hy-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
.hy-panel { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.hy-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px 10px 0; }
.hy-tabs button { min-height: 40px; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.hy-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); background: var(--panel); }
.hy-tabpanel { flex: 1; overflow-y: auto; padding: 12px; background: var(--panel); border-top: 1px solid var(--line); scrollbar-width: thin; }

.hy-search input { width: 100%; min-height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); padding: 0 14px; }
.hy-chips { display: flex; gap: 6px; }
.hy-chips.scroll { overflow-x: auto; padding: 10px 0 8px; scrollbar-width: none; }
.hy-chips.scroll::-webkit-scrollbar { display: none; }
.hy-chips.wrap { flex-wrap: wrap; }
.hy-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); font-size: 14px; white-space: nowrap; }
.hy-chip:hover { background: var(--panel2); }
.hy-chip[aria-pressed="true"] { background: rgba(255, 122, 26, 0.18); border-color: var(--orange); color: #ffd9b0; }
.hy-chip i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: none; border: 1px solid rgba(255,255,255,0.2); }

.hy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.hy-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border-radius: 12px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 35%, #2c2442, var(--bg2) 75%); text-align: center; transition: transform 0.12s, border-color 0.2s; }
.hy-item:hover { border-color: rgba(255, 162, 58, 0.5); transform: translateY(-1px); }
.hy-item[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255, 122, 26, 0.35), 0 0 22px rgba(255, 122, 26, 0.25); }
.hy-item img { width: 72px; height: 72px; object-fit: contain; }
.hy-item span { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.hy-item small { font-size: 11px; color: var(--muted); }
.hy-count, .hy-empty { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 2px; }

.hy-field { margin-bottom: 16px; }
.hy-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.6px; }
.hy-range { display: grid; gap: 6px; margin-bottom: 16px; }
.hy-range span { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
input[type="range"] { width: 100%; accent-color: var(--orange); height: 28px; }
.hy-note { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.hy-note.small { font-size: 13px; margin-top: 12px; }

.hy-houses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hy-house { display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); text-align: center; }
.hy-house[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 122, 26, 0.1); }
.hy-house strong { font-size: 14px; }
.hy-house small { font-size: 12px; color: var(--muted); }
.hy-house-ico svg { width: 72px; height: 56px; fill: #3a3150; stroke: #6e5f8e; stroke-width: 1.5; }
.hy-house-ico svg .w { fill: var(--glow); stroke: none; }
.hy-house-ico svg .d { fill: #4b4064; }
.hy-house[aria-pressed="true"] .hy-house-ico svg { fill: #4a3a5e; stroke: var(--orange2); }

/* stage overlays */
.hy-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: radial-gradient(circle at 50% 40%, #1d1630, #07060c); z-index: 6; text-align: center; padding: 20px; }
.hy-loading small { color: var(--muted); }
.hy-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,162,58,0.2); border-top-color: var(--orange2); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hy-namebar { position: absolute; left: 12px; top: 12px; display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: rgba(13, 11, 22, 0.72); backdrop-filter: blur(8px); border: 1px solid var(--line); z-index: 3; max-width: min(60%, 320px); }
.hy-yard-name { border: 0; background: none; padding: 0; text-align: left; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hy-yard-name:hover { color: var(--orange2); }
#hy-save-status { font-size: 12px; color: var(--muted); }
.hy-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(13, 11, 22, 0.82); backdrop-filter: blur(8px); border: 1px solid rgba(255, 162, 58, 0.35); z-index: 4; max-width: calc(100% - 24px); font-size: 14px; }
.hy-hint[hidden] { display: none; }
.hy-hint, .hy-namebar, .hy-hud, .hy-toasts { pointer-events: none; }
.hy-hint button, .hy-namebar button { pointer-events: auto; }
.hy-inspector { position: absolute; right: 12px; top: 12px; width: 280px; padding: 12px; border-radius: 14px; background: rgba(20, 16, 30, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--line); z-index: 4; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.hy-inspector[hidden] { display: none; }
.hy-insp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hy-inspector .hy-chips { flex-wrap: wrap; margin-bottom: 12px; }
.hy-inspector .hy-range { margin-bottom: 10px; }
.hy-insp-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.hy-viewbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(13, 11, 22, 0.78); backdrop-filter: blur(10px); border: 1px solid var(--line); z-index: 4; }
.hy-seg { display: flex; background: var(--bg2); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.hy-seg button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 600; }
.hy-seg button[aria-pressed="true"] { background: var(--panel3); color: var(--ink); }
#hy-night[aria-pressed="true"] { background: linear-gradient(180deg, #8d6bff, #6a3ad8); color: #fff; box-shadow: 0 4px 18px rgba(140, 90, 255, 0.4); }

.hy-hud { position: absolute; right: 12px; top: 12px; display: none; gap: 4px; padding: 6px; border-radius: 14px; background: rgba(13, 11, 22, 0.78); backdrop-filter: blur(10px); border: 1px solid rgba(154, 107, 255, 0.35); z-index: 3; }
.hy-night .hy-hud { display: flex; }
.hy-hud div { display: grid; justify-items: center; min-width: 64px; padding: 4px 6px; }
.hy-hud b { font-size: 20px; color: var(--glow); line-height: 1.1; }
.hy-hud span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.hy-night .hy-inspector { top: 86px; }

.hy-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.hy-bubble { position: absolute; left: 0; top: 0; padding: 4px 10px; border-radius: 12px; background: #fff; color: #1a1020; font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.hy-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.hy-bubble.scream { background: #ffe14a; color: #3a0a00; font-size: 16px; }
.hy-bubble.scream::after { border-top-color: #ffe14a; }
.hy-bubble.treat { background: #ff9a3c; color: #1a0a00; }
.hy-bubble.treat::after { border-top-color: #ff9a3c; }
.hy-toasts { position: absolute; left: 12px; bottom: 78px; display: grid; gap: 6px; z-index: 3; pointer-events: none; }
.hy-toast { display: grid; grid-template-columns: auto auto; column-gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(20, 16, 30, 0.9); border: 1px solid rgba(255, 162, 58, 0.3); max-width: 300px; animation: pop 0.3s ease-out; transition: opacity 0.5s, transform 0.5s; }
.hy-toast.out { opacity: 0; transform: translateX(-12px); }
.hy-toast strong { font-size: 14px; }
.hy-stars { color: var(--glow); letter-spacing: 1px; text-align: right; }
.hy-toast em { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

.hy-pad { position: absolute; left: 22px; bottom: 82px; width: 120px; height: 120px; border-radius: 50%; background: rgba(13, 11, 22, 0.55); border: 2px solid rgba(255, 214, 170, 0.25); display: none; place-items: center; z-index: 4; touch-action: none; }
.hy-pad i { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 162, 58, 0.75); box-shadow: 0 0 18px rgba(255, 122, 26, 0.5); }
body[data-mode="walk"] .hy-pad { display: grid; }
@media (pointer: fine) { body[data-mode="walk"] .hy-pad { display: none; } }

/* dialogs */
.hy-dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.hy-dialog::backdrop { background: rgba(4, 3, 10, 0.7); backdrop-filter: blur(4px); }
.hy-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.hy-dialog h2 { margin: 0; font-size: 22px; }
#hy-start-title { font-family: Creepster, Outfit, cursive; font-weight: 400; font-size: 30px; color: var(--orange2); letter-spacing: 1px; }
#hy-start .hy-houses { grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; }
.hy-select { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.hy-select select { min-height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); padding: 0 12px; color: var(--ink); }
.hy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hy-row.end { justify-content: flex-end; }
.hy-yards-list { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 8px; max-height: 55svh; overflow-y: auto; }
.hy-yards-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.hy-yards-list li.current { border-color: rgba(255, 122, 26, 0.5); }
.hy-yards-list li > div:first-child { display: grid; min-width: 0; }
.hy-yards-list small { color: var(--muted); font-size: 12.5px; }
.hy-tag { font-size: 12px; color: var(--orange2); padding: 0 8px; }
.hy-share-url { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); padding: 0 12px; margin-bottom: 12px; font-size: 13px; }
#hy-share-copied { color: var(--green); font-size: 14px; margin-right: auto; }
.hy-help { padding-left: 18px; display: grid; gap: 8px; color: #e8dccb; }

/* guide */
.guide { max-width: 1100px; margin: 0 auto; padding: 36px 20px 10px; }
.guide h2 { font-size: 26px; margin: 0 0 10px; }
.guide h3 { font-size: 18px; }
.guide p, .guide li { color: #dccfbd; }
.guide a { color: var(--orange2); }
.guide-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.guide details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.guide summary { cursor: pointer; font-weight: 600; }
.noscript { padding: 20px; text-align: center; }

/* responsive */
@media (max-width: 1100px) { :root { --panel-w: 300px; } .hy-top .hy-btn span { display: none; } .hy-top .hy-btn { width: 42px; padding: 0; } }
@media (max-width: 820px) {
  .hy-top { padding: 0 10px 0 118px; justify-content: flex-end; }
  .hy-top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hy-top-actions { gap: 6px; }
  .hy-studio { display: flex; flex-direction: column-reverse; height: auto; min-height: 0; }
  .hy-stage { height: 62svh; min-height: 330px; }
  .hy-panel { border-right: 0; border-top: 1px solid var(--line); height: calc(38svh - var(--top-h) + 56px); min-height: 280px; }
  .hy-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .hy-item img { width: 60px; height: 60px; }
  .hy-inspector { left: 8px; right: 8px; top: auto; bottom: 66px; width: auto; padding: 10px; }
  .hy-night .hy-inspector { top: auto; }
  .hy-viewbar { bottom: 8px; gap: 4px; padding: 4px; max-width: calc(100% - 12px); }
  .hy-seg button { padding: 0 10px; min-height: 34px; }
  .hy-viewbar .hy-icon-btn { width: 36px; height: 36px; }
  .hy-viewbar .hy-btn { min-height: 38px; padding: 0 12px; }
  .hy-hud { left: 8px; right: 8px; top: 64px; justify-content: space-around; }
  .hy-hud div { min-width: 0; }
  .hy-namebar { left: 8px; top: 8px; padding: 6px 10px; }
  .hy-hint { top: auto; bottom: 62px; font-size: 13px; }
  .hy-toasts { bottom: 62px; left: 8px; }
  .hy-night .hy-toasts { bottom: 62px; }
  .hy-pad { bottom: 60px; left: 14px; width: 104px; height: 104px; }
  #hy-start .hy-houses { grid-template-columns: repeat(2, 1fr); }
  .guide-columns { grid-template-columns: 1fr; }
  body.hy-placing .hy-hint { bottom: 62px; }
}
@media (max-width: 420px) { .hy-seg button { padding: 0 8px; font-size: 14px; } .hy-viewbar #hy-night { font-size: 14px; padding: 0 10px; } }
@media (max-height: 500px) and (orientation: landscape) {
  .hy-studio { display: grid; grid-template-columns: 260px 1fr; height: calc(100svh - var(--top-h)); }
  .hy-panel { height: auto; border-top: 0; border-right: 1px solid var(--line); }
  .hy-stage { height: auto; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .hy-toast, .hy-item { animation: none; transition: none; } }

/* Keep entry choices and the tools needed to begin inside short viewports. */
.hy-btn,.hy-btn.small,.hy-tabs button,.hy-select select,.hy-search input,.hy-chip,.hy-seg button { min-height:44px; }
.hy-icon-btn,.hy-icon { width:44px;height:44px; }
.hy-top-actions .hy-btn { min-width:44px; }
.hy-top-actions button { flex-shrink:0; }
.hy-dialog { overflow:auto; }
.hy-dialog h2,.hy-house { overflow-wrap:anywhere; }
.hy-house { min-width:0; }
@media (max-width:1100px) { .hy-top .hy-btn { width:44px; } }
@media (max-width:820px) {
 .hy-top-actions { gap:4px; }
 .hy-top { padding-right:6px; }
 .hy-stage { height:44svh;min-height:260px; }
 .hy-panel { height:calc(56svh - var(--top-h));min-height:280px; }
 .hy-viewbar { display:grid;grid-template-columns:44px 44px 1fr;width:calc(100% - 16px);max-width:360px;border-radius:20px;gap:4px;padding:4px; }
 .hy-seg { grid-column:1 / -1; }
 .hy-seg button { flex:1;min-width:44px;min-height:44px; }
 .hy-viewbar .hy-icon-btn { width:44px;height:44px; }
 .hy-viewbar .hy-btn { min-height:44px; }
 .hy-inspector { bottom:118px;max-height:calc(100% - 126px);overflow:auto; }
 .hy-hint,.hy-toasts,.hy-night .hy-toasts,body.hy-placing .hy-hint { bottom:118px; }
 .hy-pad { bottom:118px; }
 #hy-start-title { font-size:28px;line-height:1.2; }
}
@media (max-height:500px) and (orientation:landscape) {
 .hy-studio { min-height:0; } .hy-stage { height:auto;min-height:0; }
 .hy-panel { height:auto;min-height:0; }
}

@media (max-width:820px) {
 .hy-viewbar { display:flex; }
 .hy-viewbar .hy-seg { flex:1;min-width:0; }
 .hy-viewbar .hy-seg button { padding:0 7px; }
 .hy-viewbar #hy-undo,.hy-viewbar #hy-redo { position:absolute;bottom:calc(100% + 8px); }
 .hy-viewbar #hy-undo { right:54px; }
 .hy-viewbar #hy-redo { right:4px; }
 .hy-inspector { bottom:72px;max-height:calc(100% - 80px); }
 .hy-hint,.hy-toasts,.hy-night .hy-toasts,body.hy-placing .hy-hint { bottom:72px; }
 .hy-pad { bottom:72px; }
}

/* Leave room for the complete picker even with classic desktop scrollbars. */
@media (max-width:420px) and (max-height:720px) {
 #hy-start { padding:14px; }
 #hy-start .hy-house { padding:6px; }
 #hy-start .hy-house-ico svg { width:56px;height:40px; }
 #hy-start .hy-houses { gap:6px;margin-bottom:10px; }
 #hy-start .hy-select { margin-bottom:10px; }
}
