/* Dozen-to-Mole Bakery: the order ticket + control and the bakery scene inside the practice shell's stage. */
.dm { position: absolute; inset: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; padding: 8px 12px; }
.dm-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 2px; }
.dm-ticket { padding: 8px 14px 10px; border-radius: var(--tlg-radius-lg, 14px); border: 2px solid #8a4b1f; background: #fff8ec; color: #2a1a10;
  box-shadow: inset 0 0 0 3px #ffffff, 0 2px 6px rgba(0, 0, 0, .08); }
.dm-ticket-k { margin: 0 0 4px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #8a4b1f; }
.dm-given { margin: 0; display: grid; gap: 4px; }
.dm-given div { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; font-size: 17px; line-height: 1.3; border-top: 1px dashed #dcc29d; padding-top: 4px; }
.dm-given div:first-child { border-top: 0; padding-top: 0; }
.dm-given dt { font-weight: 600; color: #6b4a2e; white-space: nowrap; }
.dm-given dd { margin: 0; text-align: right; font-weight: 800; }
html[data-theme="dark"] .dm-ticket { background: #2a1f17; color: #f6ead8; border-color: #e0a066; box-shadow: inset 0 0 0 3px #1e1610; }
html[data-theme="dark"] .dm-ticket-k { color: #f2b77c; }
html[data-theme="dark"] .dm-given dt { color: #dcc4a6; }
html[data-theme="dark"] .dm-given div { border-color: #5a4330; }

.dm-field { display: flex; flex-direction: column; gap: 6px; }
.dm-field-k { margin: 0; font-size: 16px; font-weight: 800; color: var(--tlg-text, #2a1a10); }
.dm-register { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #3b4148; border: 2px solid #20252a; }
.dm-input { font: inherit; font-size: 28px; font-weight: 800; width: 100%; min-width: 0; min-height: 52px; padding: 4px 10px; border-radius: 8px; border: 2px solid #20252a;
  background: #0f1d15; color: #b6f5cd; font-variant-numeric: tabular-nums; text-align: right; }
.dm-input::-webkit-outer-spin-button, .dm-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dm-input { -moz-appearance: textfield; appearance: textfield; }
.dm-input:focus-visible { outline: 3px solid #f2b77c; outline-offset: 2px; }
.dm-input:disabled { opacity: 1; color: #9fe0b8; }
.dm-unit { font-size: 20px; font-weight: 700; color: #e7ebee; }
.dm-choices { display: grid; grid-template-columns: 1fr; gap: 8px; }
.dm-choice { font: inherit; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px;
  border-radius: 12px; border: 2px solid var(--tlg-border, #b59a7a); background: var(--tlg-surface, #ffffff); color: var(--tlg-text, #2a1a10);
  font-size: 18px; line-height: 1.2; text-align: left; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.dm-choice:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.dm-choice:focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.dm-choice-t { font-weight: 700; }
.dm-choice-i { flex: 0 0 64px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #8a4b1f; }
.dm-ic svg { width: 60px; height: 30px; display: block; }
.dm-choice[aria-pressed="true"] { border-color: #8a4b1f; background: #fbe9d3; box-shadow: inset 0 0 0 2px #8a4b1f; }
.dm-choice[aria-pressed="true"] .dm-choice-t::before { content: '● '; }
.dm-choice:disabled { cursor: default; }
html[data-theme="dark"] .dm-choice[aria-pressed="true"] { background: #4a3322; border-color: #f2b77c; box-shadow: inset 0 0 0 2px #f2b77c; }
html[data-theme="dark"] .dm-choice-i { color: #f2b77c; }
.dm-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .dm-msg { color: #ffb4a8; }
.dm-about { font-size: 16px; line-height: 1.4; color: var(--tlg-text-muted, #5a4a3c); }
.dm-about summary { cursor: pointer; font-weight: 700; }
.dm-about p { margin: 6px 0 0; }

.dm-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.dm-scene { position: relative; width: 100%; aspect-ratio: 720 / 640; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: 2px solid var(--tlg-border, #c9b08c); user-select: none; -webkit-user-select: none; }
.dm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-family: inherit; }
.dm-wall { fill: url(#dm-wall); }
.dm-tile { fill: url(#dm-tile); }
html[data-theme="dark"] .dm-wall { fill: url(#dm-wall-d); }
html[data-theme="dark"] .dm-tile { fill: url(#dm-tile-d); }

.dm-badge { position: absolute; left: 2%; right: 2%; bottom: 1.6%; padding: 7px 14px; border-radius: 12px; font-size: 16px; font-weight: 700; line-height: 1.3;
  background: rgba(255, 255, 255, .96); color: #2a1a10; border: 3px solid #8a4b1f; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); animation: dm-pop .3s ease-out; pointer-events: none; }
.dm-badge--ok { border-color: #2f8a63; }
.dm-badge--bad { border-color: #c8372d; }
html[data-theme="dark"] .dm-badge { background: rgba(30, 22, 16, .96); color: #f6ead8; }
@keyframes dm-pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.dm-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }
.dm-start-svg { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .dm-badge { animation: none; } .dm-choice { transition: none; } }

@media (max-width: 1100px) { .dm { grid-template-columns: 290px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .dm { position: static; grid-template-columns: 1fr; }
  .dm-view { display: block; }
  .dm-scene { width: 100% !important; height: auto !important; }
}
