/* The Hill House (2.18.0). NEERMAI colours and fonts, light and dark, every screen size. Developed by the NEERMAI team. */
.nhh { --hhg: color-mix(in srgb, var(--a) 88%, #000); max-width: 1100px; margin: 0 auto; padding: 10px 14px 24px; box-sizing: border-box; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.nhh *, .hh-sheetw * { box-sizing: border-box; }
.nhh svg, .hh-sheetw svg { display: block; }
.nhh-boot { min-height: 50vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.hh-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--a) 22%, transparent); border-top-color: var(--a); animation: hhSpin .8s linear infinite; display: inline-block; }
@keyframes hhSpin { to { transform: rotate(360deg); } }
.nhh.is-busy { opacity: .7; pointer-events: none; }

/* top bar */
.hh-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.hh-ib { flex: none; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.hh-ib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hh-ib svg circle { fill: currentColor; stroke: none; }
.hh-pills { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 6px; }
.hh-pill { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 700 14px/1 var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; }
.hh-pill svg { width: 17px; height: 17px; flex: none; }
.hh-pill small { font: 600 11px/1 var(--f); color: var(--muted); }
.is-drop svg { fill: #3d8fc4; }
.is-star svg { fill: var(--gold); }
.is-leaf svg { fill: none; stroke: #3f7a4a; stroke-width: 2.2; stroke-linecap: round; }

/* the house */
.hh-home { display: grid; gap: 14px; }
@media (min-width: 900px) { .hh-home { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.hh-stage { position: relative; border-radius: 24px; overflow: hidden; background: #1d1a22; box-shadow: var(--shadow); isolation: isolate; }
.hh-art .hh-scene { width: 100%; height: auto; aspect-ratio: 400 / 250; }
.hh-art.is-new .hh-in { animation: hhIn 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hhIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hh-cap { position: relative; padding: 14px 18px 16px; background: var(--hero, #17151A); color: #fff; }
.hh-cap::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 40px; background: linear-gradient(transparent, var(--hero, #17151A)); pointer-events: none; }
.hh-ch { display: block; font: 700 11.5px/1.2 var(--f); letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hh-cap h1 { margin: 2px 0 10px; font: 600 clamp(22px, 5.2vw, 30px)/1.15 var(--ft); color: #fff; }
.hh-prog { height: 6px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; max-width: 320px; }
.hh-prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #f3d08a); transition: width .6s; }
.hh-main { display: grid; gap: 12px; align-content: start; }
.hh-play { display: grid; gap: 10px; padding: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.hh-langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--soft); }
.hh-langs button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); font: 600 13.5px/1.1 var(--f); cursor: pointer; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-langs button.is-on { background: var(--surface); color: var(--a); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.hh-cta { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 0 20px; border: 0; border-radius: 18px; background: var(--grad); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--a) 80%, #000); transition: transform .12s; }
.hh-cta:active { transform: scale(.985); }
.hh-cta span { font: 600 13px/1 var(--f); opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.hh-cta b { flex: 1; font: 600 22px/1.1 var(--ft); }
.hh-cta svg { width: 26px; height: 26px; fill: #fff; }
.hh-task { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.hh-task.is-ready { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.hh-task > div { flex: 1 1 180px; min-width: 0; }
.hh-task small { display: block; color: var(--muted); font-size: 12.5px; }
.hh-task b { display: block; font: 600 17px/1.3 var(--ft); overflow-wrap: anywhere; }
.hh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--a); color: #fff; font: 700 14.5px/1.1 var(--f); cursor: pointer; text-decoration: none; text-align: center; }
.hh-btn.is-soft { background: var(--soft); color: var(--ink); }
.hh-btn[disabled] { opacity: .6; cursor: default; }
.hh-st { width: 15px; height: 15px; fill: currentColor; }
.hh-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hh-tile { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-width: 0; }
.hh-tile svg { width: 24px; height: 24px; fill: none; stroke: var(--a); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.hh-tile b { font: 700 14.5px/1.2 var(--f); }
.hh-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.hh-guest { display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--a) 8%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--a) 40%, var(--line)); }
.hh-guest span { font-size: 14px; color: var(--ink2); line-height: 1.5; }
.hh-guest .hh-btn { justify-self: start; }

/* playing */
.nhh.is-level { padding-bottom: 0; }
.hh-lv { display: flex; flex-direction: column; height: calc(var(--hh-h, 100vh) - 90px); min-height: 300px; gap: 8px; }
.hh-lvh { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.hh-lvh b { font: 600 20px/1.2 var(--ft); }
.hh-lvh span { color: var(--muted); font-size: 13px; }
.hh-gridw { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.hh-grid { --c: 14px; display: grid; grid-template-columns: repeat(var(--gw), var(--c)); grid-template-rows: repeat(var(--gh), var(--c)); gap: calc(var(--c) * .1); }
.hh-cell { display: grid; place-items: center; border-radius: calc(var(--c) * .22); background: var(--surface); border: 1px solid color-mix(in srgb, var(--a) 18%, var(--line)); box-shadow: inset 0 -2px 0 rgba(0,0,0,.04); }
.hh-cell i { font: 700 calc(var(--c) * .52)/1 var(--f); font-style: normal; color: #fff; text-transform: uppercase; }
.hh-cell.is-on { background: var(--a); border-color: var(--a); }
.hh-cell.is-hint { background: color-mix(in srgb, var(--gold) 30%, var(--surface)); border-color: var(--gold); }
.hh-cell.is-hint i { color: var(--ink); }
.hh-cell.is-pop { animation: hhPop .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes hhPop { 0% { transform: scale(.6); } 100% { transform: none; } }
.hh-word { height: 44px; display: grid; place-items: center; }
.hh-word span { display: inline-grid; justify-items: center; padding: 7px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font: 700 20px/1.1 var(--f); letter-spacing: .06em; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.hh-word span small { font: 600 11px/1.2 var(--f); letter-spacing: 0; opacity: .85; }
.hh-word .is-good { background: #2E9F6B; color: #fff; }
.hh-word .is-bonus { background: var(--gold); color: #1d1406; }
.hh-word .is-same { background: var(--soft); color: var(--ink2); }
.hh-word .is-bad { background: #C2414B; color: #fff; animation: hhShake .35s; }
.hh-wheelw { flex: none; display: grid; grid-template-columns: 52px auto 52px; align-items: center; justify-content: center; gap: 10px; }
.hh-wheel { position: relative; width: min(calc(100vw - 160px), 300px, 36vh); min-width: 170px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--surface), color-mix(in srgb, var(--a) 7%, var(--surface))); border: 1px solid color-mix(in srgb, var(--a) 22%, var(--line)); box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--a) 70%, #000), inset 0 2px 0 rgba(255,255,255,.4); touch-action: none; user-select: none; -webkit-user-select: none; }
.hh-wheel.is-shake { animation: hhShake .35s; }
@keyframes hhShake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.hh-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hh-line polyline { fill: none; stroke: color-mix(in srgb, var(--a) 70%, transparent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hh-l { position: absolute; width: 23%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; background: transparent; padding: 0; cursor: pointer; touch-action: none; }
.hh-l span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font: 700 clamp(20px, 6.4vw, 30px)/1 var(--f); color: var(--ink); transition: background .12s, color .12s, transform .12s; }
.hh-wheel.is-many .hh-l { width: 20%; }
.hh-wheel.is-ts .hh-l span { font-size: clamp(18px, 5.4vw, 26px); }
.hh-l.is-on span { background: var(--a); color: #fff; transform: scale(1.06); }
.hh-round { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); display: grid; place-items: center; cursor: pointer; position: relative; }
.hh-round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hh-round small { position: absolute; bottom: -6px; right: -4px; font: 700 10.5px/1 var(--f); padding: 3px 6px; border-radius: 999px; background: #3f7a4a; color: #fff; }
.hh-lvf { flex: none; display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 34px; flex-wrap: wrap; padding-bottom: 6px; }
.hh-bonus { font-size: 13px; color: var(--muted); }
.hh-chip { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font: 600 13px/1 var(--f); cursor: pointer; }

/* sheets and letters */
.hh-lock, .hh-lock body { overflow: hidden; }
.hh-sheetw { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; }
.hh-scrim { position: absolute; inset: 0; background: rgba(12,10,16,.55); opacity: 0; transition: opacity .25s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.hh-sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--bg); color: var(--ink); transform: translateY(30px); opacity: 0; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .25s; }
.hh-sheet.is-wide { max-width: 760px; }
.hh-sheetw.on .hh-scrim { opacity: 1; }
.hh-sheetw.on .hh-sheet { transform: none; opacity: 1; }
@media (min-width: 700px) { .hh-sheetw { align-items: center; padding: 24px; } .hh-sheet { border-radius: 26px; } }
.hh-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.hh-sh { margin: 0 44px 6px 0; font: 600 24px/1.2 var(--ft); }
.hh-sub { margin: 0 0 14px; color: var(--ink2); font-size: 15px; line-height: 1.55; }
.hh-kick { margin: 0 0 6px; font: 700 11.5px/1 var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--a); }
.hh-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hh-row .hh-btn { flex: 1 1 180px; }
.hh-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.hh-note a { color: var(--a); font-weight: 700; }
.hh-letter h2 { margin: 0 44px 14px 0; font: 600 26px/1.2 var(--ft); }
.hh-paper { position: relative; padding: 22px 22px 18px; border-radius: 14px; background: #f7f0e2; color: #3a2a1e; box-shadow: inset 0 0 0 1px #eadfca, 0 10px 30px -18px rgba(0,0,0,.35); margin-bottom: 16px; }
.hh-paper p { margin: 0; font: 400 17px/1.75 var(--ft); }
.hh-paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 14px 14px 0 0; background: var(--grad); opacity: .6; }
.hh-letter .hh-btn { width: 100%; }
.hh-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hh-styles button { display: grid; gap: 8px; justify-items: center; padding: 12px 8px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: 600 13px/1.25 var(--f); text-align: center; }
.hh-styles button.is-on { border-color: var(--a); }
.hh-styles span { width: 100%; aspect-ratio: 1.4; border-radius: 10px; box-shadow: inset 0 -10px 18px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,0,0,.06); }
.hh-rooms { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.hh-room { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); display: grid; }
.hh-rart { background: #1d1a22; aspect-ratio: 400 / 250; display: grid; place-items: center; }
.hh-rart svg { width: 100%; height: 100%; }
.hh-room.is-lock .hh-rart { background: var(--soft); }
.hh-lockic svg { width: 30px; height: 30px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.hh-rt { padding: 10px 12px 12px; display: grid; gap: 2px; }
.hh-rt b { font: 600 15.5px/1.3 var(--ft); }
.hh-rt small { color: var(--muted); font-size: 12.5px; }
.hh-rs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hh-lets { display: grid; gap: 8px; }
.hh-let { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.hh-let b { font: 600 16px/1.3 var(--ft); min-width: 0; overflow-wrap: anywhere; }
.hh-let small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.hh-let.is-lock { opacity: .55; cursor: default; }
.hh-set { display: grid; gap: 8px; }
.hh-set label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.hh-set span { display: grid; gap: 2px; }
.hh-set small { color: var(--muted); font-size: 12.5px; }
.hh-set input { width: 22px; height: 22px; accent-color: var(--a); }
.hh-how h3 { margin: 18px 0 6px; font: 600 18px/1.3 var(--ft); }
.hh-how p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; color: var(--ink2); }
.hh-board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hh-board li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.hh-board li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--f); background: var(--soft); }
.hh-board li:nth-child(1) > span { background: var(--gold); color: #fff; }
.hh-board li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-board li em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.hh-board li.is-me { border-color: var(--a); }
.hh-vart { border-radius: 16px; overflow: hidden; margin: 6px 0 10px; background: #1d1a22; }
.hh-vart svg { width: 100%; height: auto; }
.hh-means { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hh-means li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.hh-means li.is-done { border-color: #2E9F6B; }
.hh-means span { color: var(--muted); letter-spacing: .1em; }
.hh-means .is-done span { color: var(--ink); letter-spacing: 0; font-weight: 700; }
.hh-empty { text-align: center; display: grid; justify-items: center; gap: 4px; }
.hh-empty .hh-sh { margin-right: 0; }
.hh-big { width: 54px; height: 54px; fill: #3d8fc4; opacity: .8; margin-bottom: 6px; }
.hh-kind { display: grid; gap: 6px; justify-items: center; padding: 14px; margin: 4px 0 6px; border-radius: 16px; background: color-mix(in srgb, var(--a) 8%, var(--surface)); width: 100%; }
.hh-kind span { font-size: 14px; color: var(--ink2); line-height: 1.5; }
.hh-win { text-align: center; position: relative; padding-top: 8px; }
.hh-win h2 { margin: 0 0 12px; font: 600 30px/1.15 var(--ft); }
.hh-gain { display: flex; justify-content: center; gap: 12px; margin-bottom: 12px; }
.hh-gain span { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font: 700 20px/1 var(--f); }
.hh-gain svg { width: 22px; height: 22px; }
.hh-gain span:first-child svg { fill: var(--gold); }
.hh-gain span:last-child svg { fill: none; stroke: #3f7a4a; stroke-width: 2.2; }
.hh-burst { position: absolute; left: 50%; top: 40px; width: 0; height: 0; pointer-events: none; }
.hh-burst i { position: absolute; width: 8px; height: 14px; border-radius: 3px; background: var(--gold); transform: rotate(var(--r)) translateY(0); opacity: 0; animation: hhBurst 1s var(--d) cubic-bezier(.2,.8,.2,1) both; }
.hh-burst i:nth-child(3n) { background: var(--a); }
.hh-burst i:nth-child(3n+1) { background: #e8a76b; }
@keyframes hhBurst { 0% { opacity: 1; transform: rotate(var(--r)) translateY(0); } 100% { opacity: 0; transform: rotate(var(--r)) translateY(-120px); } }
@media (max-width: 380px) { .hh-wheel { width: min(calc(100vw - 124px), 300px, 38vh); } .hh-pill { padding: 0 8px; height: 34px; font-size: 13px; } .hh-pill small { display: none; } .hh-ib { width: 38px; height: 38px; } .hh-wheelw { grid-template-columns: 44px auto 44px; gap: 6px; } .hh-round { width: 44px; height: 44px; } .hh-tile { padding: 12px; } }
@media (max-height: 640px) { .hh-lvh span { display: none; } .hh-word { height: 36px; } .hh-wheel { width: min(calc(100vw - 124px), 30vh); min-width: 150px; } .hh-lvh b { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .hh-art.is-new .hh-in, .hh-cell.is-pop, .hh-word .is-bad, .hh-wheel.is-shake, .hh-burst i, .hh-spin { animation: none; } .hh-sheet, .hh-scrim { transition: none; } }

/* phones held sideways and short screens: the grid on the left, the letters on the right */
@media (orientation: landscape) and (max-height: 560px), (min-width: 900px) and (min-aspect-ratio: 5/4) {
	.hh-lv { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; column-gap: 18px; height: calc(var(--hh-h, 100vh) - 84px); min-height: 260px; }
	.hh-lvh { grid-column: 1; grid-row: 1; }
	.hh-gridw { grid-column: 1; grid-row: 2 / 5; }
	.hh-word { grid-column: 2; grid-row: 1; height: 38px; }
	.hh-wheelw { grid-column: 2; grid-row: 2; align-self: center; }
	.hh-wheelw { grid-template-columns: auto auto; justify-content: center; justify-items: center; row-gap: 12px; column-gap: 16px; }
	.hh-wheel { grid-column: 1 / -1; grid-row: 1; width: min(40vh, 30vw, 300px); min-width: 140px; }
	.hh-round { grid-row: 2; }
	.hh-lv { column-gap: clamp(18px, 4vw, 56px); }
	.hh-lvf { grid-column: 2; grid-row: 3; }
	.hh-bar { margin-bottom: 6px; }
}

/* a phone held sideways while playing: give the whole screen to the puzzle */
@media (orientation: landscape) and (max-height: 500px) {
	.hh-playing .nmp-tabbar, .hh-playing .nmp-top { display: none !important; }
	.hh-playing .nhh { padding-top: 6px; }
}
.hh-letter .hh-share { width: 100%; margin-bottom: 8px; }
