/* Base look shared by every screen: stitched indigo cloth panels, linen text with a dark outline. */
:root {
  --indigo: #2b2a4c; --linen: #f4ead5; --madder: #c8553d; --mustard: #e3b23c;
  --sage: #8aa67a; --denim: #4d6a8f; --ink: #1b1a2e; --plum: #6b4a7a;
  --font: "Trebuchet MS", "Verdana", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans", sans-serif;
}
html, body { margin: 0; height: 100%; overflow: hidden; background: #25233a; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#ui { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5;
  font-family: var(--font); color: var(--linen); font-weight: 800; overflow: hidden; }
#ui > * { pointer-events: auto; }
#ui .pass { pointer-events: none; }
.ol { text-shadow: -2px 0 var(--ink), 2px 0 var(--ink), 0 -2px var(--ink), 0 2px var(--ink), -2px -2px var(--ink), 2px 2px var(--ink), -2px 2px var(--ink), 2px -2px var(--ink), 0 3px 0 var(--ink); }

/* a stitched cloth panel */
.panel { position: absolute; background: var(--indigo); border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: inset 0 0 0 3px #3d3b66, 0 5px 0 rgba(10, 8, 24, 0.55); padding: 0.7em 0.9em; box-sizing: border-box; }
.panel::before { content: ""; position: absolute; inset: 6px; border: 2px dashed rgba(244, 234, 213, 0.45); border-radius: 6px; pointer-events: none; }

/* a button: a padded cloth plate with a sewn edge */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.35em;
  min-width: 44px; min-height: 44px; box-sizing: border-box; padding: 0.35em 0.9em; cursor: pointer;
  background: linear-gradient(#5a5890, #45437a); color: var(--linen); border: 3px solid var(--ink); border-radius: 8px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 4px 0 var(--ink); font-weight: 900;
  text-shadow: 0 2px 0 var(--ink), 1px 0 var(--ink), -1px 0 var(--ink); transition: transform 0.08s, filter 0.12s; }
.btn::after { content: ""; position: absolute; inset: 3px; border: 1.5px dashed rgba(244, 234, 213, 0.35); border-radius: 5px; pointer-events: none; }
.btn.focus { filter: brightness(1.18); transform: scale(1.05); background: linear-gradient(#e9c25a, #c99a2a); color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn.press, .btn:active { transform: translateY(3px) scale(0.97); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 1px 0 var(--ink); }
.btn.off { filter: grayscale(0.8) brightness(0.7); cursor: default; }
.btn.red { background: linear-gradient(#d86a50, #b0452f); }
.btn.green { background: linear-gradient(#9cbb88, #6f8f5f); }
.hidden { display: none !important; }
@keyframes pop-in { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slide-up { 0% { transform: translateY(30px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.pop { animation: pop-in 0.24s ease-out both; }
.slide { animation: slide-up 0.22s ease-out both; }
