.order-page { min-height: 100svh; background: var(--bg-primary); }
.order-topbar { max-width: 1160px; margin: 0 auto; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.order-back, .order-top-actions, .order-gallery-link { display: flex; align-items: center; gap: 10px; }
.order-back { font-weight: 600; }
.order-top-actions .btn { padding: 10px 14px; font-size: .85rem; }
.order-main { max-width: 1160px; padding: 24px 24px 64px; margin: auto; }
.order-heading { text-align: center; margin-bottom: 36px; }
.order-heading-icon { width: 58px; height: 58px; border-radius: var(--radius-lg); background: var(--bg-secondary); color: var(--accent-blue); display: grid; place-items: center; margin: 0 auto 18px; }
.order-heading-icon svg { width: 30px; height: 30px; }
.order-eyebrow { color: var(--text-secondary); font-size: .72rem; letter-spacing: .1em; margin-bottom: 10px; }
.order-heading h1 { font-size: clamp(1.8rem,4vw,2.5rem); letter-spacing: -.04em; }
.order-description { color: var(--text-secondary); line-height: 1.7; margin-top: 14px; }
.order-login-panel { max-width: 440px; margin: 0 auto; border: 1px solid var(--border-glass); border-radius: var(--radius-xl); padding: 30px; background: var(--bg-secondary); }
.order-login-panel h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.order-login-panel > p { color: var(--text-secondary); line-height: 1.6; font-size: .9rem; margin-top: 14px; }
.order-login-panel form { display: grid; gap: 10px; margin-top: 22px; }
.order-page input, .order-page select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 10px 14px; background: var(--bg-primary); color: var(--text-primary); font-size: 16px; }
.order-page label { font-size: .88rem; font-weight: 600; }
.order-login-panel button { margin-top: 10px; }
.order-toolbar { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 32px 24px; background: var(--bg-secondary); border: 1px solid var(--border-glass); border-radius: var(--radius-xl); }
.order-controls { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.order-primary-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; width: min(100%, 720px); }
.order-primary-actions .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 16 / 9; padding: 22px 28px; font-size: 1.3rem; font-weight: 750; line-height: 1.4; gap: 16px; white-space: normal; text-align: center; }
.order-primary-actions .btn svg { width: 56px; height: 56px; flex-shrink: 0; }
.order-page button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.order-primary-actions .btn:disabled { filter: saturate(.12); }
.order-status { min-height: 24px; margin-top: 20px; font-size: .92rem; line-height: 1.7; white-space: pre-line; }
.order-status.error { color: var(--danger, #ef4444); }
.order-status:empty { display: none; }
.order-draw-time { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; width: fit-content; max-width: 100%; margin: 24px auto 0; padding: 18px 26px; border: 1px solid var(--border-glass); border-radius: var(--radius-lg); background: var(--bg-secondary); text-align: center; font-size: 1.05rem; line-height: 1.7; }
.order-draw-time > span { color: var(--text-secondary); }
.order-draw-time time { font-weight: 700; font-variant-numeric: tabular-nums; }
.order-tracks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; align-items: start; }
.order-tracks[hidden], #order-gallery-link[hidden], #order-apply[hidden] { display: none; }
.order-track-panel { padding: 24px; border: 1px solid var(--border-glass); border-radius: var(--radius-xl); background: var(--bg-secondary); }
.order-track-column { display: grid; gap: 24px; min-width: 0; }
.order-track-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-session { font-size: .75rem; color: var(--accent-blue); margin-bottom: 6px; font-weight: 600; }
.order-track-heading h2 { font-size: 1.35rem; }
.order-count { color: var(--text-secondary); font-size: .8rem; white-space: nowrap; }
.order-track-state { color: var(--text-secondary); font-size: .82rem; margin: 14px 0 6px; }
.order-track-state:empty { display: none; }
.order-track-state.preview { color: var(--accent-blue); font-weight: 600; }
.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 14px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border-subtle); }
.order-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.order-number { font-weight: 700; color: var(--accent-blue); font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.order-project-name { display: block; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.order-project-creator { display: block; color: var(--text-secondary); font-size: .85rem; margin-top: 5px; overflow-wrap: anywhere; }
.order-unassigned { display: inline-block; color: var(--text-secondary); font-size: .75rem; margin-top: 6px; }
.order-empty { padding: 38px 0; text-align: center; color: var(--text-secondary); font-size: .9rem; }
.order-gallery-link { justify-content: center; width: fit-content; max-width: 100%; margin: 8px auto 0; font-size: 1rem; font-weight: 600; }
.order-proceed { display: flex; justify-content: center; width: 100%; min-height: 88px; font-size: 1.2rem; font-weight: 700; }
.order-proceed svg { width: 26px; height: 26px; }
.order-footer { padding: 20px 24px 32px; text-align: center; font-size: .78rem; color: var(--text-secondary); }
.order-page a:focus-visible, .order-page button:focus-visible, .order-page input:focus-visible, .order-page select:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 3px; }
@media(max-width:760px) { .order-tracks { grid-template-columns: minmax(0,1fr); } .order-main { padding: 16px 16px 40px; } .order-topbar { padding: 20px 16px; } .order-toolbar { padding: 24px 20px; } .order-primary-actions { gap: 14px; } .order-primary-actions .btn { padding: 14px 16px; font-size: 1.1rem; } .order-login-panel { padding: 24px; } }
@media(max-width:540px) { .order-primary-actions { grid-template-columns: minmax(0,1fr); max-width: 360px; } }

/* Draw ceremony: full, uniform rings and borders, with no one-sided accents. */
.order-sound-row { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin: 14px 0 22px; }
.order-sound-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--border-glass); border-radius: 10px; color: var(--text-secondary); background: transparent; font: inherit; font-size: .78rem; white-space: nowrap; cursor: pointer; }
.order-sound-toggle svg { width: 17px; height: 17px; }
.order-sound-toggle:hover { color: var(--text-primary); background: var(--bg-secondary); }
.order-drawing { overflow: hidden; }
.order-draw-show { position: fixed; inset: 0; margin: auto; padding: 0; width: min(640px, calc(100vw - 32px)); max-width: none; max-height: calc(100svh - 32px); overflow: auto; border: 1px solid rgba(165, 180, 252, .3); border-radius: 32px; color: #f8fafc; background: radial-gradient(ellipse at 50% 38%, rgba(88, 59, 196, .32), transparent 58%), #0a1026; box-shadow: 0 0 100px rgba(99, 102, 241, .2), 0 28px 100px rgba(0, 0, 0, .55); }
.order-draw-show::backdrop { background: rgba(3, 7, 18, .8); backdrop-filter: blur(12px); }
.order-draw-show[open] { animation: draw-arrive .3s ease-out both; }
.draw-show-content { position: relative; z-index: 1; padding: 38px 32px 26px; text-align: center; }
.draw-eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .64rem; color: #c4b5fd; font-weight: 700; letter-spacing: .18em; }
.draw-eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: #67e8f9; box-shadow: 0 0 14px #67e8f9; }
.draw-show-content h2 { color: #f8fafc; font-size: clamp(1.35rem, 4.7vw, 1.85rem); margin: 14px 0 8px; letter-spacing: -.04em; }
.draw-description { color: #a5b4cf; font-size: .85rem; }
.draw-orbit { width: 278px; height: 278px; position: relative; display: grid; place-items: center; margin: 18px auto 8px; }
.draw-ring { position: absolute; inset: 18px; border: 1px solid rgba(165, 180, 252, .35); border-radius: 50%; animation: draw-orbit 4s linear infinite; }
.draw-ring::before, .draw-ring::after { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #67e8f9; box-shadow: 0 0 18px #67e8f9; left: calc(50% - 4px); top: -4px; }
.draw-ring::after { top: auto; bottom: -4px; background: #c4b5fd; box-shadow: 0 0 18px #a78bfa; }
.draw-ring-middle { inset: 37px; animation-duration: 3s; animation-direction: reverse; border-style: dashed; border-color: rgba(103, 232, 249, .25); }
.draw-ring-inner { inset: 56px; animation-duration: 5.5s; border-color: rgba(196, 181, 253, .22); }
.draw-ring-inner::before, .draw-ring-inner::after { width: 5px; height: 5px; top: -2px; }
.draw-ring-inner::after { top: auto; bottom: -2px; }
.draw-core { width: 138px; height: 138px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, .17), rgba(139, 92, 246, .16)); border: 1px solid rgba(165, 180, 252, .25); box-shadow: 0 0 55px rgba(139, 92, 246, .25), inset 0 0 25px rgba(56, 189, 248, .1); }
#draw-countdown { font-size: 5.4rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 35px rgba(103, 232, 249, .65); }
.draw-success-mark { display: none; width: 76px; height: 76px; color: #a7f3d0; }
.draw-spark { position: absolute; color: #c4b5fd; font-size: 22px; animation: draw-float 2s ease-in-out infinite alternate; }
.spark-one { top: 34px; right: 9px; }.spark-two { bottom: 39px; left: 6px; color: #67e8f9; animation-delay: -.7s; }.spark-three { bottom: 1px; right: 40px; font-size: 17px; animation-delay: -1.3s; }
.draw-ticker { display: grid; gap: 8px; min-height: 70px; padding: 12px 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(165, 180, 252, .13); border-radius: 14px; }
#draw-ticker-label { color: #a5b4fc; font-size: .6rem; font-weight: 700; letter-spacing: .22em; }
#draw-project-ticker { color: #f1f5f9; font-size: .96rem; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draw-progress { height: 3px; margin-top: 22px; background: rgba(165, 180, 252, .16); border-radius: 4px; overflow: hidden; }
.draw-progress span { display: block; height: 100%; background: linear-gradient(90deg, #a78bfa, #67e8f9); transform: scaleX(0); transform-origin: left center; }
.draw-show-status { color: #b5c2d9; font-size: .8rem; margin: 14px 0 20px; line-height: 1.5; }
.draw-show-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.draw-show-actions .order-sound-toggle { border-color: rgba(165, 180, 252, .25); color: #cbd5e1; background: transparent; }
#draw-show-skip { border: 0; padding: 9px 4px; color: #cbd5e1; background: transparent; font: inherit; font-size: .8rem; cursor: pointer; }
#draw-show-skip:hover { color: #fff; }
.draw-confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.is-revealed .draw-ring { animation-duration: 10s; border-color: rgba(110, 231, 183, .3); }
.is-revealed .draw-core { border-color: rgba(110, 231, 183, .5); box-shadow: 0 0 65px rgba(52, 211, 153, .3); transition: box-shadow .4s; }
.is-revealed #draw-countdown { display: none; }.is-revealed .draw-success-mark { display: block; animation: draw-arrive .3s ease-out; }
.order-result-reveal { animation: draw-result .55s ease-out both; }
.order-track-column .order-result-reveal { animation-delay: .12s; }
@keyframes draw-orbit { to { transform: rotate(360deg); } }
@keyframes draw-float { to { transform: translateY(-7px) rotate(15deg); } }
@keyframes draw-arrive { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes draw-result { from { opacity: .4; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media(max-width:600px) {
  .order-draw-show { border-radius: 24px; }
  .draw-show-content { padding: 28px 20px 20px; }
  .draw-orbit { margin-top: 8px; width: 250px; height: 250px; }
  .draw-core { width: 112px; height: 112px; }
  #draw-countdown { font-size: 4.5rem; }
}
@media(max-height:650px) {
  .draw-show-content { padding-top: 22px; }
  .draw-orbit { width: 210px; height: 210px; margin: 6px auto; }
  .draw-core { width: 98px; height: 98px; }
  #draw-countdown { font-size: 3.7rem; }
}
@media(prefers-reduced-motion:reduce) {
  .order-draw-show *, .order-draw-show[open], .order-result-reveal { animation: none !important; transition: none !important; }
}
.is-reduced .draw-ring, .is-reduced .draw-spark { animation: none; }

.order-toast { position:fixed;left:50%;top:50%;z-index:1000;width:max-content;max-width:calc(100vw - 32px);padding:19.2px 26.4px;border:1px solid #22c55e;border-radius:16.8px;background:#166534;color:#fff;box-shadow:0 12px 36px #0004;text-align:center;font-size:1.14rem;font-weight:600;line-height:1.6;pointer-events:none;opacity:0;transform:translate(-50%,calc(-50% + 12px));transition:opacity .18s ease,transform .18s ease; }
.order-toast.is-visible { opacity:1;transform:translate(-50%,-50%); }
@media(prefers-reduced-motion:reduce) { .order-toast { transition:none; } }

@keyframes order-shuffle-icon {
  0% { transform:rotate(0) scale(1); }
  18% { transform:rotate(-20deg) scale(1.08); }
  70% { transform:rotate(375deg) scale(1.14); }
  85%,100% { transform:rotate(360deg) scale(1); }
}
@keyframes order-check-icon {
  0%,100% { transform:translateY(0) rotate(0) scale(1); }
  30% { transform:translateY(-9px) rotate(-10deg) scale(1.16); }
  55% { transform:translateY(1px) rotate(8deg) scale(.98); }
  75% { transform:translateY(-4px) rotate(-3deg) scale(1.08); }
}
@keyframes order-play-icon {
  0%,100% { transform:translateY(0) rotate(0) scale(1); }
  35% { transform:translateY(-5px) rotate(-10deg) scale(1.18); }
  60% { transform:translateY(1px) rotate(6deg) scale(.98); }
  80% { transform:translateY(-2px) rotate(0) scale(1.06); }
}
@keyframes order-arrow-icon {
  0%,100% { transform:translateX(0); }
  50% { transform:translateX(7px); }
}
@media(hover:hover) and (pointer:fine) {
  #order-draw:not(:disabled):hover svg { animation:order-shuffle-icon 1.1s ease-in-out infinite; }
  #order-apply:not(:disabled):hover svg { animation:order-check-icon 1.1s ease-in-out infinite; }
  #order-proceed:hover svg:first-child { animation:order-play-icon 1.1s ease-in-out infinite; }
  #order-proceed:hover svg:last-child { animation:order-arrow-icon 1.1s ease-in-out infinite; }
}
@media(prefers-reduced-motion:reduce) {
  .order-primary-actions .btn svg, #order-proceed svg { animation:none!important; }
}
