/* 狸猫镇：绿雾来信 — 卷宗界面（theme tokens 定义在 index.html :root） */
* { box-sizing: border-box; }
#ui { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#ui button { font-family: inherit; }

/* ---------- 布局：标题全屏；调查时竖屏上 55% 三维 + 下 45% 卷宗，横屏左 62% 三维 + 右侧栏 ---------- */
:root { --stage-h: 55dvh; --stage-w: 62vw; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
body.mode-play #stage { bottom: auto; height: var(--stage-h); }
@media (orientation: landscape) {
  body.mode-play #stage { bottom: 0; height: 100dvh; right: auto; width: var(--stage-w); }
}

/* ---------- 通用按钮（BrassButton）：背景与文字同一 flex 容器居中 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; min-width: 48px; padding: 0 18px; border-radius: var(--radius);
  color: #F4ECD8; font-size: 16px; letter-spacing: .08em; line-height: 1.15; text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, #7a6038 0%, #5b4526 48%, #3f2f19 100%);
  border: 1px solid #c9a66b; box-shadow: inset 0 1px 0 rgba(255,232,180,.45), inset 0 -2px 0 rgba(0,0,0,.45), 0 3px 8px rgba(0,0,0,.5);
  text-shadow: 0 1px 1px rgba(0,0,0,.7); cursor: pointer; transition: transform 80ms, filter 160ms;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.btn:hover:not(:disabled) { filter: brightness(1.12) saturate(1.1); }
.btn:active:not(:disabled) { transform: translateY(2px); filter: brightness(1.15); }
.tab:hover:not(:disabled), .card:hover, .m-close:hover { filter: brightness(1.06); border-color: #2f6b4f; }
.tab:active:not(:disabled), .card:active, .m-close:active { transform: translateY(1px); filter: brightness(.94); }
.mute-ico.off { text-decoration: line-through; opacity: .6; }
.btn:focus-visible { outline: 2px solid var(--fog); outline-offset: 2px; }
.btn:disabled { filter: grayscale(.85) brightness(.6); cursor: not-allowed; }
.btn.secondary { background: linear-gradient(180deg, #3a443f, #222a27); border-color: #7d8a80; }
.btn.danger { background: linear-gradient(180deg, #8a3b31, #5a221c); border-color: #d27a6a; }
.btn.fog { background: linear-gradient(180deg, #2f6b4f, #17382a); border-color: var(--fog); color: #e8fff2; }
.btn.small { min-height: 44px; padding: 0 12px; font-size: 14px; }
.btn .k { font-family: var(--font-type); font-size: 11px; opacity: .7; }
.btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(124,255,178,.0), inset 0 1px 0 rgba(255,232,180,.45); } 50% { box-shadow: 0 0 16px 2px rgba(124,255,178,.55), inset 0 1px 0 rgba(255,232,180,.45); } }
.icon-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; font-size: 20px; }

/* ---------- 卷宗面板（DossierPanel）---------- */
.dossier {
  position: relative; color: #2a231a; border-radius: var(--radius);
  background: linear-gradient(180deg, #efe6cf 0%, #e3d6b7 100%);
  border: 3px solid #6b5332; box-shadow: inset 0 0 0 1px #c9a66b, inset 0 0 40px rgba(120,90,50,.25), var(--shadow);
}
.dossier h2, .dossier h3 { margin: 0; font-weight: 700; letter-spacing: .1em; color: #2b2116; }
.dossier .muted { color: #6d6252; }

/* ---------- 标题屏 ---------- */
.screen-title { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(24px + var(--safe-t)) calc(24px + var(--safe-r)) calc(28px + var(--safe-b)) calc(24px + var(--safe-l));
  background: radial-gradient(120% 70% at 70% 30%, rgba(124,255,178,.18), rgba(11,16,14,0) 60%), linear-gradient(180deg, rgba(11,16,14,.25) 0%, rgba(11,16,14,.2) 45%, rgba(11,16,14,.92) 100%); background-size: cover; background-position: center; }
.screen-title.has-art { background: linear-gradient(180deg, rgba(11,16,14,.1) 0%, rgba(11,16,14,.15) 50%, rgba(11,16,14,.9) 100%), var(--title-art) center / cover no-repeat; }
.title-plaque { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.title-plaque .kicker { font-family: var(--font-type); color: var(--fog); letter-spacing: .3em; font-size: 13px; }
.title-plaque h1 { margin: 0; font-size: clamp(34px, 9vw, 56px); line-height: 1.1; letter-spacing: .12em; color: var(--paper); text-shadow: 0 2px 18px rgba(0,0,0,.9), 0 0 24px rgba(124,255,178,.25); }
.title-plaque h1 small { display: block; font-size: .5em; color: var(--lamp); letter-spacing: .4em; margin-top: 6px; }
.title-plaque p { margin: 0; color: #cfd8d0; font-size: 14px; line-height: 1.6; text-shadow: 0 1px 6px #000; }
.title-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; width: min(320px, 100%); }
.title-actions .btn { width: 100%; }
.title-top { position: absolute; top: calc(14px + var(--safe-t)); right: calc(14px + var(--safe-r)); display: flex; gap: 8px; }
.title-stats { font-family: var(--font-type); font-size: 12px; color: var(--muted); }

/* ---------- 顶部仪表（GaugeFrame）---------- */
#hud { position: fixed; z-index: 5; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); top: calc(8px + var(--safe-t)); display: flex; gap: 8px; align-items: stretch; pointer-events: none; }
@media (orientation: landscape) { #hud { right: calc(100vw - var(--stage-w) + 8px); } }
.gauge { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px 12px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20,28,25,.88), rgba(10,14,12,.88)); border: 2px solid #8a6d42; box-shadow: inset 0 1px 0 rgba(255,220,160,.3), 0 4px 12px rgba(0,0,0,.5); }
.meter { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.meter .lbl { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; color: #b9c4bb; letter-spacing: .06em; white-space: nowrap; }
.meter .lbl b { font-family: var(--font-type); color: var(--paper); font-weight: 700; font-variant-numeric: tabular-nums; }
.meter .bar { height: 6px; background: #0a0f0d; border: 1px solid #4a5550; border-radius: 2px; overflow: hidden; }
.meter .fill { height: 100%; width: 50%; transition: width var(--motion); }
.meter.sanity .fill { background: linear-gradient(90deg, #b5463a, #e0a458 60%, #e9dfc8); }
.meter.fogm .fill { background: linear-gradient(90deg, #2f6b4f, var(--fog)); }
.meter.warn .lbl b { color: #ff8b7a; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.crystals { font-size: 14px; color: var(--fog); letter-spacing: 2px; text-shadow: 0 0 6px rgba(124,255,178,.6); }
.crystals .off { color: #3a4a42; text-shadow: none; }
#hud .icon-btn { pointer-events: auto; align-self: center; }

/* ---------- 调查卷宗栏 ---------- */
#dossier { position: fixed; z-index: 4; left: 0; right: 0; top: var(--stage-h); bottom: 0; padding: 10px calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l)); display: flex; }
@media (orientation: landscape) { #dossier { top: 0; left: var(--stage-w); padding: calc(10px + var(--safe-t)) calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) 10px; } }
#dossier > .dossier { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.d-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.d-head h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-head .where { font-family: var(--font-type); font-size: 12px; color: #6d6252; white-space: nowrap; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tab { min-height: 44px; padding: 4px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: var(--radius);
  background: #d4c6a3; border: 1px solid #9c8358; color: #3a2e1e; font-size: 13px; line-height: 1.15; cursor: pointer; }
.tab small { font-family: var(--font-type); font-size: 10px; color: #7a6a50; }
.tab.on { background: #2a3530; color: var(--paper); border-color: var(--fog); box-shadow: 0 0 0 2px rgba(124,255,178,.35); }
.tab.on small { color: var(--fog); }
.tab:disabled { opacity: .55; cursor: wait; }
.tab:focus-visible { outline: 2px solid var(--fog); }
.d-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.d-note { font-size: 13px; color: #5a4e3c; line-height: 1.5; }
.d-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-actions .btn { padding: 0 6px; font-size: 15px; }

/* ---------- 线索卡（ClueCard）---------- */
.card { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: var(--radius); text-align: left;
  background: linear-gradient(180deg, #f6eed9, #e8dbbb); border: 1px solid #b59a68; color: #2b2116; box-shadow: 0 1px 2px rgba(0,0,0,.2); cursor: pointer; width: 100%; font-size: 14px; }
.card .txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card .txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .txt span { font-size: 12px; color: #6d6252; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card.unknown { background: rgba(42,53,48,.12); border-style: dashed; color: #5a4e3c; }
.card.memory { background: linear-gradient(180deg, #dff5e8, #c4e6d2); border-color: #3e8a64; }
.card.sel { box-shadow: 0 0 0 3px var(--fog), 0 0 14px rgba(124,255,178,.6); }
.card.hint { animation: pulse 1s ease-in-out infinite; }
.card.key .txt b::after { content: ' ★'; color: #9c6a1a; font-size: 11px; }
.card:focus-visible { outline: 2px solid #2f6b4f; }

.ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 700;
  color: #f4e6c4; background: radial-gradient(circle at 35% 30%, #a98654, #5b4526); border: 2px solid #c9a66b; }
.ico.atlas { border-radius: 4px; background-color: transparent; border: none; background-repeat: no-repeat; background-size: 300% 300%; }
.ico.memory { background: radial-gradient(circle at 35% 30%, #9dffcb, #1f4a36); color: #072015; border-color: var(--fog); }
.portrait { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 4px; border: 3px solid #8a6d42; display: grid; place-items: center; font-size: 40px; font-weight: 700;
  color: #f4e6c4; background: radial-gradient(circle at 40% 35%, #4b5d55, #141b18); box-shadow: inset 0 0 0 1px #c9a66b; background-size: cover; background-position: center top; }

/* ---------- 弹窗层 ---------- */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: calc(12px + var(--safe-t)) calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  background: rgba(6,10,8,.72); animation: fadeIn 220ms ease-out; }
.modal > .dossier { width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; animation: slideUp var(--motion); }
.modal.wide > .dossier { width: min(760px, 100%); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 8px 16px; border-bottom: 1px solid rgba(107,83,50,.35); }
.m-head h2 { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-close { flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid #9c8358; background: #d4c6a3; color: #3a2e1e; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.m-close:focus-visible { outline: 2px solid #2f6b4f; }
.m-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; font-size: 15px; line-height: 1.65; -webkit-overflow-scrolling: touch; }
.m-body p { margin: 0 0 10px; }
.m-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 10px 16px 14px; border-top: 1px solid rgba(107,83,50,.35); }
.m-foot .btn { flex: 1 1 140px; max-width: 260px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }

.clue-detail { display: flex; gap: 14px; align-items: flex-start; }
.clue-detail .ico { flex-basis: 72px; width: 72px; height: 72px; font-size: 30px; }
.memory-text { font-family: var(--font-type); color: #12392a; background: linear-gradient(180deg, rgba(124,255,178,.2), rgba(124,255,178,.05)); border-left: 3px solid #3e8a64; padding: 10px 12px; }
.stat-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.stat-grid dt { color: #6d6252; } .stat-grid dd { margin: 0; font-family: var(--font-type); font-weight: 700; }
.chip { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 3px; border: 1px solid #9c8358; font-size: 12px; color: #4a3d2a; background: rgba(255,255,255,.35); }

/* 结算：左印章 + 右数据 */
.result-wrap { display: flex; gap: 16px; align-items: center; }
.stamp { flex: 0 0 104px; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 54px; font-weight: 900; color: #a3352a; border: 5px double #a3352a; transform: rotate(-12deg); animation: stamp 520ms cubic-bezier(.3,1.6,.5,1); background: rgba(163,53,42,.06); }
.stamp.S { color: #1f6b45; border-color: #1f6b45; }
@keyframes stamp { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } }

/* 研究室 */
.upg { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(107,83,50,.35); }
.upg .info { flex: 1; min-width: 0; }
.upg .info b { display: block; } .upg .info span { font-size: 12px; color: #6d6252; }
.pips { font-size: 12px; color: #2f6b4f; letter-spacing: 2px; }
.points { font-family: var(--font-type); font-size: 15px; font-weight: 700; color: #2f6b4f; }

/* 章节选择 */
.chapter-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #b59a68; border-radius: var(--radius); margin-bottom: 8px; background: rgba(255,255,255,.3); }
.chapter-row .info { flex: 1; min-width: 0; } .chapter-row .info b { display: block; } .chapter-row .info span { font-size: 12px; color: #6d6252; }

/* ---------- 对质 ---------- */
.confront > .dossier { width: min(760px, 100%); height: 100%; max-height: 900px; }
.c-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.c-left { flex: 0 0 auto; display: flex; flex-direction: column; }
.c-right { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.c-intro { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: #5a4e3c; }
@media (orientation: landscape) and (max-height: 560px) {
  .c-body { flex-direction: row; }
  .c-left { flex: 1 1 55%; min-width: 0; overflow-y: auto; padding-bottom: 8px; }
  .c-right { flex: 1 1 45%; border-left: 1px dashed rgba(107,83,50,.35); }
  .c-drawer { grid-template-columns: 1fr; }
  .portrait { width: 56px; height: 56px; flex-basis: 56px; font-size: 24px; }
  .c-intro { display: none; }
  .c-statement { min-height: 64px; font-size: 15px; }
  .m-head { padding-top: 6px; padding-bottom: 4px; }
  .m-foot { padding-top: 6px; padding-bottom: 8px; }
}
@media (max-height: 700px) and (orientation: portrait) { .c-intro { display: none; } .portrait { width: 72px; height: 72px; flex-basis: 72px; } }
/* 立绘：固定 2:3 竖幅框，宽度沿用各断点的值，cover 裁切不拉伸 */
.portrait.has-art { height: auto; aspect-ratio: 2 / 3; background-size: cover; background-position: center top; background-repeat: no-repeat; }
.c-witness { display: flex; gap: 12px; align-items: center; padding: 10px 16px 0; }
.c-witness .who b { display: block; font-size: 17px; } .c-witness .who span { font-size: 12px; color: #6d6252; }
.c-statement { margin: 10px 16px 0; padding: 12px 14px; min-height: 96px; border: 1px solid #9c8358; border-radius: var(--radius); background: #1c2522; color: #e9dfc8;
  font-family: var(--font-type); font-size: 16px; line-height: 1.6; position: relative; }
.c-statement.done { color: #8fb8a3; text-decoration: line-through; text-decoration-color: rgba(181,70,58,.8); }
.c-statement .num { position: absolute; right: 8px; top: 4px; font-size: 11px; color: var(--muted); text-decoration: none; }
.c-nav { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 16px 0; }
.c-nav .dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.c-nav .dot { width: 10px; height: 10px; border-radius: 50%; background: #b5a684; border: 1px solid #6b5332; }
.c-nav .dot.cur { background: #2a3530; box-shadow: 0 0 0 2px rgba(124,255,178,.5); }
.c-nav .dot.ok { background: #a3352a; }
.c-reply { margin: 8px 16px 0; font-size: 14px; line-height: 1.55; color: #4a3d2a; min-height: 22px; }
.c-drawer-label { padding: 8px 16px 4px; font-size: 13px; color: #6d6252; }
.c-drawer { flex: 1; min-height: 64px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; padding: 0 16px 4px; align-content: start; -webkit-overflow-scrolling: touch; }
.objection { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.objection span { font-size: clamp(40px, 12vw, 84px); font-weight: 900; letter-spacing: .1em; color: #f4ecd8; padding: 10px 28px; background: #a3352a; border: 4px double #f4ecd8;
  transform: rotate(-8deg); box-shadow: 0 10px 40px rgba(0,0,0,.7); animation: stamp 480ms cubic-bezier(.3,1.6,.5,1); }

/* ---------- 反馈层 ---------- */
#fx-vignette { position: fixed; inset: 0; z-index: 15; pointer-events: none; opacity: 0; transition: opacity 420ms; box-shadow: inset 0 0 120px 40px rgba(181,70,58,.85); }
#fx-vignette.on { opacity: 1; transition: none; }
#fx-memory { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 900ms; background: radial-gradient(ellipse at center, rgba(124,255,178,.08), rgba(31,74,54,.55)); mix-blend-mode: screen; }
#fx-memory.on { opacity: 1; }
#subtitle { position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(100dvh - var(--stage-h) + 14px); max-width: 90vw; padding: 8px 14px; border-radius: 4px; background: rgba(5,12,9,.7);
  color: #bfffdc; font-family: var(--font-type); font-style: italic; font-size: 15px; text-align: center; text-shadow: 0 0 8px rgba(124,255,178,.7); opacity: 0; transition: opacity 600ms; pointer-events: none; }
#subtitle.on { opacity: 1; }
@media (orientation: landscape) { #subtitle { bottom: calc(14px + var(--safe-b)); left: calc(var(--stage-w) / 2); max-width: 56vw; } }
body:not(.mode-play) #subtitle { display: none; }
#toasts { position: fixed; z-index: 50; top: calc(76px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { padding: 8px 14px; border-radius: 4px; background: rgba(20,28,25,.94); border: 1px solid var(--brass); color: var(--paper); font-size: 14px; text-align: center; animation: slideUp 260ms ease-out; box-shadow: var(--shadow); }
.toast.bad { border-color: var(--danger); color: #ffc9bf; }
.toast.good { border-color: var(--fog); color: #c9ffe0; }
.float { position: fixed; z-index: 45; pointer-events: none; font-family: var(--font-type); font-weight: 700; font-size: 18px; color: #ff8b7a; text-shadow: 0 2px 4px #000; animation: floatUp 1.1s ease-out forwards; }
.float.good { color: var(--fog); }
@keyframes floatUp { to { transform: translateY(-48px); opacity: 0; } }
.shake { animation: shake 360ms; }
@keyframes shake { 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 2px); } }
body.failing #stage { filter: saturate(.2) blur(2px); transition: filter 1s; }

.hidden { display: none !important; }

/* ---------- 生成界面外壳：CSS border-image 九宫格（切片按源图实测装饰宽度，fill 保留纸纹/铜面中心） ----------
   border-image-width 只负责绘制；实际 border-width + padding 给装饰留位，文字只在内框里。 */
.dossier {
  background: #e3d6b7; background-clip: padding-box;
  border: 14px solid transparent; box-shadow: none; filter: drop-shadow(0 8px 16px rgba(0,0,0,.55));
  border-image: url('assets/ui_panel_dossier.webp') 200 fill / 38px / 0 stretch;
}
#dossier > .dossier { padding: 14px 16px; }
.m-head { padding: 10px 10px 8px 14px; }
.btn {
  clip-path: none; border-radius: 0; box-shadow: none;
  background: #5b4526; background-clip: padding-box;
  border: 6px solid transparent; padding: 6px 20px 0; /* 按实测内框安全区（上缘铜边较厚）下移文字 */
  border-image: url('assets/ui_btn_brass.webp') 72 190 fill / 7px 18px / 0 stretch;
}
.btn.small { padding: 6px 12px 0; }
.d-actions .btn { padding: 6px 6px 0; }
.btn.secondary { background: #2a3230; background-clip: padding-box; filter: saturate(.25) brightness(.78); }
.btn.danger { background: #5a221c; background-clip: padding-box; filter: sepia(.5) hue-rotate(-28deg) saturate(1.8) brightness(.85); }
.btn.fog { background: #17382a; background-clip: padding-box; filter: hue-rotate(78deg) saturate(1.2) brightness(.9); color: #f1fff7; }
.btn.secondary:hover:not(:disabled) { filter: saturate(.35) brightness(.92); }
.btn.danger:hover:not(:disabled) { filter: sepia(.5) hue-rotate(-28deg) saturate(1.8) brightness(1); }
.btn.fog:hover:not(:disabled) { filter: hue-rotate(78deg) saturate(1.3) brightness(1.05); }
.btn.pulse { animation: none; box-shadow: 0 0 14px 1px rgba(124,255,178,.5); }
.icon-btn { padding: 7px 0 0; font-size: 18px; border-width: 5px; border-image-width: 6px 10px; border-image-slice: 72 120 fill; }
.card {
  background: #eadfc2; background-clip: padding-box;
  border: 7px solid transparent; padding: 3px 8px; box-shadow: none;
  border-image: url('assets/ui_card_clue.webp') 160 fill / 16px / 0 stretch;
}
.card.unknown { background: transparent; filter: grayscale(.7) opacity(.62); }
.card.memory { background: #cfe8d8; background-clip: padding-box; filter: hue-rotate(75deg) saturate(.8) brightness(1.04); }
.gauge {
  background: #121815; background-clip: padding-box; box-shadow: none;
  border: 6px solid transparent; padding: 3px 14px; border-radius: 0;
  border-image: url('assets/ui_hud_gauge.webp') 52 170 fill / 7px 22px / 0 stretch;
}
.btn:disabled, .btn.secondary:disabled, .btn.danger:disabled, .btn.fog:disabled { filter: grayscale(.9) brightness(.55); }
