/* Ephemeral Rolodex Soup. One explicit theme, no dark mode switch (Magpie's standing rule). */
:root {
  color-scheme: dark;
  --plum: #1f1224;
  --blush: #f6e3da;
  --foxglove: #d8508f;
  --sage: #8fae8b;
  --gold: #c9a24b;
  --teal: #4fb3a9;
  --ink: #120a15;
  --card: #f3e6d3;
  --broth: #c4501f;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: var(--plum); color: var(--blush); }
body {
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(ellipse at 50% 100%, #123532 0%, transparent 65%),
    repeating-linear-gradient(0deg, #24152a 0 38px, #1f1224 38px 76px);
}
main { max-width: 560px; margin: 0 auto; padding: 28px 16px 60px; display: grid; gap: 30px; justify-items: center; }
.quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the card file */
.rolodex { display: flex; align-items: center; gap: 0; width: min(100%, 440px); }
.knob-side {
  flex: none; width: 44px; height: 84px; border-radius: 12px; border: 3px solid #0b070d; cursor: pointer; padding: 0;
  background: repeating-linear-gradient(0deg, #2a1c2e 0 5px, #46304c 5px 10px);
  box-shadow: inset 0 0 0 2px #0006; touch-action: none; cursor: grab;
}
.knob-side.held { cursor: grabbing; box-shadow: inset 0 0 0 2px #0006, 0 0 14px #c9a24b88; }
.knob-side:focus-visible, .filecard:focus-visible, .door:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.cradle { position: relative; flex: 1; height: 250px; perspective: 900px; }
.wires { position: absolute; left: 8%; right: 8%; top: 6px; bottom: 34px; border: 5px solid #8d8797; border-bottom: 0; border-radius: 110px 110px 0 0; }
.base { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; border-radius: 10px 10px 16px 16px; border: 3px solid #0b070d;
  background: linear-gradient(180deg, #4fb3a9, #1d5d57); box-shadow: inset 0 6px 0 #ffffff33; }
.stack i { position: absolute; left: 14%; right: 14%; bottom: 36px; height: 150px; background: #e4d3ba; border: 2px solid #2a1c2e; border-radius: 8px 8px 0 0; }
.stack i:nth-child(1) { transform: translateY(-18px) scale(.9); filter: brightness(.7); }
.stack i:nth-child(2) { transform: translateY(-12px) scale(.94); filter: brightness(.8); }
.stack i:nth-child(3) { transform: translateY(-6px) scale(.97); filter: brightness(.9); }
.filecard {
  position: absolute; left: 12%; right: 12%; bottom: 36px; height: 158px; padding: 0; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); background: var(--card); border: 2px solid #2a1c2e; border-radius: 8px 8px 0 0;
  background-image: repeating-linear-gradient(180deg, transparent 0 25px, #4fb3a955 25px 26px); background-position: 0 38px;
  background-color: #f3e6d3; transform-origin: 50% 100%; transition: transform .28s ease-in, opacity .28s ease-in; transform: rotate(var(--lean, 0deg));
}
.filecard .tab { position: absolute; top: -24px; width: 46px; height: 24px; display: grid; place-items: center; font: bold 17px/1 Georgia, serif;
  background: var(--card); border: 2px solid #2a1c2e; border-bottom: 0; border-radius: 7px 7px 0 0; }
.filecard .subject { position: absolute; left: 16px; right: 16px; top: 12px; font: bold 22px/1.15 "Courier New", Courier, monospace; letter-spacing: .04em; color: #2a1c2e; text-transform: uppercase; }
.scribbles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scribbles path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .78; }
.scribbles .amount { fill: currentColor; font: 13px/1 "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; opacity: .85; }
.scribbles .struck { stroke-width: 1.8; opacity: .7; }
.scribbles .doodle { stroke-width: 1.4; }
.scribbles .cup { fill: none; stroke: #8a5a2b; stroke-width: 3.5; opacity: .28; }
.filecard .no { position: absolute; right: 12px; top: 8px; font-size: 19px; font-weight: bold; letter-spacing: .1em; color: #7a2e55; }
.filecard .holes { position: absolute; left: 50%; bottom: 6px; width: 70px; height: 12px; transform: translateX(-50%);
  background: radial-gradient(circle at 12px 6px, #1f1224 5px, transparent 6px), radial-gradient(circle at 58px 6px, #1f1224 5px, transparent 6px); }
.filecard.fall { transform: rotateX(-96deg); opacity: 0; }
.filecard.rise { transform: rotateX(80deg); opacity: 0; transition: none; }
.filecard.gone { visibility: hidden; }
.flying { position: fixed; z-index: 10; margin: 0; pointer-events: none; transition: none; }

/* the soup */
.table { width: min(100%, 420px); }
.bowl { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; padding: 9%;
  background: radial-gradient(circle, #fffaf0 0 58%, #e9dcc6 66%, #fffaf0 70%, #cdbfa6 100%);
  box-shadow: 0 18px 40px #000a, inset 0 0 0 3px #2a1c2e; }
.broth { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 40% 35%, #e0742f, var(--broth) 55%, #8f3512 100%); box-shadow: inset 0 6px 18px #0007, 0 0 0 3px #2a1c2e; }
.broth .colour { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.noodle { position: absolute; left: 0; top: 0; width: 1.1em; text-align: center; font: bold 19px/1 "Arial Rounded MT Bold", "Trebuchet MS", Verdana, sans-serif;
  color: var(--pasta, #ffe9b0); text-shadow: 0 1px 0 #a9741f, 0 2px 3px #5a1f08; will-change: transform; transition: opacity .6s; }
.noodle.sunk { opacity: 0; }
.noodle.dim { opacity: .3; transition: opacity 1.4s; }
.noodle.by { color: #d9f0b0; text-shadow: 0 1px 0 #5e7a2a, 0 2px 3px #5a1f08; }
.bit { position: absolute; border-radius: 40%; transition: background-color 1.4s; background: var(--bit, #f08a1d); box-shadow: inset -2px -2px 0 #b35a0c; opacity: .9; }
.bit.pea { background: var(--pea, #8fae4b); box-shadow: inset -2px -2px 0 #5e7a2a; border-radius: 50%; }

/* one door */
.doors { display: flex; gap: 34px; }
.door { position: relative; display: block; width: 46px; height: 72px; border-radius: 23px 23px 3px 3px; border: 3px solid var(--gold);
  background: linear-gradient(180deg, #8d2353, #4e1230); transition: transform .3s ease, box-shadow .3s ease; }
.door:hover, .door:focus-visible { transform: translateY(-4px) rotate(-1.5deg); box-shadow: 0 0 28px #c9a24b66; }
.knob { position: absolute; right: 7px; top: 58%; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

@media (prefers-reduced-motion: reduce) { .filecard, .knob-side, .door, .noodle { transition: none !important; } }

/* a line that leads somewhere: once it is spelled, the bowl itself is the way through */
.bowl a.through { position: absolute; inset: 9%; border-radius: 50%; z-index: 3; cursor: pointer; }
.bowl a.through:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.bowl.leads .noodle:not(.dim) { animation: beckon 2.2s ease-in-out infinite; }
@keyframes beckon { 50% { color: #fff; text-shadow: 0 0 9px #ffe9a8, 0 1px 0 #a9741f; } }
@media (prefers-reduced-motion: reduce) { .bowl.leads .noodle:not(.dim) { animation: none; color: #fff; } }

.door.pie { background: linear-gradient(180deg, #e2b06a, #8a5a2b); }
