/* TESSERA 2.0 — application styles */
[hidden] { display: none !important; }
.scroll { overflow: auto; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.lcd { font-family: var(--font-mono); font-size: 30px; line-height: 1; color: #ff6a55; background: #180c14; border: 2px solid var(--ink); border-radius: 4px; padding: 3px 7px 1px; text-shadow: 0 0 6px rgba(255, 106, 85, .7); letter-spacing: .04em; min-width: 3.1ch; text-align: center; box-shadow: inset 0 0 0 2px #3a2030; }

/* panels & popovers */
.panel { position: fixed; z-index: 20001; padding: 12px 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--leaf-s); box-shadow: 5px 5px 0 var(--shadow); animation: menuin .12s ease-out; }
.cal { width: 220px; }
.cal-t { font-size: 20px; font-weight: 700; }
.cal-d { color: var(--ink3); margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-grid i { font-style: normal; padding: 3px 0; border-radius: 3px; }
.cal-h { color: var(--ink3); font-weight: 600; }
.cal-today { background: var(--coral); color: var(--cream); font-weight: 700; }
.vol-panel { display: flex; flex-direction: column; gap: 10px; width: 190px; }
.vol-panel input[type=range] { width: 100%; }

/* window chrome for icon in title inset */
.win-title { padding-left: 8px; }

/* ---------- system apps ---------- */
.about { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 20px; height: 100%; overflow: auto; background: var(--paper) repeating-linear-gradient(135deg, rgba(122, 59, 143, .05) 0 8px, transparent 8px 16px); }
.about-logo svg { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: block; }
.about h2 { margin: 6px 0 0; font-size: 28px; letter-spacing: .2em; padding-left: .2em; }
.about-sub { color: var(--ink3); }
.about-tab { width: 100%; border: 2px solid var(--ink); background: var(--field); text-align: left; margin: 6px 0; }
.about-tab div { display: flex; padding: 3px 10px; border-bottom: 1px dashed var(--paper3); gap: 10px; }
.about-tab div:last-child { border-bottom: 0; }
.about-tab b { width: 82px; flex: none; color: var(--ink3); font-weight: 500; }
.wel { padding: 16px 20px; height: 100%; }
.wel-hero { display: flex; gap: 16px; align-items: center; }
.wel-hero svg { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); flex: none; }
.wel h1 { margin: 0 0 4px; font-size: 30px; }
.wel p { margin: 0; }
.wel h3 { margin: 14px 0 6px; font-size: 16px; }
.wel-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-top: 12px; }
.wel-app { display: flex; align-items: center; gap: 8px; padding: 7px 9px; text-align: left; background: var(--cream); border: 2px solid var(--ink); border-radius: var(--leaf-s); box-shadow: 2px 2px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.wel-app svg { flex: none; }
.wel-app:hover { background: var(--gold); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.wel-app:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.wel-tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.wel-chk { margin-top: 14px; }
.tabs { flex: none; display: flex; gap: 4px; padding: 6px 8px 0; background: var(--paper2); border-bottom: 2px solid var(--ink); }
.tab { padding: 4px 14px; background: var(--paper3); border: 2px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: -2px; font-size: 14px; }
.tab.on { background: var(--paper); font-weight: 700; }
.tab-host { flex: 1; min-height: 0; }
.pane { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.pane h3 { margin: 6px 0 0; font-size: 15px; border-bottom: 2px dashed var(--paper3); padding-bottom: 3px; }
.pane p { margin: 0; }
.pane input[type=range] { flex: 1; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.wall { padding: 4px; background: var(--cream); border: 2px solid var(--ink); border-radius: var(--leaf-s); display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: center; font-size: 12px; }
.wall canvas, .wall img { width: 100%; height: auto; display: block; border: 2px solid var(--ink); image-rendering: pixelated; aspect-ratio: 5 / 3; object-fit: cover; }
.wall.on { background: var(--gold); box-shadow: 3px 3px 0 var(--ink); }
.dr-side { flex: none; width: 128px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--paper2); border-right: 2px solid var(--ink); }
.dr-tab { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: transparent; border: 2px solid transparent; border-radius: var(--leaf-s); text-align: left; }
.dr-tab.on { background: var(--gold); border-color: var(--ink); }
.dr-grid { flex: 1; min-width: 0; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; background: var(--field); }
.dr-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; background: transparent; border: 2px solid transparent; border-radius: var(--leaf-s); text-align: center; min-width: 0; }
.dr-item.sel, .dr-item:focus-visible { background: rgba(122, 59, 143, .18); border-color: var(--plum); }
.dr-th { display: grid; place-items: center; height: 64px; width: 100%; }
.dr-th.pic img { max-width: 100%; max-height: 64px; border: 2px solid var(--ink); image-rendering: pixelated; background: #fff; box-shadow: 2px 2px 0 var(--ink); }
.dr-name { font-size: 14px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-date { font-size: 11px; color: var(--ink3); }
.dr-empty { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--ink3); }
.compact .dr-side { width: 52px; } .compact .dr-tab span { display: none; }

/* ---------- Gouache ---------- */
.g-main { flex: 1; min-height: 0; display: flex; }
.g-tools { flex: none; width: 92px; padding: 8px; display: flex; flex-direction: column; gap: 10px; background: var(--paper2); border-right: 2px solid var(--ink); overflow-y: auto; }
.g-toolgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.g-tool { height: 34px; padding: 0; display: grid; place-items: center; background: var(--cream); border: 2px solid var(--ink); border-radius: 5px 1px 5px 1px; }
.g-tool:hover { background: #fff5d8; }
.g-tool.on { background: var(--gold); box-shadow: inset 2px 2px 0 rgba(33, 26, 51, .3); }
.g-sizes { display: flex; flex-direction: column; gap: 3px; padding: 4px; background: var(--field); border: 2px solid var(--ink); }
.g-size { height: 22px; padding: 0; display: grid; place-items: center; background: transparent; border: 2px solid transparent; }
.g-size i { display: block; background: var(--ink); border-radius: 50%; }
.g-size.on { background: var(--gold); border-color: var(--ink); }
.g-fill { width: 100%; }
.g-stage { flex: 1; min-width: 0; padding: 12px; display: grid; place-items: center; background: #8a7fa8 repeating-conic-gradient(#7d729b 0 25%, #8a7fa8 0 50%) 0 0 / 16px 16px; }
.g-stage > canvas { max-width: none; display: block; background: #fffdf6; border: 2px solid var(--ink); box-shadow: 4px 4px 0 rgba(33, 26, 51, .55); touch-action: none; cursor: crosshair; margin: auto; }
.g-pal { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--paper2); border-top: 2px solid var(--ink); }
.g-swatches { position: relative; width: 46px; height: 38px; flex: none; }
.g-sw { position: absolute; width: 28px; height: 24px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.g-sw.bg { right: 0; bottom: 0; } .g-sw.fg { left: 0; top: 0; z-index: 1; }
.g-cells { display: grid; grid-template-columns: repeat(12, 22px); grid-auto-rows: 20px; gap: 2px; }
.g-c { padding: 0; border: 2px solid var(--ink); border-radius: 2px; }
.g-c:hover { transform: scale(1.18); z-index: 1; }
.g-custom { width: 34px; height: 34px; padding: 0; border: 2px solid var(--ink); background: var(--cream); }
.narrow .g-main { flex-direction: column; }
.narrow .g-tools { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 2px solid var(--ink); gap: 8px; align-items: center; }
.narrow .g-toolgrid { display: flex; }
.narrow .g-tool { width: 34px; flex: none; }
.narrow .g-sizes { flex-direction: row; }
.narrow .g-size { width: 22px; }
.narrow .g-fill { width: auto; flex: none; }
.narrow .g-pal { flex-wrap: wrap; }
.narrow .g-cells { grid-template-columns: repeat(12, 20px); }
.gpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.gp { display: flex; flex-direction: column; gap: 3px; padding: 4px; background: var(--cream); border: 2px solid var(--ink); font-size: 13px; text-align: center; min-width: 0; }
.gp img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; image-rendering: pixelated; border: 1px solid var(--ink); }
.gp.on { background: var(--gold); }
.gp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Urchins ---------- */
.u-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--paper2); border-bottom: 2px solid var(--ink); }
.u-mid { display: flex; align-items: center; gap: 8px; }
.u-face { font-family: var(--font-mono); font-size: 24px; line-height: 1; padding: 4px 10px 2px; min-width: 64px; }
.u-area { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; background: var(--paper) repeating-linear-gradient(45deg, rgba(35, 166, 160, .07) 0 10px, transparent 10px 20px); }
.u-canvas { display: block; margin: auto; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); touch-action: manipulation; outline: none; background: var(--ink); }
.u-canvas:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.u-best { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--paper3); min-width: 220px; }

/* ---------- Quire ---------- */
.q-tools { flex: none; display: flex; gap: 6px; padding: 5px 8px; background: var(--paper2); border-bottom: 2px solid var(--ink); align-items: center; }
.q-sp { flex: 1; }
.q-find { flex: none; display: flex; gap: 6px; padding: 5px 8px; background: var(--paper3); border-bottom: 2px solid var(--ink); align-items: center; }
.q-find .field { flex: 1; }
.q-fmsg { min-width: 4.5em; }
.q-sheet { flex: 1; min-height: 0; display: flex; background: #fffaf0; }
.q-sheet.night { background: #1c1730; }
.q-text { flex: 1; width: 100%; resize: none; border: 0; outline: none; margin: 0; padding: 10px 16px 10px 46px; color: var(--ink); background: transparent; tab-size: 4; -webkit-user-select: text; user-select: text;
  background-image: linear-gradient(90deg, transparent 33px, rgba(236, 91, 74, .55) 33px 35px, transparent 35px), linear-gradient(transparent calc(var(--lh, 24px) - 1px), rgba(35, 166, 160, .28) calc(var(--lh, 24px) - 1px));
  background-size: 100% 100%, 100% var(--lh, 24px); background-attachment: local, local; background-position: 0 0, 0 10px; overflow: auto; }
.q-sheet.night .q-text { color: #f2e6c4; background-image: linear-gradient(90deg, transparent 33px, rgba(236, 91, 74, .5) 33px 35px, transparent 35px), linear-gradient(transparent calc(var(--lh, 24px) - 1px), rgba(242, 169, 59, .16) calc(var(--lh, 24px) - 1px)); caret-color: var(--gold); }
.q-text::selection { background: var(--gold); color: var(--ink); }
.q-dirty { color: var(--coral); font-weight: 700; }
.q-list { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow: auto; border: 2px solid var(--ink); background: var(--field); padding: 3px; }
.q-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: transparent; border: 0; border-radius: 3px; text-align: left; }
.q-row b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-row.on { background: var(--gold); }
.q-row:hover:not(.on) { background: var(--paper2); }
.compact .win-status span:nth-child(2) { display: none; }

/* ---------- Wayfarer ---------- */
.wf-bar { flex: none; display: flex; gap: 5px; padding: 6px 8px; align-items: center; background: var(--paper2); border-bottom: 2px solid var(--ink); }
.wf-b { min-width: 30px; padding-left: 6px; padding-right: 6px; }
.wf-addr { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 18px; padding-top: 0; padding-bottom: 0; }
.wf-throb { flex: none; width: 30px; height: 30px; border: 2px solid var(--ink); }
.wf-throb svg { display: block; width: 100%; height: 100%; }
.wf-throb.on { animation: throb 1.1s steps(4) infinite; }
@keyframes throb { to { transform: rotate(360deg); } }
.wf-bm { flex: none; display: flex; gap: 6px; align-items: center; padding: 4px 8px; background: var(--paper3); border-bottom: 2px solid var(--ink); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.wf-view { flex: 1; min-height: 0; background: #fff; outline: none; -webkit-user-select: text; user-select: text; }
.wf-page { min-height: 100%; transition: opacity .2s; }
.wf-page a { cursor: var(--cur-point); }
.wf-st { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; border: 0 !important; }
.win-status .wf-prog { width: 30%; max-width: 220px; height: 12px; padding: 0; border: 2px solid var(--ink); background: var(--field); position: relative; }
.wf-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: repeating-linear-gradient(90deg, var(--teal) 0 6px, var(--gold) 6px 12px); transition: width .25s; }
.wf-dial { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #14102a; color: #d9d2b4; text-align: center; padding: 30px; }
.wf-dial h2 { margin: 0; letter-spacing: .2em; font-weight: 700; color: var(--cream); }
.wf-dial pre { margin: 0; font-family: var(--font-mono); font-size: 22px; text-align: left; color: #9be07a; min-height: 4.6em; }
.wf-dial small { color: #6e619a; }
.wf-modem { animation: throb 3s steps(8) infinite; }
.wf-err { max-width: 560px; margin: 0 auto; padding: 40px 24px; font-family: 'Libre Baskerville', Georgia, serif; }
.wf-err h1 { font-size: 26px; border-bottom: 3px double #211a33; padding-bottom: 8px; }
.wf-err small { color: #777; }

/* --- site: Beacon --- */
.site-beacon { background: #fbf6e6; color: #241d3a; font-family: 'Libre Baskerville', Georgia, serif; font-size: 15px; line-height: 1.5; }
.bn { max-width: 820px; margin: 0 auto; }
.bn a { color: #1d4fa0; }
.bn-head { padding: 18px 20px 12px; background: linear-gradient(180deg, #fff3c8, #fbf6e6); border-bottom: 4px double #241d3a; }
.bn-head.slim { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 10px 20px; }
.bn-logo { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.bn-logo h1 { margin: 0; font-size: 42px; letter-spacing: .12em; line-height: 1; font-family: 'Libre Baskerville', serif; color: #241d3a; }
.bn-head.slim h1 { font-size: 26px; }
.bn-logo span { font-style: italic; font-size: 14px; }
.bn-search { display: flex; gap: 8px; margin-top: 14px; }
.bn-head.slim .bn-search { margin: 0; flex: 1; min-width: 200px; }
.bn-search .field { flex: 1; font-family: inherit; font-size: 15px; }
.bn-body { padding: 16px 20px 6px; }
.bn-sotw { background: #fff; border: 2px solid #241d3a; padding: 4px 14px 10px; margin-bottom: 16px; box-shadow: 4px 4px 0 #f2a93b; }
.bn-sotw h2, .bn-news h2 { font-size: 17px; margin: 10px 0 4px; }
.bn-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.bn-cat { border: 2px solid #241d3a; background: #fff; }
.bn-cat h3 { margin: 0; padding: 6px 12px; color: #fff; font-size: 15px; }
.bn-cat.c1 h3 { background: #7a3b8f; } .bn-cat.c2 h3 { background: #23a6a0; } .bn-cat.c3 h3 { background: #ec5b4a; } .bn-cat.c4 h3 { background: #c98a1a; }
.bn-cat ul { margin: 0; padding: 8px 12px 10px 28px; }
.bn-cat li { margin: 2px 0; }
.bn-news ul { padding-left: 20px; }
.bn-foot { margin-top: 20px; padding: 14px 20px 24px; text-align: center; font-size: 13px; border-top: 2px solid #241d3a; color: #574a7a; }
.counter { display: inline-flex; gap: 2px; }
.counter i { font-style: normal; font-family: 'VT323', monospace; font-size: 20px; background: #111; color: #7bff6a; padding: 0 4px; border: 1px solid #555; }
.bn-count { color: #574a7a; }
.bn-hit { margin: 12px 0 18px; }
.bn-hit a { font-size: 18px; }
.bn-url { color: #1c7a4a; font-size: 13px; }
.bn-hit p { margin: 2px 0; }

/* --- site: Tidewatch --- */
.site-tidewatch { background: radial-gradient(circle at 20% 0%, #1d6ea8 0, transparent 60%), repeating-linear-gradient(0deg, rgba(90, 169, 230, .12) 0 2px, transparent 2px 16px), #0a2a4a; color: #fff6d0; font-family: 'Comic Neue', 'Comic Sans MS', cursive; font-size: 17px; }
.td { max-width: 760px; margin: 0 auto; padding: 0 14px 20px; text-align: center; }
.td a { color: #ffe066; }
.td a:visited { color: #ff9ee0; }
.td-marq { overflow: hidden; white-space: nowrap; background: #ffd24d; color: #7a1a1a; font-weight: 700; margin: 0 -14px; border-bottom: 3px solid #7a1a1a; padding: 2px 0; }
.td-marq span { display: inline-block; padding-left: 100%; animation: marq 22s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }
.td-title { margin: 14px 0 0; font-size: 46px; letter-spacing: .06em; color: #ffe066; text-shadow: 3px 3px 0 #ff5a7a, 6px 6px 0 #0a2a4a; animation: wob 3s ease-in-out infinite alternate; }
@keyframes wob { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
.td-sub { color: #9ec7e8; margin-bottom: 8px; }
.td-nav { padding: 6px; margin: 8px 0 12px; background: rgba(0, 0, 0, .35); border: 2px dotted #ffe066; }
.td-tape { margin: 8px 0; padding: 4px; background: repeating-linear-gradient(45deg, #ffd24d 0 14px, #111 14px 28px); color: #fff; font-weight: 700; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000; }
.td-box { margin: 12px 0; padding: 4px 18px 14px; text-align: left; background: rgba(0, 20, 50, .65); border: 3px ridge #9ec7e8; }
.td-box.alt { border-color: #ff9ee0; }
.td-box h2 { color: #7dd8ff; }
.td-blink { color: #ff4d6d; animation: bl 1s steps(1) infinite; font-size: 14px; vertical-align: top; }
@keyframes bl { 50% { opacity: 0; } }
.td-counter { margin: 14px 0; }
.td-foot p { font-size: 13px; color: #9ec7e8; }
.td-ring { display: flex; justify-content: center; gap: 14px; padding: 6px; border: 2px solid #ffe066; background: rgba(0, 0, 0, .3); font-weight: 700; }
.td canvas { display: block; max-width: 100%; height: auto; border: 3px solid #9ec7e8; margin: 8px 0; }
.td-table { border-collapse: collapse; width: 100%; margin: 8px 0; background: rgba(0, 0, 0, .3); }
.td-table th, .td-table td { border: 1px solid #5a8fbf; padding: 4px 10px; text-align: left; }
.td-table th { background: #14588f; color: #ffe066; }
.td-table tr.hi td { color: #9dffb0; } .td-table tr.lo td { color: #ffb0c0; }
.td-blink2 { font-weight: 700; color: #ffe066; }
.td-form { display: flex; flex-direction: column; gap: 8px; }
.td-form label { display: flex; flex-direction: column; gap: 3px; }
.td-form .field { font-family: inherit; font-size: 16px; }
.td-gbe { border-bottom: 1px dashed #5a8fbf; padding: 6px 0; }
.td-gbe p { margin: 2px 0; }
.td-gbe small { color: #9ec7e8; }

/* --- site: Halvorsen-Ito --- */
.site-halvorsenito { background: #fff; color: #17213a; font-family: 'Trebuchet MS', Verdana, sans-serif; font-size: 15px; line-height: 1.55; }
.hi { max-width: 900px; margin: 0 auto; }
.hi a { color: #1c56b8; }
.hi-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: linear-gradient(90deg, #1b1430, #3a2a66); }
.hi-bar a { color: #f8f0da; text-decoration: none; }
.hi-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.hi-brand svg { border: 2px solid #f8f0da; }
.hi-bar nav { display: flex; gap: 16px; font-size: 14px; }
.hi-bar nav a:hover { color: #f2a93b; }
.hi-hero { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 30px 24px; background: radial-gradient(circle at 80% 30%, #ffe9b0, #fff 60%); border-bottom: 5px solid #f2a93b; }
.hi-hero-tx { flex: 1; min-width: 240px; }
.hi-hero small { letter-spacing: .3em; color: #7a3b8f; font-weight: 700; }
.hi h1 { margin: 4px 0 8px; font-size: 38px; line-height: 1.1; font-family: 'Libre Baskerville', Georgia, serif; }
.hi h1 em { color: #d98a1a; }
.hi-lead { font-size: 17px; color: #3a3560; }
.hi-btn { display: inline-block; padding: 8px 18px; background: #1c56b8; color: #fff !important; border: 0; border-radius: 3px; font: inherit; text-decoration: none; cursor: var(--cur-point); }
.hi-btn.ghost { background: #fff; color: #1c56b8 !important; border: 2px solid #1c56b8; }
.hi-btn:disabled { opacity: .6; }
.hi-box3d { perspective: 700px; padding: 10px 24px; }
.hi-box { width: 170px; padding: 18px 10px 12px; text-align: center; background: linear-gradient(135deg, #2b2147, #1b1430); color: #f8f0da; transform: rotateY(-24deg) rotateX(4deg); box-shadow: 14px 14px 0 rgba(23, 33, 58, .25); border: 2px solid #f2a93b; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hi-box b { letter-spacing: .3em; font-size: 20px; } .hi-box small { color: #f2a93b; letter-spacing: .1em; }
.hi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; padding: 22px 24px; }
.hi-grid div { padding: 12px 14px; background: #f6f1ff; border-left: 5px solid #7a3b8f; }
.hi-grid h3 { margin: 0 0 4px; }
.hi-grid p { margin: 0; font-size: 14px; }
.hi-news, .hi-page { padding: 8px 24px 20px; }
.hi-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.hi-list li { margin-bottom: 6px; }
.hi-table { width: 100%; border-collapse: collapse; }
.hi-table th, .hi-table td { padding: 6px 10px; border-bottom: 1px solid #ddd6ee; text-align: left; vertical-align: middle; }
.hi-table th { background: #f6f1ff; width: 34%; font-weight: 600; }
.hi-table.dl th { width: auto; }
.dl-bar { margin-top: 6px; height: 10px; background: #eee; border: 1px solid #999; } .dl-bar i { display: block; height: 100%; width: 0; background: #1c56b8; }
.hi canvas { display: block; max-width: 100%; height: auto; border: 3px solid #17213a; cursor: var(--cur-point); image-rendering: pixelated; margin: 10px 0; }
.hi blockquote { margin: 16px 0; padding: 8px 18px; border-left: 5px solid #f2a93b; background: #fff8e6; font-style: italic; }
.hi-date { color: #7a3b8f; font-weight: 700; margin-bottom: 0; }
.hi-foot { padding: 16px 24px; font-size: 12px; color: #777; background: #f4f1fa; border-top: 1px solid #ddd6ee; }

/* ---------- Lanternhall ---------- */
.lh-view { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: #0a0715; outline: none; overflow: hidden; touch-action: none; }
.lh-cv { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; touch-action: none; }
.lh-hud { position: absolute; left: 8px; top: 8px; display: flex; gap: 6px; pointer-events: none; }
.lh-hud span { padding: 2px 8px; font-size: 14px; background: rgba(20, 12, 40, .78); color: var(--gold); border: 2px solid var(--gold); border-radius: 4px 1px 4px 1px; }
.lh-mini { position: absolute; right: 8px; top: 8px; image-rendering: pixelated; border: 2px solid var(--gold); background: rgba(10, 7, 21, .6); max-width: 30%; height: auto; pointer-events: none; opacity: .92; }
.lh-msg { position: absolute; left: 50%; bottom: 84px; transform: translate(-50%, 10px); padding: 5px 14px; background: rgba(20, 12, 40, .88); color: var(--cream); border: 2px solid var(--gold); border-radius: 999px; font-size: 14px; opacity: 0; transition: all .25s; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.lh-msg.on { opacity: 1; transform: translate(-50%, 0); }
.lh-pad { position: absolute; bottom: 10px; display: flex; gap: 8px; }
.lh-pad.l { left: 10px; } .lh-pad.r { right: 10px; }
.lh-pb { width: 56px; height: 56px; padding: 0; font-size: 22px; color: var(--cream); background: rgba(20, 12, 40, .55); border: 2px solid rgba(248, 240, 218, .5); border-radius: 12px 3px 12px 3px; touch-action: none; }
.lh-pb.on { background: var(--gold); color: var(--ink); }
.lh-ov { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 7, 21, .62); backdrop-filter: blur(2px); padding: 12px; }
.lh-card { max-width: 380px; padding: 18px 22px; text-align: center; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--leaf-r); box-shadow: 6px 6px 0 var(--gold); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lh-card h2 { margin: 0; font-size: 26px; letter-spacing: .1em; }
.lh-card p { margin: 0 0 6px; }
@media (max-width: 720px), (pointer: coarse) { .lh-pb { width: 62px; height: 62px; } }
