/* Workstation: instrument desk by the reference layout.
   Top bar, parchment side panel, big 3D model on a themed surface, icon column,
   segmented toggle, key strip with arrows and a full-width recording console.
   Loads after edition.css and reuses its tokens and lower-page components. */

.ws {
  --desk-ink: #f1e6d4;
  --desk-muted: #c3b19a;
  --desk-line: rgba(241, 230, 212, .22);
  --parchment: #f3ead9;
  --parchment-2: #e8dcc6;
  --parchment-line: #cdbb9f;
  --parchment-ink: #2a1f17;
  --pill: #7a2a20;
  --pill-ink: #fbf1e3;
  --desk-image: none;
  --desk-shade: rgba(14, 10, 8, .55);
  --paper-image: none;
  background: var(--paper) var(--paper-image) center / 900px repeat;
}
.ws.rubel {
  --accent: #8e2f23;
  --pill: #7c2b21;
  --desk-image: url("art/bg-rubel-stage.jpg");
  --paper-image: url("art/bg-rubel-paper.jpg");
  --stage: #261d17;
}
.ws.spoons {
  --accent: #b33a26;
  --gold: #c99a3c;
  --pill: #8f2a1c;
  --desk-image: url("art/bg-spoons-stage.jpg");
  --paper-image: url("art/bg-spoons-paper.jpg");
  --stage: #241813;
}
.ws.ocarina {
  --accent: #a4502f;
  --pill: #8a3f24;
  --desk-image: url("art/bg-ocarina-clay.jpg");
  --desk-shade: rgba(255, 246, 232, .18);
  --desk-ink: #2d1d14;
  --desk-muted: #6e5444;
  --desk-line: rgba(45, 29, 20, .2);
  --stage: #e2cfb8;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Top bar */
.ws-top {
  position: relative;
  z-index: 5;
  background: rgba(20, 14, 10, .92);
  color: var(--desk-ink);
  border-bottom: 1px solid rgba(201, 154, 60, .28);
}
.ws.ocarina .ws-top { background: rgba(246, 237, 224, .94); border-bottom-color: rgba(138, 63, 36, .25); }
.ws-top-in {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  width: min(1480px, 100% - 2 * var(--gutter));
  min-height: 64px;
  margin-inline: auto;
}
.ws-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.ws-emblem { flex: none; width: 34px; height: 34px; color: var(--gold); }
.ws-brand b { font: 400 1.18rem/1 "Old Standard TT", Georgia, serif; letter-spacing: .01em; white-space: nowrap; }
.ws-divider { width: 1px; height: 26px; background: var(--desk-line); }
.ws-nav { display: flex; gap: clamp(14px, 2.2vw, 30px); margin-left: auto; }
.ws-nav a {
  position: relative;
  padding: 22px 0 20px;
  color: var(--desk-muted);
  font-size: .86rem;
  text-decoration: none;
  white-space: nowrap;
}
.ws-nav a:hover { color: var(--desk-ink); }
.ws-nav a[aria-current="true"] { color: var(--desk-ink); }
.ws-nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 2px;
  background: var(--accent);
}

/* Desk */
.ws-desk {
  position: relative;
  isolation: isolate;
  color: var(--desk-ink);
  background: var(--stage);
  background-image: linear-gradient(var(--desk-shade), var(--desk-shade)), var(--desk-image);
  background-size: cover;
  background-position: center;
}
.ws-desk::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(70% 60% at 58% 42%, transparent 40%, rgba(8, 5, 3, .5) 100%);
  pointer-events: none;
}
.ws.ocarina .ws-desk::after { background: radial-gradient(70% 60% at 58% 42%, transparent 50%, rgba(120, 76, 48, .2) 100%); }
.ws-desk-in {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 36px);
  width: min(1480px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(20px, 2.6vw, 34px) 0 clamp(20px, 2.6vw, 32px);
}

