:root {
  --bg: #11141c; --panel: #181d2a; --card: #212839; --line: #2f3850; --txt: #e9edf5; --mut: #97a2bb;
  --acc: #ffcf3f; --acc-txt: #2a2200; --blue: #5fb3ff; --danger: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); overflow: hidden;
  font-family: "Segoe UI", Tahoma, system-ui, Arial, sans-serif; }
button, input { font: inherit; color: inherit; }
#app { display: flex; height: 100vh; height: 100dvh; }   /* dvh: the part of a phone screen really visible (without the browser bars) */

/* ---------- game stage (the 9:16 frame you record) ---------- */
#stage { flex: 1; position: relative; min-width: 0; background: radial-gradient(circle at 50% 40%, #1b2132, #0d1017); }
#frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); overflow: hidden; background: #a9dcff; }
#frame { isolation: isolate; } /* lets the recorder capture just this element */
#frame canvas { display: block; touch-action: none; }
#hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center;
  pointer-events: none; z-index: 2; }
#hud > div { background: rgba(20, 24, 34, .62); color: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 800;
  font-size: 15px; backdrop-filter: blur(4px); }
#banners { position: absolute; top: 60px; left: 10px; right: 10px; display: flex; flex-direction: column; align-items: center;
  gap: 8px; pointer-events: none; z-index: 3; }