/* Parchment side panel */
.ws-side { display: flex; flex-direction: column; gap: 14px; align-self: start; }
.ws-card {
  position: relative;
  padding: 18px 16px 16px;
  border: 1px solid var(--parchment-line);
  border-radius: 14px;
  background: var(--parchment) var(--paper-image) center / 600px;
  color: var(--parchment-ink);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7), inset 0 0 0 4px rgba(255, 252, 245, .35);
}
.ws.ocarina .ws-card { box-shadow: 0 18px 40px -26px rgba(90, 50, 25, .55), inset 0 0 0 4px rgba(255, 252, 245, .35); }
.ws-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font: 400 1.08rem/1.2 var(--sub);
}
.ws-card h2::after { content: ""; flex: 1; height: 1px; background: var(--parchment-line); }
.ws-card p { margin: 0; color: #5d4c3e; font-size: .8rem; line-height: 1.45; }
.ws-card p + p { margin-top: 8px; }
.ws-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ws-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 120ms ease-out;
}
.ws-list a:hover { background: rgba(122, 42, 32, .08); }
.ws-list a[aria-current="page"] { background: var(--pill); color: var(--pill-ink); }
.ws-list svg { width: 34px; height: 34px; }
.ws-list b { display: block; font: 400 .98rem/1.15 var(--sub); }
.ws-list small { display: block; color: #7a6656; font-size: .72rem; }
.ws-list a[aria-current="page"] small { color: rgba(251, 241, 227, .75); }
.ws-all { display: inline-block; margin-top: 10px; padding-left: 6px; color: #7a6656; font-size: .76rem; }

/* Tool choice inside the parchment card */
.ws-choices { display: grid; gap: 4px; }
.ws-choices button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-align: left;
}
.ws-choices button:hover { border-color: var(--parchment-line); }
.ws-choices button[aria-pressed="true"] { background: var(--pill); color: var(--pill-ink); }
.ws-choices kbd { font: 600 .68rem/1 var(--font); opacity: .7; }
.ws-card label { display: grid; gap: 6px; margin-top: 10px; font-size: .78rem; color: #5d4c3e; }
.ws-card input[type="range"] { width: 100%; accent-color: var(--pill); }
.ws-current { display: block; margin: 2px 0 10px; font: 400 1.6rem/1.1 var(--display); color: var(--pill); }

/* Centre */
.ws-center { min-width: 0; }
.ws-title { display: grid; justify-items: center; gap: 4px; text-align: center; }
.ws-title h1 {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font: 400 clamp(2.2rem, 4.4vw, 3.6rem)/1 var(--display);
  letter-spacing: .01em;
}
.ws-mark { width: clamp(26px, 3vw, 40px); height: auto; color: var(--gold); }
.ws-sub {
  margin: 6px 0 0;
  color: var(--desk-muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.ws-hint { margin: 6px 0 0; color: var(--desk-ink); font-size: .86rem; opacity: .86; }

/* Stage with the model */
.ws-stage { position: relative; margin-top: clamp(8px, 1.4vw, 16px); color: var(--desk-ink); }
.ws-stage:fullscreen { display: grid; align-content: center; background: var(--stage) var(--desk-image) center / cover; }
.ws-stage .model { height: clamp(360px, 54svh, 580px); }
.ws-stage:fullscreen .model { height: 100svh; }
.ws-stage .model:focus-visible { outline: 2px solid var(--desk-ink); outline-offset: -4px; border-radius: 14px; }
.ws-stage .status {
  position: absolute;
  left: 4px;
  bottom: 8px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 11, 8, .55);
  color: #f1e6d4;
  font-size: .8rem;
  pointer-events: none;
}
.ws.ocarina .ws-stage .status { background: rgba(255, 248, 238, .78); color: #3a261a; }
.ws-stage .status:empty { display: none; }
.ws-tools {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}
.ws-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(201, 154, 60, .45) !important;
  border-radius: 50%;
  background: rgba(20, 14, 10, .62) !important;
  color: #f1e6d4 !important;
  backdrop-filter: blur(6px);
  transition: background-color 120ms ease-out, transform 120ms ease-out;
}
.ws.ocarina .ws-icon { border-color: rgba(138, 63, 36, .35) !important; background: rgba(255, 249, 240, .82) !important; color: #4a2c1c !important; }
.ws-icon:hover { transform: scale(1.06); }
.ws-icon svg { width: 22px; height: 22px; }
.ws-icon[aria-pressed="true"] { background: var(--pill) !important; color: var(--pill-ink) !important; border-color: var(--pill) !important; }
.ws-icon[data-keys][aria-pressed="true"] { background: rgba(20, 14, 10, .62) !important; color: #f1e6d4 !important; border-color: rgba(201, 154, 60, .45) !important; }
.ws.ocarina .ws-icon[data-keys][aria-pressed="true"] { background: rgba(255, 249, 240, .82) !important; color: #4a2c1c !important; }
.ws-icon[data-keys][aria-pressed="false"]::after,
.ws-icon[data-sound][aria-pressed="true"]::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
.ws-icon[data-sound][aria-pressed="true"] { background: rgba(20, 14, 10, .62) !important; color: #e7a08f !important; border-color: #e7a08f !important; }
.ws-icon::before {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 10px);
  padding: 5px 10px;
  border-radius: 6px;
  background: #1c140f;
  color: #f1e6d4;
  font-size: .74rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
}
.ws-icon:hover::before, .ws-icon:focus-visible::before { opacity: 1; }
.ws-views {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(16, 11, 8, .5);
  backdrop-filter: blur(6px);
}
.ws-views span { padding: 0 8px 0 10px; align-self: center; color: var(--desk-muted); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
.ws-views button { min-height: 30px; padding: 0 12px; border-radius: 999px; color: #e9dcc8; font-size: .78rem; }
.ws-views button[aria-pressed="true"] { background: #f1e6d4; color: #2a1f17; }
.ws-stage .orbit-steps:not([hidden]) {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 8px;
  display: flex;
  gap: 4px;
  transform: translateX(-50%);
}
.ws-stage .orbit-steps button { width: 38px; height: 38px; border-radius: 50%; background: rgba(16, 11, 8, .62); color: #f1e6d4; border: 1px solid rgba(201, 154, 60, .45); }
.ws-stage .capture-dock:not([hidden]) { top: 6px; left: 50%; transform: translateX(-50%); }
.ws-caption { margin: 8px 0 0; color: var(--desk-muted); font-size: .74rem; text-align: center; }

/* Segmented toggle */
.ws-seg {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.ws-seg-in {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--parchment-line);
  border-radius: 999px;
  background: var(--parchment);
  color: var(--parchment-ink);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .7);
}
.ws-seg-in > span { align-self: center; padding: 0 10px 0 12px; color: #7a6656; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; }
.ws-seg button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: .84rem;
  white-space: nowrap;
}
.ws-seg button[aria-pressed="true"] { background: var(--pill); color: var(--pill-ink); }
.ws-seg button:disabled { color: #a3907e; cursor: not-allowed; }

/* Key strip */
.ws-strip-wrap { position: relative; margin-top: 12px; }
.ws-strip { overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.ws-strip::-webkit-scrollbar { display: none; }
.ws-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--parchment-line) !important;
  border-radius: 50%;
  background: var(--parchment) !important;
  color: var(--parchment-ink) !important;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .7);
  transform: translateY(-50%);
}
.ws-arrow[data-strip-prev] { left: -14px; }
.ws-arrow[data-strip-next] { right: -14px; }
.ws-arrow svg { width: 16px; height: 16px; }
.ws-strip-wrap:not(.is-overflowing) .ws-arrow { display: none; }
.ws-strip-wrap .ws-arrow:disabled { opacity: .35; cursor: default; }

/* Rubel ribs: the grid shares the model's width; studio.js lines the columns up with the ribs. */
.ws .rib-grid button {
  min-height: 58px;
  border: 1px solid var(--parchment-line);
  border-top: 3px solid #3a2a20;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(#f7efe1, #e9dcc6);
  color: var(--parchment-ink);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .8);
}
.ws .rib-grid button:hover { background: #fffaf1; }
.ws .rib-grid button.is-sounding { background: var(--pill); color: var(--pill-ink); border-color: var(--pill); }
.ws .rib-grid kbd { color: #7a6656; }
.ws-strip-note { margin: 8px 0 0; color: var(--desk-muted); font-size: .74rem; text-align: center; }

/* Compact technique keys (rubel "Приёмы", spoons strip) */
.ws-keys { display: flex; justify-content: center; gap: 3px; min-width: 100%; width: max-content; padding: 2px 2px 10px; }
.ws-keys button {
  position: relative;
  display: grid;
  align-content: end;
  gap: 2px;
  flex: 1 0 104px;
  max-width: 132px;
  min-height: 112px;
  padding: 10px 10px 12px;
  border: 1px solid var(--parchment-line);
  border-top: 3px solid #3a2a20;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(#f8f0e2, #e8dbc4);
  color: var(--parchment-ink);
  text-align: left;
  box-shadow: 0 10px 20px -14px rgba(0, 0, 0, .85);
  transition: transform 90ms ease-out, background-color 100ms ease-out, opacity 120ms ease-out;
}
.ws-keys button:hover { background: #fffaf1; }
.ws-keys button:active { transform: translateY(2px); }
.ws-keys button[aria-pressed="true"] { background: var(--pill); color: var(--pill-ink); border-color: var(--pill); }
.ws-keys .k-note { font: 600 .64rem/1 var(--font); letter-spacing: .08em; opacity: .65; }
.ws-keys .k-name { font: 400 .98rem/1.1 var(--sub); hyphens: manual; overflow-wrap: normal; }
.ws-keys kbd {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 20px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font: 600 .66rem/1 var(--font);
  text-align: center;
  opacity: .55;
}
.ws-keys button.is-dimmed { opacity: .35; }
.ws-keys .k-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mvp); margin-bottom: 4px; }
.ws-keys .k-dot.dopp { background: var(--gold); }
.ws-keys .k-dot.extra { background: var(--extra); }

/* Ocarina piano strip */
.ws-piano {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--white-keys, 9), minmax(64px, 1fr));
  min-width: 600px;
  height: clamp(150px, 16vw, 196px);
  padding: 0 0 8px;
}
.ws-piano[aria-busy="true"] { opacity: .55; }
.ws-piano .note {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 2px;
  margin: 0;
  padding: 0 0 12px;
  border: 1px solid #b9a07f;
  border-left-width: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(#fffaf1, #efe3cf);
  color: #3a261a;
  font-size: .9rem;
  box-shadow: inset 0 -6px 0 rgba(120, 80, 50, .08), 0 10px 22px -16px rgba(60, 30, 15, .8);
  transition: background-color 90ms ease-out, transform 90ms ease-out;
}
.ws-piano .note:first-child { border-left-width: 1px; }
.ws-piano .note:hover { background: #fffdf8; }
.ws-piano .note[aria-pressed="true"] { background: linear-gradient(#e9a884, #c46a43); color: #fff6ec; transform: translateY(2px); }
.ws-piano .note:disabled { cursor: wait; }
.ws-piano .note-name { font: 400 1.05rem/1 var(--sub); }
.ws-piano .note-ru { font-size: .7rem; color: #7a5a44; }
.ws-piano kbd { margin-top: 4px; font: 600 .64rem/1 var(--font); color: #9a7c64; }
.ws-piano .note[aria-pressed="true"] .note-ru, .ws-piano .note[aria-pressed="true"] kbd { color: #fff1e4; }
.ws-piano .accidental {
  position: absolute;
  z-index: 2;
  top: 0;
  left: calc(100% / var(--white-keys) * var(--key-boundary));
  width: calc(100% / var(--white-keys) * .62);
  height: 60%;
  padding-bottom: 8px;
  border: 1px solid #2a1810;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(#4a3022, #24160f);
  color: #f3e4d2;
  transform: translateX(-50%);
  box-shadow: 0 8px 14px -6px rgba(30, 15, 8, .8);
}
.ws-piano .accidental:hover { background: linear-gradient(#5b3b2a, #2f1d14); }
.ws-piano .accidental .note-name { font-size: .78rem; }
.ws-piano .accidental .note-ru { display: none; }
.ws-piano .accidental kbd { color: #c9ad95; }
.ws-piano .accidental[aria-pressed="true"] { background: linear-gradient(#c46a43, #8a3f24); transform: translateX(-50%) translateY(2px); }
.ws-piano.no-hotkeys kbd { visibility: hidden; }
.ws-piano .note:focus-visible { outline: 3px solid #3b2216; outline-offset: -4px; }
.ws-retry { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.ws-retry button { min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); }

/* Ocarina model fallback */
.model.is-fallback { display: grid; place-items: center; }
.model-fallback { max-width: 34ch; padding: 16px 20px; border-radius: 12px; background: rgba(255, 249, 240, .85); color: #3a261a; text-align: center; }

/* Recording console (daw.js markup) */
.ws-console {
  grid-column: 1 / -1;
  padding: 14px 16px 12px;
  border: 1px solid var(--parchment-line);
  border-radius: 16px;
  background: var(--parchment) var(--paper-image) center / 600px;
  color: var(--parchment-ink);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .85), inset 0 0 0 4px rgba(255, 252, 245, .35);
}
.ws-console-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.ws-console-head h2 { margin: 0; font: 400 1.12rem/1.2 var(--display); }
.ws-console-head p { margin: 0; color: #7a6656; font-size: .76rem; }
.daw { --head: 300px; }
.daw-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 8px 10px;
  border: 1px solid var(--parchment-line);
  border-radius: 12px;
  background: rgba(255, 251, 243, .6);
}
.daw-buttons { display: flex; gap: 4px; }
.daw-buttons button, .daw-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--parchment-line) !important;
  border-radius: 50% !important;
  background: #fffaf2 !important;
}
.daw-buttons button:hover, .daw-toggle:hover { background: #fff !important; }
.daw-buttons svg, .daw-toggle svg, .daw-volume svg, .daw-mix svg, .daw-add svg { width: 18px; height: 18px; }
.daw-rec { color: #b8321f; }
.daw-rec[aria-pressed="true"], .daw.is-recording .daw-rec { background: #b8321f !important; color: #fff !important; border-color: #b8321f !important; }
.daw.is-playing [data-daw-play] { background: var(--pill) !important; color: var(--pill-ink); border-color: var(--pill) !important; }
.daw-toggle[aria-pressed="true"] { background: var(--pill) !important; color: var(--pill-ink); border-color: var(--pill) !important; }
.daw-time {
  min-width: 118px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #241912;
  color: #f6dfb8;
  font: 600 1rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.daw-field { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: #7a6656; }
.daw-field select {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--parchment-line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--parchment-ink);
}
.daw-volume { display: inline-flex; align-items: center; gap: 6px; color: #7a6656; }
.daw-volume input { width: 110px; accent-color: var(--pill); }
.daw-mix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--parchment-line) !important;
  border-radius: 999px;
  background: #fffaf2 !important;
  font-size: .8rem;
}
.daw-mix:disabled { opacity: .45; cursor: not-allowed; }
.daw-scroll { margin-top: 10px; overflow-x: auto; border: 1px solid var(--parchment-line); border-radius: 12px; background: rgba(255, 251, 243, .55); }
.daw-grid { position: relative; display: grid; grid-template-columns: var(--head) minmax(0, 1fr); min-width: 760px; }
.daw-corner {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--parchment-line);
  color: #7a6656;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.daw-ruler {
  position: relative;
  height: 28px;
  border-bottom: 1px solid var(--parchment-line);
  cursor: pointer;
  background-image: linear-gradient(to right, rgba(42, 31, 23, .22) 1px, transparent 1px);
  background-size: var(--bar, 3.3333%) 100%;
}
.daw-ruler span {
  position: absolute;
  bottom: 4px;
  padding-left: 4px;
  border-left: 1px solid rgba(42, 31, 23, .5);
  color: #6b5848;
  font: 500 .64rem/1 ui-monospace, Menlo, monospace;
  pointer-events: none;
}
.daw-ruler:focus-visible { outline: 2px solid var(--pill); outline-offset: -2px; }
.daw-rows { grid-column: 1 / -1; }
.daw-row { display: grid; grid-template-columns: var(--head) minmax(0, 1fr); min-height: 64px; border-bottom: 1px solid rgba(205, 187, 159, .6); }
.daw-row:last-child { border-bottom: 0; }
.daw-head {
  display: grid;
  grid-template-columns: 22px 26px minmax(0, 1fr) 26px 26px 64px 26px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  border-right: 1px solid var(--parchment-line);
  border-left: 4px solid var(--track);
}
.daw-arm {
  width: 18px;
  height: 18px;
  border: 2px solid #b8321f !important;
  border-radius: 50% !important;
  background: transparent !important;
}
.daw-row.is-armed .daw-arm { background: #b8321f !important; box-shadow: 0 0 0 3px rgba(184, 50, 31, .2); }
.daw-row.is-recording .daw-arm { animation: daw-pulse 1s ease-in-out infinite; }
@keyframes daw-pulse { 50% { box-shadow: 0 0 0 6px rgba(184, 50, 31, .05); } }
.daw-icon { display: grid; place-items: center; color: var(--track); }
.daw-name { min-width: 0; }
.daw-name b { display: block; overflow: hidden; font: 400 .9rem/1.15 var(--sub); text-overflow: ellipsis; white-space: nowrap; }
.daw-name small { display: block; overflow: hidden; color: #7a6656; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.daw-ms {
  width: 26px;
  height: 24px;
  border: 1px solid var(--parchment-line) !important;
  border-radius: 5px !important;
  background: #fffaf2 !important;
  font: 700 .7rem/1 var(--font);
}
.daw-ms[data-track-mute][aria-pressed="true"] { background: #6b5848 !important; color: #fff; }
.daw-ms[data-track-solo][aria-pressed="true"] { background: #d9a441 !important; color: #2a1f17; }
.daw-gain { width: 64px; accent-color: var(--track); }
.daw-menu { position: relative; }
.daw-menu summary { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; list-style: none; }
.daw-menu summary::-webkit-details-marker { display: none; }
.daw-menu summary:hover { background: rgba(42, 31, 23, .08); }
.daw-menu summary svg { width: 16px; height: 16px; }
.daw-menu-list {
  position: absolute;
  z-index: 6;
  top: 100%;
  right: 0;
  display: grid;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--parchment-line);
  border-radius: 10px;
  background: #fffaf2;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .5);
}
.daw-menu-list button { min-height: 34px; padding: 0 10px; border-radius: 6px; text-align: left; font-size: .82rem; }
.daw-menu-list button:hover:not(:disabled) { background: rgba(42, 31, 23, .07); }
.daw-menu-list button:disabled { opacity: .45; cursor: not-allowed; }
.daw-row.is-silent .daw-lane { opacity: .4; }
.daw-lane {
  position: relative;
  min-width: 0;
  background-image:
    linear-gradient(to right, rgba(42, 31, 23, .16) 1px, transparent 1px),
    linear-gradient(to right, rgba(42, 31, 23, .06) 1px, transparent 1px);
  background-size: var(--bar, 3.3333%) 100%, var(--beat, .8333%) 100%;
}
.daw-lane.is-empty::after {
  content: "Пусто";
  position: absolute;
  left: 12px;
  top: 50%;
  color: #a3907e;
  font-size: .72rem;
  transform: translateY(-50%);
}
.daw-row.is-armed .daw-lane { background-color: rgba(184, 50, 31, .05); }
.daw-clip {
  position: absolute;
  top: 6px;
  bottom: 6px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--track) 70%, #000);
  border-radius: 6px;
  background: color-mix(in srgb, var(--track) 22%, #fffaf2);
}
.daw-clip canvas { display: block; width: 100%; height: 100%; }
.daw-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--head) + (100% - var(--head)) * var(--p, 0));
  width: 2px;
  margin-left: -1px;
  background: #b8321f;
  pointer-events: none;
}
.daw-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid #b8321f; }
.daw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.daw-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px dashed #a3907e !important;
  border-radius: 999px;
}
.daw-add:hover { background: rgba(255, 255, 255, .5) !important; }
.daw-add:disabled { opacity: .45; }
.daw-status { flex: 1; min-width: 220px; margin: 0; color: #4d3d31; font-size: .8rem; }
.daw-note { margin: 0; color: #8c7866; font-size: .72rem; }

/* Lower page on the paper texture */
.ws main > .section { background: transparent; }
.ws .section:first-of-type { border-top: 0; }

/* Phones and tablets */
/* Laptop and tablet landscape: keep the side column, just narrower. */
@media (max-width: 1180px) {
  .ws-desk-in { grid-template-columns: 216px minmax(0, 1fr); gap: 20px; }
}
/* Tablet portrait: one column, cards under the strip. Phones are out of scope. */
@media (max-width: 900px) {
  .ws-desk-in { grid-template-columns: minmax(0, 1fr); }
  .ws-side { order: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .ws-center { order: 1; }
  .ws-console { order: 3; }
  .ws-side > :first-child { grid-column: 1 / -1; }
  .ws-list { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .ws-list a { grid-template-columns: 28px minmax(0, 1fr); gap: 6px; min-height: 46px; }
  .ws-list svg { width: 28px; height: 28px; }
}
@media (max-width: 720px) {
  .ws-arrow { display: none; }
  .ws-top-in { min-height: 56px; }
  .ws-divider, .ws-nav { display: none; }
  .ws-brand b { font-size: 1.02rem; }
  .ws-title h1 { font-size: 2.1rem; gap: 10px; }
  .ws-sub { letter-spacing: .18em; }
  .ws-stage .model { height: clamp(280px, 46svh, 360px); }
  .ws-tools { top: auto; bottom: 6px; transform: none; flex-direction: row; gap: 6px; }
  .ws-icon { width: 40px; height: 40px; }
  .ws-icon::before { display: none; }
  .ws-stage .status { bottom: 54px; }
  .ws-views { position: static; justify-content: center; margin: 0 0 6px; }
  .ws-arrow[data-strip-prev] { left: -6px; }
  .ws-arrow[data-strip-next] { right: -6px; }
  .ws-list small { display: none; }
  .ws-list a { padding: 6px; }
  .daw { --head: 220px; }
  .daw-head { grid-template-columns: 20px minmax(0, 1fr) 24px 24px 24px; }
  .daw-icon, .daw-gain { display: none; }
  .daw-mix { margin-left: 0; }
  .ws-console { padding: 12px 10px; }
}
@media (pointer: coarse) {
  .ws-keys kbd, .ws-piano kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-icon, .ws-keys button, .ws-piano .note { transition: none; }
  .ws-strip { scroll-behavior: auto; }
  .daw-row.is-recording .daw-arm { animation: none; }
}

/* Ocarina: play like in the hands. */
.oc-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Side card: top view of the body with the holes. */
.oc-map { position: relative; aspect-ratio: 200 / 132; margin: 6px -4px 12px; }
.oc-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.oc-hole {
  position: absolute; transform: translate(-50%, -50%); border-radius: 50%; padding: 0;
  border: 0; background: radial-gradient(circle at 50% 60%, #120502 55%, #3a1a0c);
  box-shadow: 0 0 0 2px #8a4526, inset 0 2px 3px rgba(0, 0, 0, .6);
  color: rgba(245, 230, 211, .8); display: grid; place-items: center; cursor: pointer;
  font: 600 8px/1 var(--font); transition: background .12s, box-shadow .12s, transform .12s;
}
.oc-hole:hover { box-shadow: 0 0 0 2px #f3d2b4, inset 0 2px 3px rgba(0, 0, 0, .6); }
.oc-hole.is-under { box-shadow: 0 0 0 2px #8a4526, 0 0 0 4px rgba(138, 69, 38, .25); }
.oc-hole[aria-pressed="true"] {
  background: radial-gradient(circle at 40% 35%, #fbe0c8, #e2a985 60%, #c98462);
  color: #5a2a14; box-shadow: 0 0 0 2px #fff4e8, 0 3px 6px rgba(70, 30, 10, .35);
  transform: translate(-50%, -50%) scale(1.18);
}
.oc-hole:focus-visible { outline: 2px solid var(--pill); outline-offset: 3px; }

/* Finger strip under the model. */
.oc-hands { display: grid; gap: 12px; margin-top: 14px; }
.oc-fingers { display: flex; align-items: stretch; justify-content: center; gap: 14px; }
.oc-hand {
  display: flex; gap: 4px; padding: 6px; border-radius: 16px;
  background: rgba(255, 250, 240, .55); box-shadow: inset 0 0 0 1px var(--parchment-line), 0 10px 26px -20px rgba(70, 35, 15, .6);
}
.oc-finger {
  display: grid; justify-items: center; align-content: center; gap: 5px;
  width: 70px; min-height: 92px; padding: 8px 4px; border: 1px solid var(--parchment-line); border-radius: 11px;
  background: linear-gradient(#fffaf2, #f1e5d1); color: var(--parchment-ink);
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .08s, background .12s, border-color .12s;
}
.oc-finger:hover { border-color: #b98e6c; }
.oc-finger.is-small { width: 56px; }
.oc-finger.is-thumb { background: linear-gradient(#f4e8d6, #e6d5bc); border-style: dashed; }
.oc-dot {
  width: var(--hole); height: var(--hole); border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #120502 55%, #3a1a0c); box-shadow: 0 0 0 3px #b8774f;
  transition: background .12s, box-shadow .12s;
}
.oc-fname { font: 400 .74rem/1 var(--font); color: #6d5847; }
.oc-finger kbd { font: 600 .66rem/1 var(--font); padding: 3px 6px; border-radius: 5px; background: rgba(42, 31, 23, .08); color: #6d5847; }
.oc-finger[aria-pressed="true"] { background: linear-gradient(#f6d7bd, #e7b08d); border-color: #c98462; transform: translateY(2px); }
.oc-finger[aria-pressed="true"] .oc-dot { background: radial-gradient(circle at 40% 35%, #fff0e2, #e8b28f 65%); box-shadow: 0 0 0 3px #fff4e8, 0 2px 6px rgba(70, 30, 10, .4); }
.oc-finger[aria-pressed="true"] .oc-fname { color: #5a2a14; }
.oc-finger:focus-visible, .oc-blow:focus-visible { outline: 3px solid var(--pill); outline-offset: 2px; }

.oc-blow {
  position: relative; flex: none; display: grid; justify-items: center; align-content: center; gap: 4px;
  width: 112px; height: 112px; align-self: center; border-radius: 50%; padding: 0;
  border: 1px solid var(--pill); background: radial-gradient(circle at 50% 35%, #fffaf2, #efe0c8);
  color: var(--pill); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 14px 30px -18px rgba(90, 40, 20, .7), inset 0 0 0 6px rgba(255, 255, 255, .5);
  transition: background .15s, color .15s, transform .08s;
}
.oc-blow svg { width: 26px; height: 26px; }
.oc-blow-label { font: 400 1.15rem/1 var(--sub); }
.oc-blow kbd { font: 600 .6rem/1 var(--font); letter-spacing: .06em; opacity: .7; }
.oc-blow[aria-pressed="true"] { background: radial-gradient(circle at 50% 35%, #a2402f, var(--pill)); color: var(--pill-ink); transform: scale(.97); }
.oc-blow.is-latched::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--pill); }
.oc-blow-rings { position: absolute; inset: 0; pointer-events: none; }
.oc-blow-rings i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--pill); opacity: 0; }
.oc-blow[aria-pressed="true"] .oc-blow-rings i { animation: oc-breath 1.6s ease-out infinite; }
.oc-blow[aria-pressed="true"] .oc-blow-rings i:nth-child(2) { animation-delay: .53s; }
.oc-blow[aria-pressed="true"] .oc-blow-rings i:nth-child(3) { animation-delay: 1.06s; }
@keyframes oc-breath { from { transform: scale(1); opacity: .55; } to { transform: scale(1.55); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .oc-blow-rings i { animation: none !important; } }

.oc-under { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; }
.oc-tip { max-width: 520px; margin: 0; color: #6d5847; font-size: .78rem; line-height: 1.45; }
.oc-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.oc-actions button {
  min-height: 34px; padding: 0 14px; border: 1px solid var(--parchment-line); border-radius: 999px;
  background: rgba(255, 250, 240, .7); color: var(--parchment-ink); font: inherit; font-size: .8rem; cursor: pointer;
}
.oc-actions button:hover { border-color: #b98e6c; background: #fffaf2; }

@media (max-width: 1180px) {
  .oc-finger { width: 58px; min-height: 84px; }
  .oc-finger.is-small { width: 48px; }
  .oc-blow { width: 96px; height: 96px; }
  .oc-fingers { gap: 8px; }
}
@media (max-width: 900px) {
  .oc-fingers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "blow blow" "left right"; gap: 10px; }
  .oc-blow { grid-area: blow; justify-self: center; }
  .oc-hand[data-hand="left"] { grid-area: left; }
  .oc-hand[data-hand="right"] { grid-area: right; }
  .oc-hand { min-width: 0; }
  .oc-finger, .oc-finger.is-small { flex: 1 1 0; width: auto; min-width: 0; }
  .oc-fname { font-size: .66rem; }
}

/* ---------- Fresco edition (2026-11-17) ----------
   Desk on a faded fresco wall, flat rule-based panels, no pills, no diamond marks.
   Remove this block to roll back. */
.ws.rubel { --desk-image: url("art/bg-fresco-mimes.jpg"); --desk-shade: rgba(16, 11, 8, .72); }
.ws.spoons { --desk-image: url("art/bg-fresco-feast.jpg"); --desk-shade: rgba(18, 9, 6, .74); }
.ws.ocarina { --desk-image: url("art/bg-fresco-plaster.jpg"); --desk-shade: rgba(250, 240, 226, .5); }
.ws-mark { display: none; }
.ws-title h1 { gap: 0; letter-spacing: 0; }
.ws.rubel .ws-title h1 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); letter-spacing: .03em; }
.ws.spoons .ws-title h1 { font-size: clamp(3rem, 6vw, 5rem); line-height: .9; }
.ws.ocarina .ws-title h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); }
.ws-sub { font: italic 400 1.02rem/1.3 var(--sub); letter-spacing: .01em; text-transform: none; }

.ws-card, .ws-console { border-radius: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 24px 40px -30px rgba(0, 0, 0, .8); }
.ws.ocarina .ws-card { box-shadow: 0 24px 40px -30px rgba(90, 50, 25, .55); }
.ws-card h2 { font-family: var(--display); font-size: 1.2rem; }
.ws.spoons .ws-card h2 { font-size: 1.45rem; }
.ws-card h2::after { background: currentColor; opacity: .25; }

.ws-list a { border-radius: 0; border-left: 2px solid transparent; padding-left: 8px; }
.ws-list a:hover { background: rgba(122, 42, 32, .06); }
.ws-list a[aria-current="page"] { background: transparent; color: var(--pill); border-left-color: var(--pill); }
.ws-list a[aria-current="page"] small { color: #7a6656; }
.ws-choices button { border-radius: 0; border: 0; border-bottom: 1px solid rgba(42, 31, 23, .12); }
.ws-choices button:hover { border-color: rgba(42, 31, 23, .12); background: rgba(122, 42, 32, .05); }
.ws-choices button[aria-pressed="true"] { background: transparent; color: var(--pill); box-shadow: inset 2px 0 0 var(--pill); font-weight: 600; }

.ws-seg-in { border-radius: 0; padding: 0; gap: 0; background: transparent; border: 0; border-bottom: 1px solid var(--desk-line); box-shadow: none; color: var(--desk-ink); }
.ws-seg-in > span { color: var(--desk-muted); font: italic 400 .9rem/1 var(--sub); letter-spacing: 0; text-transform: none; }
.ws-seg button { border-radius: 0; color: var(--desk-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ws-seg button:hover { color: var(--desk-ink); }
.ws-seg button[aria-pressed="true"] { background: transparent; color: var(--desk-ink); border-bottom-color: var(--pill-ink); }
.ws.ocarina .ws-seg button[aria-pressed="true"] { border-bottom-color: var(--pill); }
.ws-seg button:disabled { color: var(--desk-muted); opacity: .5; }

.ws-views { border-radius: 0; background: transparent; backdrop-filter: none; padding: 0; gap: 14px; }
.ws-views span { font: italic 400 .85rem/1 var(--sub); letter-spacing: 0; text-transform: none; padding: 0; }
.ws-views button { border-radius: 0; padding: 0 2px; min-height: 28px; border-bottom: 1px solid transparent; color: var(--desk-muted); }
.ws-views button[aria-pressed="true"] { background: transparent; color: var(--desk-ink); border-bottom-color: currentColor; }
.ws-stage .status { border-radius: 2px; }

.ws-icon { border-radius: 2px; backdrop-filter: none; }
.ws-icon:hover { transform: none; background: rgba(20, 14, 10, .85) !important; }
.ws.ocarina .ws-icon:hover { background: #fffaf2 !important; }
.ws-arrow { border-radius: 2px; }
.ws-stage .orbit-steps button { border-radius: 2px; }

.ws .rib-grid button, .ws-keys button { border-radius: 0; }
.ws-piano .note { border-radius: 0 0 3px 3px; }
.ws-piano .accidental { border-radius: 0 0 3px 3px; }
.ws-retry button, .oc-actions button, .daw-mix, .daw-add { border-radius: 2px; }
.daw-transport, .daw-scroll { border-radius: 2px; }
.daw-buttons button, .daw-toggle { border-radius: 2px !important; }
.oc-hand { border-radius: 2px; }
.oc-finger { border-radius: 2px; }
.model-fallback { border-radius: 2px; }

/* ChatGPT fresco set (2026-11-17): Marianna's backgrounds, empty centres need a lighter shade */
.ws.rubel { --desk-image: url("art/bg-cg-rubel.jpg"); --desk-shade: rgba(14, 9, 6, .38); }
.ws.spoons { --desk-image: url("art/bg-cg-spoons.jpg"); --desk-shade: rgba(16, 8, 5, .36); }
.ws.ocarina { --desk-image: url("art/bg-cg-ocarina.jpg"); --desk-shade: rgba(250, 240, 226, .22); }