.banner { background: linear-gradient(135deg, #ffcf3f, #ff9f43); color: #2a1a00; font-weight: 800; font-size: 17px;
  padding: 9px 18px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25); text-align: center; max-width: 100%;
  animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.banner.out { animation: fadeout .6s forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeout { to { transform: translateY(-12px); opacity: 0; } }
#show-panel { display: none; position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.15); cursor: pointer; font-size: 18px; z-index: 5; }
body.panel-hidden #show-panel { display: block; opacity: .35; }
body.panel-hidden #show-panel:hover { opacity: 1; }

/* labels floating over characters */
.clabel, .cbubble, .site { pointer-events: none; }
.clabel .inner { transform-origin: 50% 100%; text-align: center; line-height: 1.15; background: rgba(20, 24, 34, .72); color: #fff;
  padding: 3px 10px 4px; border-radius: 12px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.clabel b { display: block; font-size: 14px; }
.clabel span { display: block; font-size: 12px; color: #ffd76a; }
.cbubble .inner { transform-origin: 50% 100%; background: #fff; color: #1d2433; padding: 5px 11px; border-radius: 14px;
  font-size: 18px; font-weight: 700; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 8px rgba(0,0,0,.25); position: relative; animation: pop .3s ease-out; }
.cbubble .inner::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent;
  border-bottom: 0; border-top-color: #fff; }
.site { background: rgba(20, 24, 34, .8); color: #fff; padding: 5px 10px; border-radius: 12px; font-size: 13px; font-weight: 700;
  text-align: center; min-width: 120px; white-space: nowrap; }
.site i { display: block; height: 6px; margin: 4px 0 2px; border-radius: 3px;
  background: linear-gradient(90deg, #ffcf3f var(--p), rgba(255,255,255,.2) var(--p)); }
.site b { font-size: 12px; color: #ffd76a; }

/* ---------- control panel ---------- */
#panel { width: 390px; flex: none; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
#panel[dir="rtl"] { border-left: 0; border-right: 1px solid var(--line); }
body.panel-hidden #panel { display: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; margin: 0; }
.top h1 { font-size: 19px; margin: 0; }
.top-btns { display: flex; gap: 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.card h2 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.card h3 { font-size: 13px; margin: 12px 0 6px; color: var(--mut); }
button { background: #2d3650; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; cursor: pointer; }
button:hover { background: #38435f; }
button.primary { background: var(--acc); color: var(--acc-txt); border-color: var(--acc); font-weight: 800; }
button.primary:hover { filter: brightness(1.06); }
button.danger { color: var(--danger); }
button.icon { padding: 6px 9px; font-size: 16px; }
input { background: #141926; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; outline: none; }
input:focus { border-color: var(--blue); }
input.shake { animation: shake .35s; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.row-in { display: flex; gap: 6px; }
.row-in input { flex: 1; min-width: 0; }
.hint { color: var(--mut); font-size: 12px; margin: 8px 0 0; line-height: 1.45; }
.result { font-size: 13px; margin: 8px 0 0; min-height: 1em; color: #ffd76a; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); margin-top: 8px; cursor: pointer; }
.check input { width: auto; }
.pill { background: #2d3650; border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--mut); }

.animal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.animal { font-size: 22px; padding: 4px 0; line-height: 1.2; }
.animal.on { background: var(--acc); border-color: var(--acc); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; position: relative; font-size: 12px; }
.tile .ic { font-size: 20px; line-height: 1.1; }
.tile .lb { text-align: center; line-height: 1.15; }
.tile.on { background: var(--acc); color: var(--acc-txt); border-color: var(--acc); font-weight: 700; }
.tile .lock { display: none; position: absolute; top: 2px; inset-inline-end: 4px; font-size: 10px; }
.tile.locked .lock { display: block; }
.tile.locked:not(.on) { opacity: .7; border-style: dashed; }

.sel-head { display: flex; align-items: center; gap: 10px; }
.sel-emoji { font-size: 34px; }
.sel-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sel-info b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-info small { color: var(--mut); }

.cit-list { margin-top: 8px; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.cit { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; cursor: pointer; background: #1a2030; }
.cit:hover { background: #263049; }
.cit.on { outline: 2px solid var(--acc); }
.cit .em { font-size: 18px; }
.cit b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.cit small { color: var(--mut); font-size: 11px; flex: 1; }
.cit .st { font-size: 14px; }

.town-stats { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { background: #2d3650; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.chip.warn { background: #4a3a14; color: #ffd76a; }
.btn-row { display: flex; gap: 6px; margin-top: 10px; }
.btn-row button { flex: 1; }
.log { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--mut); max-height: 180px; overflow-y: auto; }
.log li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.log li:first-child { color: var(--txt); }

@media (max-width: 760px) {
  #panel { position: absolute; inset: auto 0 0 0; width: 100%; height: 50vh; z-index: 10; border: 0; border-top: 1px solid var(--line); }
}

/* ---------- v2 additions ---------- */
.hud-right { display: flex; gap: 6px; }
.hud-right > div { background: rgba(20, 24, 34, .62); color: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 15px; backdrop-filter: blur(4px); }
#hud > .hud-right { background: none; padding: 0; backdrop-filter: none; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-btn { padding: 5px 10px; border-radius: 999px; font-size: 12px; }
.chip-btn.on { background: var(--acc); color: var(--acc-txt); border-color: var(--acc); font-weight: 700; }
.range-row input, #time-range { width: 100%; padding: 0; accent-color: var(--acc); }
button.wide { width: 100%; margin-top: 8px; }
.tile.danger { color: var(--danger); }
.designs { display: flex; flex-direction: column; gap: 4px; }
.design { display: flex; align-items: center; gap: 4px; background: #1a2030; border-radius: 9px; padding: 3px 6px; }
.design .nm { flex: 1; cursor: pointer; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design.on { outline: 2px solid var(--acc); }
.floor-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.floor-row b { min-width: 70px; text-align: center; }
.clock { margin-inline-start: auto; font-size: 14px; color: #ffd76a; }
dialog#designer { background: var(--panel); color: var(--txt); border: 1px solid var(--line); border-radius: 16px; width: min(520px, 94vw); max-height: 90vh; overflow-y: auto; padding: 16px; }
dialog#designer::backdrop { background: rgba(0,0,0,.55); }
dialog#designer h2 { margin: 0 0 10px; font-size: 17px; }
.d-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 10px 0; }
.fld { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); }
.fld > span { flex: 1; }
.fld input, .fld select { width: auto; max-width: 150px; }
.fld input[type="number"] { width: 70px; }
.fld input[type="color"] { width: 46px; height: 30px; padding: 2px; }
.fld.wide { flex-direction: column; align-items: stretch; margin: 8px 0; }
.fld.wide input { max-width: none; width: 100%; }
select { background: #141926; border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--txt); }
.photo-box { background: var(--card); border-radius: 12px; padding: 10px; margin-bottom: 8px; }

/* ---------- resident profile card (inside the game frame, so it shows in the video) ---------- */
.pcard { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 6; background: rgba(252, 250, 242, .96); color: #2c3a2c;
  border-radius: 18px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.28); max-height: 58%; overflow: hidden;
  font-size: 13px; animation: pop .35s ease-out; }
.pcard.hidden { display: none; }
.pc-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: 1.5px; color: #7d8a74; font-weight: 700; }
.pc-top button { border: 0; background: none; font-size: 15px; color: #7d8a74; padding: 2px 6px; cursor: pointer; }
.pc-head { display: flex; gap: 12px; align-items: center; margin: 6px 0 8px; }
.pc-photo { position: relative; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: #e3ead8; flex: none; }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-photo span { position: absolute; right: -2px; bottom: -4px; font-size: 20px; }
.pc-who { display: flex; flex-direction: column; min-width: 0; }
.pc-who b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-who a { color: #6b8a5a; font-size: 12px; text-decoration: none; }
.pc-status { display: flex; align-items: center; gap: 6px; color: #5b6b52; font-size: 12px; padding-bottom: 8px; border-bottom: 1px solid #e3e6d6; }
.pc-status i { width: 7px; height: 7px; border-radius: 50%; background: #5cb85c; display: inline-block; }
.pc-goal { background: #eef2e4; border-radius: 12px; padding: 7px 10px; margin: 8px 0; }
.pc-goal small { color: #7d8a74; font-size: 10px; }
.pc-goal p { margin: 2px 0 0; font-size: 13px; line-height: 1.35; max-height: 3.9em; overflow: hidden; }
.pc-goal p.empty { color: #9aa58f; font-style: italic; }
.pc-rows div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; color: #6b7764; }
.pc-rows b { color: #2c3a2c; font-weight: 600; }
.pc-bel { margin-top: 6px; background: #eef2e4; border-radius: 12px; padding: 6px 10px; }
.pc-bel b { font-size: 13px; }
.pc-bel ul { list-style: none; margin: 3px 0 0; padding: 0; font-size: 12px; }
.pc-bel li { padding: 1px 0; }
.pc-bel li.empty { color: #9aa58f; }
/* profile editor + music in the panel */
.prof-edit textarea { width: 100%; min-height: 54px; background: #141926; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--txt); font: inherit; resize: vertical; }
.prof-edit .row-in { margin-top: 6px; }
.prof-edit select { flex: none; }
.prof-edit a { align-self: center; color: var(--blue); font-size: 13px; text-decoration: none; white-space: nowrap; }
.file-btn { flex: 1; background: #2d3650; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; cursor: pointer; font-size: 13px; text-align: center; }
.file-btn input { display: none; }
.bc-emoji { display: flex; align-items: center; justify-content: center; }
.pc-photo.bc-emoji span { position: static; font-size: 36px; }
.pc-who small { color: #7d8a74; font-size: 12px; }
.pc-status i.build { background: #f0ad4e; }
.bc-prog { height: 7px; background: #e3e6d6; border-radius: 4px; overflow: hidden; margin: 8px 0 2px; }
.bc-prog.hidden { display: none; }
.bc-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f0ad4e, #ffcf3f); transition: width .5s; }
.pc-rows a { color: #6b8a5a; font-weight: 600; text-decoration: none; }
.rec-state.on { background: #e5383b; color: #fff; animation: recblink 1s steps(2) infinite; }
@keyframes recblink { 50% { opacity: .55; } }
.rec-preview { background: #000; border-radius: 10px; overflow: hidden; margin: 8px 0; text-align: center; }
.rec-preview canvas { display: inline-block; max-width: 100%; max-height: 200px; }
.staff-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.staff-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 0; font-size: 13px; }
.staff-list li.empty { color: #8a93a0; font-style: italic; }
.pc-goals { list-style: none; margin: 3px 0 0; padding: 0; font-size: 12.5px; line-height: 1.35; }
.pc-goals li { padding: 1px 0; }
.pc-goals li.done { color: #8a9a80; text-decoration: line-through; }
.pc-goals li.empty { color: #9aa58f; font-style: italic; }
.goal-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.goal-list li { display: flex; align-items: center; gap: 6px; background: #1a2030; border-radius: 8px; padding: 4px 6px; font-size: 13px; }
.goal-list li span { flex: 1; }
.goal-list li.done span { text-decoration: line-through; color: var(--mut); }
.goal-list input[type=checkbox] { width: auto; }
.bel-list { list-style: none; margin: 4px 0; padding: 0; font-size: 13px; color: var(--mut); }

/* ---------- screen modes, viewer mode, bulk dialog ---------- */
#hud-day { font-size: 13px; }
/* visitors' search: a thin see-through bar in the top corner */
.viewer-bar { display: none; position: absolute; top: 64px; left: 10px; width: min(58%, 260px); z-index: 7;
  background: rgba(20, 26, 38, .32); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 0 4px 0 10px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#frame[dir="rtl"] .viewer-bar { left: auto; right: 10px; padding: 0 10px 0 4px; }
.viewer-bar .vb-row { display: flex; align-items: center; gap: 4px; height: 30px; }
.viewer-bar .vb-row > span { font-size: 12px; opacity: .85; }
.viewer-bar input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; padding: 4px 2px; font-size: 13px; }
.viewer-bar input::placeholder { color: rgba(255, 255, 255, .85); }
.viewer-bar button { background: rgba(255, 255, 255, .18); border: 0; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.viewer-bar small { display: none; }
.vb-results { display: flex; flex-direction: column; max-height: 180px; overflow-y: auto; }
.vb-results:not(:empty) { margin: 2px -4px 6px -10px; padding: 4px; border-radius: 12px; background: rgba(20, 26, 38, .72); }
.viewer-bar:has(.vb-results:not(:empty)) { border-radius: 14px; }
.vb-results button { text-align: start; background: none; color: #fff; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.vb-results button:hover { background: rgba(255, 255, 255, .15); }
.vb-results small { display: block; color: #fff; opacity: .8; padding: 4px 8px; }
body.viewer #panel, body.viewer #show-panel { display: none !important; }
body.viewer .viewer-bar { display: block; }
body.viewer .pcard { pointer-events: auto; }
dialog.dlg { background: var(--panel); color: var(--txt); border: 1px solid var(--line); border-radius: 16px; width: min(520px, 94vw); padding: 16px; }
dialog.dlg::backdrop { background: rgba(0,0,0,.55); }
dialog.dlg h2 { margin: 0 0 6px; font-size: 17px; }
dialog.dlg textarea { width: 100%; margin: 8px 0; background: #141926; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--txt); font: inherit; }
dialog.dlg .file-btn { display: block; margin: 6px 0; }
#screen-btns .chip-btn.on { background: var(--acc); color: var(--acc-txt); border-color: var(--acc); }
.pcard { right: auto; width: min(380px, calc(100% - 20px)); }
#frame[dir="rtl"] .pcard { left: auto; right: 10px; }
/* the cards are like a small page: they scroll up and down and leave most of the screen for the town */
.pcard { max-height: min(44%, 460px); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin;
  padding: 0 14px 12px; }
.pcard .pc-top { position: sticky; top: 0; z-index: 1; background: rgba(252, 250, 242, .98); margin: 0 -14px; padding: 12px 14px 6px; }
.pcard .pc-top::before { content: ''; position: absolute; left: 50%; top: 5px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #d3d8c6; }
.pcard .pc-goal p { max-height: none; }
.pcard::-webkit-scrollbar { width: 4px; }
.pcard::-webkit-scrollbar-thumb { background: #c9cfbb; border-radius: 2px; }
/* phones: the card is a sheet along the bottom, easy to read and to scroll with a thumb */
@media (max-width: 560px) {
  .pcard, #frame[dir="rtl"] .pcard { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    max-height: 46%; font-size: 14px; border-radius: 20px; padding: 0 16px 14px; }
  .pcard .pc-top { margin: 0 -16px; padding: 14px 16px 8px; font-size: 11px; }
  .pcard .pc-top button { font-size: 20px; padding: 4px 8px; }
  .pc-photo { width: 56px; height: 56px; border-radius: 14px; }
  .pc-who b { font-size: 17px; }
  .pc-who a, .pc-who small, .pc-status { font-size: 13px; }
  .pc-rows div { font-size: 13.5px; padding: 5px 0; }
  .pc-goals, .pc-bel ul { font-size: 13.5px; }
  .pc-goals li, .pc-bel li { padding: 3px 0; }
  .pc-bel b { font-size: 14px; }
}

.cal-grid { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 8px; }
.cal-row { display: flex; align-items: center; gap: 8px; background: #1a2030; border-radius: 9px; padding: 4px 8px; }
.cal-row b { width: 70px; font-size: 13px; }
.cal-row select { flex: 1; }
.cal-row.today { outline: 2px solid var(--acc); }
#hud-event.hidden { display: none; }
#hud-event { background: linear-gradient(135deg, #ffcf3f, #ff9f43) !important; color: #2a1a00 !important; }

/* ---------- sidebar v3: tabs, bigger targets, calmer layout ---------- */
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; padding: 0 8px 8px; border-bottom: 1px solid var(--line); flex: none; }
.tabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 52px;
  padding: 7px 2px 6px; background: transparent; border: 0; border-radius: 12px; color: var(--mut); font-size: 11.5px; font-weight: 600; }
.tabs button:hover { background: #222a3d; color: var(--txt); }
.tabs button.on { background: var(--card); color: var(--txt); box-shadow: inset 0 -3px 0 var(--acc); }
.tabs .ti { font-size: 20px; line-height: 1; }
.tabs .tl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tabs .badge { display: none; position: absolute; top: 5px; inset-inline-end: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }
.tabs .badge.rec { display: block; background: #e5383b; animation: recblink 1s steps(2) infinite; }
.tabs .badge.on { display: block; }
.tab-body { flex: 1; overflow-y: auto; padding: 10px 10px 48px; overscroll-behavior: contain; }
.pane { display: none; }
.pane.on { display: block; animation: paneIn .16s ease-out; }
@keyframes paneIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.card { padding: 12px 13px; margin-bottom: 12px; border-radius: 16px; }
.card h2 { font-size: 15.5px; margin: 0 0 10px; }
button { min-height: 36px; border-radius: 11px; transition: background .12s, transform .06s; }
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tile { min-height: 60px; justify-content: center; border-radius: 12px; padding: 7px 4px; }
.tile .ic { font-size: 22px; }
.grid { gap: 6px; }
.btn-row { flex-wrap: wrap; }
.btn-row button, .btn-row .file-btn { flex: 1 1 120px; }
.chip-btn { min-height: 32px; }
.animal { min-height: 40px; }
input, select { min-height: 38px; }
.fld select { min-height: 34px; }
.check { min-height: 30px; }
.cit-list { max-height: none; }
.cit { min-height: 40px; }
.log { max-height: 260px; }
.danger-zone { border-color: #5a2d35; background: linear-gradient(180deg, #2a2030, var(--card)); }
.reset-opts { display: grid; gap: 8px; margin-top: 10px; }
.reset-opts .opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: start; padding: 10px 12px; }
.reset-opts .opt small { color: var(--mut); font-size: 12px; font-weight: 400; }
.reset-opts .opt.danger b { color: var(--danger); }
.sel-empty { text-align: center; padding: 18px 8px; color: var(--mut); }
.sel-empty .big { font-size: 40px; display: block; margin-bottom: 6px; }
.fld.wide select { max-width: none; width: 100%; }
.btn-row .file-btn { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; font-size: inherit; }
.undo-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.undo-bar button { flex: none; }
.undo-what { flex: 1; min-width: 0; text-align: center; font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#frame.building-mode .pcard { display: none; }
