@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #123a43;
  --muted: #657981;
  --accent: #009d98;
  --accent-deep: #007c7a;
  --panel: rgba(255, 255, 255, .94);
  --surface: #fff;
  --surface-soft: #f6f9f9;
  --line: #dce8e9;
  --mint: #e4f7f2;
  --shadow: 0 8px 35px rgba(9, 111, 102, .1);
  --danger: #bd4048;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  color: var(--ink);
  background: #d3f2e6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; min-width: 0; min-height: 100vh; background: linear-gradient(180deg, rgba(238, 255, 251, .1), rgba(228, 251, 240, .16) 70%, rgba(3, 98, 98, .08)), url("assets/images/landscape.webp") center top / cover fixed no-repeat; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
button, input, select, textarea { outline: none; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .48; }
button:disabled { transform: none !important; box-shadow: none !important; }
:focus-visible { outline: 3px solid #df9f2c; outline-offset: 4px; }
img { display: block; max-width: 100%; }
button img { pointer-events: none; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px 22px; border-radius: 8px; background: var(--surface); z-index: 100; }
.skip-link:focus { top: 12px; }

.site-header { background: linear-gradient(100deg, #005e60, #087c80 58%, #06656c); color: #fff; box-shadow: 0 3px 16px #006c7026; }
.header-inner { max-width: 1512px; margin: auto; min-height: 72px; padding: 12px 32px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0; }
.brand img { object-fit: contain; filter: drop-shadow(0 2px 3px #003d3e33); }
.brand span { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.main-nav { display: flex; gap: 24px; margin: auto; align-items: stretch; }
.nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; padding: 12px 2px; background: transparent; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; opacity: .9; }
.nav-link img { width: 18px; height: 18px; }
.nav-link:hover { opacity: 1; }
.nav-link.active::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; border-radius: 2px; background: #d9fff3; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff26; border-radius: 50%; background: #ffffff06; flex-shrink: 0; }
.header-icon img { width: 20px; height: 20px; }
.header-icon:hover { background: #ffffff20; }
.header-motto { display: flex; align-items: center; gap: 12px; padding: 6px 18px; margin-left: 4px; border: 1px solid #c2fff245; border-radius: 30px; font-size: 13px; color: #c0eee4; letter-spacing: 1px; white-space: nowrap; }

main { max-width: 1504px; padding: 0 30px 20px; margin: auto; }
.page-heading { padding: 25px 0 24px; text-align: center; }
.eyebrow { font-size: 10px; letter-spacing: 3px; font-weight: 600; color: #25847f; margin-bottom: 2px; }
h1 { font-family: "STKaiti", "KaiTi", "Kaiti SC", "FangSong", serif; font-size: clamp(38px, 4.5vw, 64px); font-weight: 900; line-height: 1.17; letter-spacing: 5px; color: #005456; text-shadow: 0 2px 0 #ffffff9e; }
.page-subtitle { margin-top: 12px; font-size: 13px; color: #246b6c; letter-spacing: 1px; }
.page-subtitle span { padding: 0 7px; color: #65a69b; }
.workspace { display: grid; grid-template-columns: minmax(290px, 350px) minmax(360px, 1fr) minmax(290px, 350px); gap: 22px; align-items: start; max-width: 1440px; margin: auto; }
.panel { background: var(--panel); border: 1px solid #ffffffb3; border-radius: 21px; padding: 19px; box-shadow: var(--shadow), inset 0 0 0 1px #c9eee736; backdrop-filter: blur(14px); min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
h2 { display: flex; align-items: center; gap: 9px; font-size: 20px; line-height: 1.4; font-weight: 800; white-space: nowrap; letter-spacing: .3px; }
.heading-icon { width: 31px; height: 31px; padding: 5px; background: var(--mint); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.heading-icon img { width: 25px; height: 25px; }
.heading-icon.plain { padding: 1px; background: transparent; }
.count-badge { background: var(--mint); border-radius: 9px; padding: 5px 10px; font-size: 12px; color: var(--accent-deep); white-space: nowrap; }
.name-filter { margin-bottom: 12px; }
.name-filter input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.name-list-wrap { border: 1px solid var(--line); border-radius: 12px; padding: 5px; min-height: 72px; background: var(--surface); }
.name-list { list-style: none; padding: 0; margin: 0; max-height: 328px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #a2d8ce transparent; }
.name-row { display: flex; gap: 5px; align-items: center; padding: 4px 3px; min-width: 0; min-height: 39px; border-radius: 7px; background: var(--row-bg, transparent); }
.name-row + .name-row { margin-top: 1px; }
.name-row.dragging { opacity: .42; }
.name-row.drag-over { outline: 2px solid var(--accent); outline-offset: -2px; }
.drag-handle { font-size: 17px; line-height: 1; color: #9ba8b0; width: 13px; flex-shrink: 0; background: transparent; padding: 0; cursor: grab; text-align: center; }
.name-order { font-size: 12px; font-weight: 700; width: 17px; text-align: center; flex-shrink: 0; color: #477b73; }
.name-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot-color, #7ccfba); flex-shrink: 0; }
.name-input { display: block; width: 0; flex: 1 1 auto; min-width: 0; padding: 5px 6px; color: #15364c; border: 1px solid transparent; border-radius: 6px; background: var(--name-color, #eef8f2); font-size: 13px; font-weight: 600; }
.name-input:focus { border-color: #45b5a6; background: var(--surface); color: var(--ink); }
.row-tools { display: flex; gap: 1px; align-items: center; flex-shrink: 0; }
.icon-button { width: 25px; height: 29px; display: inline-flex; align-items: center; justify-content: center; padding: 4px; color: #77848d; background: transparent; border-radius: 6px; flex-shrink: 0; }
.icon-button img, .icon-button svg { width: 17px; height: 17px; }
.icon-button:hover { color: var(--accent-deep); background: var(--mint); }
.delete-name:hover { color: var(--danger); background: #fff0f1; }
.move-up, .move-down { width: 20px; font-size: 14px; }
.empty-state { font-size: 14px; text-align: center; padding: 36px 12px; line-height: 1.9; color: var(--ink); }
.empty-state span { font-size: 12px; color: var(--muted); }
.name-actions { display: grid; grid-template-columns: 1.13fr 1.13fr .77fr; gap: 7px; margin-top: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { border-color: #7bc8ba; background: var(--mint); }
.button img { width: 16px; height: 16px; flex-shrink: 0; }
.button-primary { border-color: transparent; background: linear-gradient(135deg, #00aaa2, #008e8b); color: #fff; box-shadow: 0 3px 8px #00948b12; }
.button-primary:hover { border-color: transparent; background: linear-gradient(135deg, #009f98, #007a79); }
.primary-button { margin-top: 12px; min-height: 42px; padding: 9px 18px; border-radius: 9px; background: var(--accent-deep); color: white; font-weight: 600; }
.button-primary img { filter: brightness(0) invert(1); }
.name-actions .button { font-size: 12px; padding: 9px 6px; gap: 5px; }
.names-note { font-size: 10px; margin-top: 9px; text-align: center; color: var(--muted); }
.draw-rules { margin: 17px 0 0; padding: 0; border: 0; min-width: 0; }
.draw-rules legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.repeat-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.repeat-options label { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 9px 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; cursor: pointer; }
.repeat-options label:has(input:checked) { border-color: var(--accent); background: var(--mint); color: var(--accent-deep); }
.repeat-options input { margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.repeat-options label:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.rules-hint { margin-top: 8px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.round-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; margin-top: 5px; }
#round-status { font-size: 11px; color: var(--accent-deep); }
.name-row.already-drawn .name-input { background: var(--surface-soft); color: var(--muted); }
.name-row.already-drawn .name-order { color: var(--accent-deep); }
.duration-section { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 16px; }
.duration-section h2 { font-size: 19px; }
.section-description { font-size: 11px; color: var(--muted); margin: 7px 0 14px 39px; }
.duration-control { display: grid; grid-template-columns: 43px 1fr 43px; gap: 12px; align-items: stretch; }
.step-button { display: grid; place-items: center; padding: 0; border: 1px solid #ccd6dc; border-radius: 10px; background: var(--surface-soft); }
.step-button:hover { background: var(--mint); border-color: var(--accent); }
.step-button img { width: 21px; height: 21px; }
.duration-field { display: flex; align-items: center; justify-content: center; border: 1px solid #c5d5d9; border-radius: 10px; background: var(--surface); min-height: 52px; gap: 4px; }
.duration-field:focus-within { outline: 3px solid #df9f2c; outline-offset: 3px; }
.duration-field input { width: 69px; height: 49px; padding: 2px 0 3px 8px; border: 0; color: var(--ink); background: transparent; font-size: 29px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.duration-field input::-webkit-inner-spin-button, .duration-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.duration-field input:focus-visible { outline: none; }
.duration-field span { font-size: 13px; padding-right: 8px; }
.field-label { display: block; font-size: 12px; font-weight: 650; }
.quick-label { margin-top: 16px; margin-bottom: 8px; }
.quick-times { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.quick-times button { min-height: 32px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); font-size: 11px; padding: 4px 0; }
.quick-times button:hover { background: var(--mint); border-color: #83c7bc; }
.quick-times button.selected, .quick-times button[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: var(--accent); }
.duration-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 13px; }
.duration-footer p { font-size: 10px; color: var(--muted); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 2px; background: transparent; color: var(--accent-deep); font-size: 11px; white-space: nowrap; border-radius: 5px; }
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.text-button img { width: 14px; height: 14px; }
.text-button.subtle { color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; }

.wheel-column { min-width: 0; display: flex; flex-direction: column; align-items: center; padding-top: 0; }
.wheel-stage { position: relative; width: 100%; max-width: 570px; aspect-ratio: 1; isolation: isolate; border-radius: 50%; }
.wheel-shadow { position: absolute; inset: 1%; border-radius: 50%; box-shadow: 0 15px 40px #0c8a7f2e; background: #0ea59b; }
#wheel-canvas { position: absolute; left: 5%; top: 5%; width: 90%; height: 90%; border-radius: 50%; z-index: 1; will-change: transform; }
.is-spinning:not(.is-settling) #wheel-canvas { filter: blur(1px); }
.wheel-rim { position: absolute; inset: 0; border-radius: 50%; border: max(10px, 1.05vw) solid #09a99f; box-shadow: inset 0 0 0 2px #b1fff1, inset 0 0 8px 3px #087a7b, 0 0 0 1px #62d7c7, 0 0 0 3px #bfffee82, 0 7px 0 #087f7a6b; background: radial-gradient(circle, transparent 64%, #007f79 65%, #16b7aa 69%, #8ce9d1 71%); pointer-events: none; z-index: 2; }
.wheel-lights { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.wheel-lights i { position: absolute; width: clamp(7px, .9vw, 12px); height: clamp(7px, .9vw, 12px); border-radius: 50%; background: #fffeda; box-shadow: 0 0 4px #ffffcf, 0 0 10px 3px #fdffb277, inset 0 0 2px #ffe976; transform: translate(-50%, -50%); }
.is-spinning .wheel-lights i:nth-child(odd) { animation: light-pulse .6s ease-in-out infinite alternate; }
.is-spinning .wheel-lights i:nth-child(even) { animation: light-pulse .6s .3s ease-in-out infinite alternate; }
@keyframes light-pulse { to { background: #ecffad; box-shadow: 0 0 2px #ffffcf, 0 0 4px #e7ff8877; opacity: .55; } }
.wheel-center { position: absolute; z-index: 5; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 27%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; padding: 0; background: linear-gradient(160deg, #ff7979, #ff4e62 55%, #f33f59); color: #fff; border: 5px solid #ffe5aa; box-shadow: 0 0 0 2px #f99b8a, 0 4px 8px #87534255, inset 0 0 0 3px #ffffff57; }
.wheel-center:hover { background: linear-gradient(160deg, #ff8580, #ff5c6d 55%, #f23e58); }
.wheel-center:disabled { opacity: 1; transform: translate(-50%, -50%) !important; }
.wheel-center span#center-label { z-index: 2; font-size: clamp(18px, 2.1vw, 31px); font-weight: 850; line-height: 1.23; text-shadow: 0 1px 1px #d72f4344; }
.wheel-pointer { position: absolute; z-index: -1; bottom: calc(100% - 6px); width: 34%; height: 43%; background: #ff596b; clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 2px #fff1be); }
.wheel-pointer::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #ff9d87, #fff2b9, #fff2b9, #ff9d87); clip-path: polygon(50% 0, 100% 100%, 88% 100%, 50% 17%, 12% 100%, 0 100%); }
.wheel-empty { position: absolute; z-index: 6; inset: 25% 16%; padding-top: 13%; text-align: center; border-radius: 50%; color: var(--ink); font-size: 20px; font-weight: 700; background: #f2fff8f0; }
.wheel-empty span { font-size: 13px; font-weight: 400; }
.wheel-caption { margin-top: 17px; text-align: center; font-size: 12px; color: #2c7a76; letter-spacing: 1px; }
.start-card { position: relative; margin-top: 15px; width: min(100%, 455px); padding: 13px 28px 14px; border: 1px solid #9edccd; border-radius: 19px; background: linear-gradient(135deg, #f8fffbeb, #e8fff5d6); box-shadow: 0 7px 20px #0b8b7a13; text-align: center; backdrop-filter: blur(8px); }
.duration-badge { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #1e5861; background: #ffffffac; border: 1px solid #d9e8e5; border-radius: 30px; padding: 4px 13px; font-size: 12px; }
.duration-badge strong { font-size: 19px; line-height: 1.2; font-variant-numeric: tabular-nums; color: #173e4f; }
.duration-badge img { width: 14px; height: 14px; margin-left: 4px; opacity: .6; }
.status-dot { width: 6px; height: 6px; background: #54c69e; border-radius: 50%; box-shadow: 0 0 0 3px #54c69e18; }
.spin-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 57px; margin-top: 12px; padding: 10px 20px; background: linear-gradient(150deg, #08ada4, #008e8b); border: 1px solid #029e96; box-shadow: inset 0 2px 0 #ffffff35, 0 3px 0 #007e7a20, 0 7px 16px #008c7b17; border-radius: 40px; color: #fff; font-size: 22px; letter-spacing: 1px; font-weight: 800; transition: filter .15s, transform .15s; }
.spin-button img { width: 23px; height: 23px; }
.spin-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.spin-button:active { transform: translateY(1px); }
.spin-button:disabled { opacity: .76; }
.spin-status { margin-top: 10px; font-size: 11px; color: #5b8982; min-height: 17px; }
#spin-progress { display: block; width: 100%; height: 5px; margin-top: 12px; overflow: hidden; border: 0; border-radius: 10px; background: #cbece0; accent-color: #09a38f; }
#spin-progress::-webkit-progress-bar { background: #cbece0; border-radius: 10px; }
#spin-progress::-webkit-progress-value { background: #09a38f; border-radius: 10px; }
#spin-progress::-moz-progress-bar { background: #09a38f; border-radius: 10px; }
.center-decoration { display: flex; align-items: center; justify-content: center; gap: 16px; width: 180px; opacity: .85; margin: 19px auto 0; }
.center-decoration span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #56ad95); }
.center-decoration span:last-child { transform: rotate(180deg); }

.right-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sound-panel .panel-heading { gap: 8px; }
.switch-label { display: flex; align-items: center; gap: 8px; font-size: 11px; cursor: pointer; position: relative; white-space: nowrap; }
.switch-label input { width: 36px; height: 21px; position: absolute; right: 0; opacity: 0; z-index: 1; cursor: pointer; }
.switch-track { width: 36px; height: 21px; background: #becbca; border-radius: 20px; transition: background .2s; }
.switch-track::before { content: ""; display: block; width: 17px; height: 17px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #004a4c26; transition: transform .2s; }
.switch-label input:checked + .switch-track { background: #05a59b; }
.switch-label input:checked + .switch-track::before { transform: translateX(15px); }
.switch-label input:focus-visible + .switch-track { outline: 3px solid #df9f2c; outline-offset: 4px; }
.sound-body { border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: var(--surface); }
.sound-select-row { display: flex; gap: 9px; margin-top: 7px; }
.select-wrap { flex: 1; min-width: 0; position: relative; }
.select-wrap::after { content: ""; position: absolute; pointer-events: none; width: 7px; height: 7px; right: 12px; top: 16px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
select { width: 100%; min-height: 41px; padding: 7px 28px 7px 10px; border: 1px solid #cfdcdf; border-radius: 7px; background: var(--surface-soft); color: var(--ink); appearance: none; font-size: 12px; font-weight: 500; }
.preview-button { min-height: 41px; font-size: 12px; padding: 7px 9px; color: var(--accent-deep); border-color: #9ddad2; background: transparent; gap: 6px; }
.preview-button span { font-size: 13px; }
.volume-row { display: flex; align-items: center; gap: 10px; margin: 20px 0; }
.volume-row label { flex-shrink: 0; }
.volume-row img { width: 18px; height: 18px; opacity: .7; }
.volume-row input { width: 0; min-width: 0; flex: 1; height: 5px; accent-color: var(--accent); cursor: pointer; }
.volume-row output { width: 33px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.upload-button { display: flex; position: relative; align-items: center; justify-content: center; gap: 8px; min-height: 40px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; }
.upload-button:hover { background: var(--mint); }
.upload-button:focus-within { outline: 3px solid #df9f2c; outline-offset: 3px; }
.upload-button img { width: 16px; height: 16px; }
.custom-audio-note { margin-top: 7px; text-align: center; font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.clear-audio { margin: 4px auto 0; display: flex; }
.audio-status { margin-top: 6px; font-size: 10px; color: var(--accent-deep); overflow-wrap: anywhere; }
.audio-status:empty { display: none; }
.history-panel { padding-bottom: 12px; }
.history-panel h2 { gap: 7px; }
.history-panel h2 small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.history-table-wrap { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; overflow: auto; max-height: 330px; scrollbar-width: thin; }
.history-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.history-table th { background: var(--surface-soft); color: #647580; font-size: 10px; font-weight: 500; padding: 10px 5px; text-align: left; position: sticky; top: 0; z-index: 1; }
.history-table th:first-child, .history-table td:first-child { width: 29px; padding-left: 10px; }
.history-table th:nth-child(2) { width: 29%; }
.history-table td { height: 38px; padding: 7px 5px; border-top: 1px solid #e6edee; line-height: 1.6; overflow-wrap: anywhere; color: var(--muted); font-variant-numeric: tabular-nums; }
.history-table td:nth-child(2) { color: var(--ink); font-weight: 600; }
.history-table tr:nth-child(even) td { background: #ecf8f326; }
.history-table td time { white-space: normal; font-size: 10px; }
.history-table .history-dot { width: 8px; height: 8px; display: inline-block; vertical-align: 0; border-radius: 50%; margin-right: 5px; }
.history-empty { min-height: 210px; padding: 38px 12px 31px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-clock { width: 43px; height: 43px; display: grid; place-items: center; background: var(--mint); border: 1px solid #d3eee5; border-radius: 50%; opacity: .65; margin-bottom: 13px; }
.empty-clock img { width: 22px; height: 22px; }
.history-empty p { color: #66877f; font-size: 12px; }
.history-empty > span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.history-footer { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-footer > span { font-size: 10px; color: var(--muted); }
.download-icon { transform: rotate(180deg); }
.privacy-hint { text-align: center; margin: 27px auto 0; color: #30746d; font-size: 11px; letter-spacing: .5px; text-shadow: 0 1px 5px #ffffff; }
.privacy-mark { margin-right: 3px; font-size: 14px; }
.site-footer { text-align: center; max-width: 750px; margin: 0 auto; padding: 13px 22px 15px; color: #d8f5e9; background: linear-gradient(110deg, #007b75ee, #006a6eee); border: 1px solid #4fc4b8a8; border-radius: 32px 32px 0 0; box-shadow: 0 4px 18px #07665b22; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
.site-footer p { margin-top: 5px; color: #a6d6cf; font-size: 10px; letter-spacing: .4px; }
.site-footer p > span { margin: 0 5px; }
.site-footer button { color: #c7eee3; padding: 0; background: transparent; font-size: 10px; }
.site-footer button:hover { text-decoration: underline; }

.dialog { color: var(--ink); width: min(470px, calc(100% - 36px)); max-height: calc(100dvh - 48px); padding: 25px; border: 1px solid #c9e4db; border-radius: 21px; background: var(--surface); box-shadow: 0 25px 100px #003a3b4d; overflow-y: auto; }
.dialog::backdrop { background: #043b3e66; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.dialog-heading h2 { font-size: 21px; }
.dialog-close { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-soft); }
.dialog textarea { width: 100%; resize: vertical; min-height: 160px; max-height: 45dvh; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); font-size: 14px; line-height: 1.8; }
.dialog-hint { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 9px; }
.form-error { min-height: 18px; margin-top: 5px; font-size: 12px; color: var(--danger); overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 19px; }
.dialog-actions .button { min-width: 90px; }
.confirm-dialog h2 { font-size: 21px; }
.confirm-message { color: var(--muted); line-height: 1.8; margin-top: 16px; font-size: 14px; }
.button-danger { color: #fff; background: #bc4b54; border-color: #bc4b54; }
.button-danger:hover { color: #fff; background: #a43d46; border-color: #a43d46; }
.winner-dialog { position: relative; padding: 25px 35px 29px; text-align: center; width: min(430px, calc(100% - 32px)); overflow: hidden; background: radial-gradient(ellipse at 50% 62%, #fff3cc80, transparent 58%), var(--surface); }
.winner-close { position: absolute; top: 13px; right: 13px; z-index: 3; }
.winner-crown { margin: 0 auto 4px; }
.winner-dialog h2 { display: block; color: #a7422c; font-size: 28px; letter-spacing: 3px; }
.winner-intro { margin-top: 9px; color: var(--muted); font-size: 13px; }
.winner-name { min-height: 78px; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 850; color: #ae291f; overflow-wrap: anywhere; word-break: break-word; padding: 10px 0; line-height: 1.3; }
.winner-note { font-size: 11px; color: #9b8b59; }
.winner-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 23px; }
.winner-actions .button { min-height: 43px; font-size: 14px; }
.winner-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.winner-sparkles i { position: absolute; display: block; width: 7px; height: 11px; background: #ffca55; top: 19%; left: 8%; transform: rotate(34deg); }
.winner-sparkles i:nth-child(2) { left: 18%; top: 8%; background: #fc887f; transform: rotate(-24deg); }
.winner-sparkles i:nth-child(3) { left: 87%; top: 16%; background: #ed81b5; transform: rotate(24deg); }
.winner-sparkles i:nth-child(4) { left: 93%; top: 42%; background: #8bcbba; transform: rotate(-14deg); }
.winner-sparkles i:nth-child(5) { left: 10%; top: 62%; background: #7cb1e8; transform: rotate(50deg); }
.winner-sparkles i:nth-child(6) { left: 83%; top: 66%; background: #fbc45c; transform: rotate(15deg); }
.winner-sparkles i:nth-child(7) { left: 4%; top: 37%; background: #bdb1ed; transform: rotate(-33deg); }
.winner-sparkles i:nth-child(8) { left: 77%; top: 7%; background: #fbc45c; transform: rotate(-15deg); }
.info-dialog { width: min(560px, calc(100% - 36px)); }
.info-content { font-size: 14px; color: var(--muted); line-height: 1.9; overflow-wrap: anywhere; }
.info-content h3 { font-size: 15px; color: var(--ink); margin: 19px 0 5px; }
.info-content h3:first-child { margin-top: 0; }
.info-content p + p { margin-top: 11px; }
.info-content ul, .info-content ol { padding-left: 22px; }
.info-content li + li { margin-top: 8px; }
.info-content a { color: var(--accent-deep); text-decoration: underline; }
.info-content code { font-size: 12px; padding: 2px 5px; border-radius: 4px; background: var(--mint); }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 36px); padding: 11px 22px; border: 1px solid #b3e7d9; border-radius: 12px; background: #075e59f5; box-shadow: 0 8px 30px #003a3b33; color: #fff; font-size: 13px; text-align: center; }
.noscript-message { position: fixed; bottom: 20px; left: 20px; right: 20px; background: #fff1d8; border: 1px solid #e0b95d; padding: 20px; text-align: center; z-index: 100; }

html[data-theme="dark"] { color-scheme: dark; --ink: #dcf0e9; --muted: #9bb6af; --accent: #10b7aa; --accent-deep: #72dcc9; --panel: rgba(16, 45, 46, .95); --surface: #183b3c; --surface-soft: #1c4142; --line: #355759; --mint: #204d49; --shadow: 0 8px 35px #00242445; --danger: #ff989d; background: #102e32; }
html[data-theme="dark"] body { background-image: linear-gradient(#042d35a6, #042a30cf), url("assets/images/landscape.webp"); }
html[data-theme="dark"] .panel { border-color: #537a702e; }
html[data-theme="dark"] h1 { color: #d7fff2; text-shadow: 0 2px 8px #002d35; }
html[data-theme="dark"] .eyebrow, html[data-theme="dark"] .page-subtitle, html[data-theme="dark"] .wheel-caption { color: #b5e5d7; }
html[data-theme="dark"] .name-row { background: transparent; }
html[data-theme="dark"] .name-input { color: #173b40; }
html[data-theme="dark"] .name-input:focus { color: var(--ink); }
html[data-theme="dark"] .name-order { color: #a9d6c7; }
html[data-theme="dark"] .start-card { background: linear-gradient(135deg, #143e3ceb, #194c45ed); border-color: #49776f; }
html[data-theme="dark"] .duration-badge { background: #214b47; border-color: #426d65; color: #b2e2d6; }
html[data-theme="dark"] .duration-badge strong { color: #e1fff6; }
html[data-theme="dark"] .spin-status, html[data-theme="dark"] .history-empty p { color: #9acaba; }
html[data-theme="dark"] .history-table td { border-color: var(--line); }
html[data-theme="dark"] .history-table th { color: var(--muted); }
html[data-theme="dark"] .privacy-hint { color: #b5e1d1; text-shadow: 0 1px 6px #123c3b; }
html[data-theme="dark"] .wheel-empty { background: #143c3cf2; }
html[data-theme="dark"] .winner-dialog h2, html[data-theme="dark"] .winner-name { color: #ffb59b; }
html[data-theme="dark"] .winner-note { color: #d0ba87; }

@media (min-width: 1440px) {
  .workspace { grid-template-columns: minmax(315px, 1fr) minmax(450px, 1.36fr) minmax(315px, 1fr); }
  .name-list { max-height: 344px; }
  .name-row { min-height: 41px; }
  .name-input { padding-top: 6px; padding-bottom: 6px; }
  .name-actions .button { min-height: 42px; font-size: 13px; }
  .section-description { font-size: 12px; }
  .duration-field { min-height: 56px; }
  .duration-control { grid-template-columns: 48px 1fr 48px; }
  .quick-times button { min-height: 34px; font-size: 12px; }
  .names-note, .duration-footer p, .custom-audio-note, .history-footer > span { font-size: 11px; }
  .sound-body { padding: 15px; }
  .volume-row { margin: 23px 0; }
  .history-empty { min-height: 235px; }
}
@media (max-width: 1220px) {
  .header-inner { gap: 22px; padding-left: 24px; padding-right: 24px; }
  .brand span { font-size: 22px; }
  .main-nav { gap: 18px; }
  .header-motto { display: none; }
  main { padding-left: 20px; padding-right: 20px; }
  .workspace { grid-template-columns: minmax(270px, 1fr) minmax(350px, 1.3fr) minmax(270px, 1fr); gap: 15px; }
  .panel { padding: 16px; }
  h2 { font-size: 18px; gap: 7px; }
  .heading-icon { width: 27px; height: 27px; }
  .heading-icon img { width: 23px; height: 23px; }
  .sound-panel .panel-heading { flex-wrap: wrap; row-gap: 8px; }
  .switch-label { margin-left: auto; }
  .duration-control { gap: 8px; grid-template-columns: 38px 1fr 38px; }
  .sound-body { padding: 11px; }
  .sound-select-row { gap: 6px; }
  .preview-button { padding: 7px; }
  .volume-row { gap: 7px; }
  .name-actions { gap: 5px; }
  .name-actions .button { font-size: 11px; }
  .name-actions .button img { width: 14px; height: 14px; }
  .name-dot { display: none; }
  .wheel-caption { letter-spacing: 0; }
  .start-card { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: 8px 20px; }
  .brand { margin-right: auto; }
  .header-actions { order: 2; }
  .main-nav { order: 3; width: 100%; justify-content: center; gap: 32px; margin-top: 1px; }
  .nav-link { padding: 8px 1px; }
  .page-heading { padding-top: 25px; padding-bottom: 24px; }
  .workspace { grid-template-columns: minmax(280px, .88fr) minmax(360px, 1.12fr); max-width: 800px; gap: 20px; }
  .wheel-column { grid-column: 2; grid-row: 1; align-self: center; }
  .names-panel { grid-column: 1; grid-row: 1; }
  .right-column { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; }
  .panel { padding: 20px; }
  .sound-panel .panel-heading { flex-wrap: nowrap; }
  .wheel-center span#center-label { font-size: 23px; }
  .wheel-lights i { width: 9px; height: 9px; }
  .wheel-rim { border-width: 12px; }
  .history-empty { min-height: 175px; }
  .privacy-hint { margin-top: 24px; }
  .site-footer { margin-top: 4px; }
}
@media (max-width: 700px) {
  body { background-attachment: scroll; background-size: auto 100vh; background-position: center 65px; background-color: #d7f4e7; }
  .header-inner { padding: 10px 16px 7px; gap: 7px 10px; }
  .brand { gap: 7px; }
  .brand img { width: 33px; height: 33px; }
  .brand span { font-size: 19px; letter-spacing: .5px; }
  .header-actions { gap: 8px; }
  .header-icon { width: 31px; height: 31px; }
  .header-icon img { width: 18px; height: 18px; }
  .main-nav { gap: 0; justify-content: space-between; }
  .nav-link { font-size: 11px; gap: 5px; padding: 8px 2px; }
  .nav-link img { width: 14px; height: 14px; }
  main { padding: 0 16px 22px; }
  .page-heading { padding: 23px 0 22px; }
  .eyebrow { font-size: 9px; letter-spacing: 2px; margin-bottom: 5px; }
  h1 { font-size: 39px; letter-spacing: 3px; }
  .page-subtitle { font-size: 10px; letter-spacing: .3px; margin-top: 10px; }
  .page-subtitle span { padding: 0 5px; }
  .workspace { display: flex; flex-direction: column; gap: 17px; max-width: 480px; }
  .wheel-column { order: 0; width: 100%; }
  .names-panel { order: 1; width: 100%; }
  .right-column { order: 2; width: 100%; display: flex; gap: 17px; }
  .wheel-stage { width: calc(100% - 9px); max-width: 430px; }
  .wheel-center { border-width: 4px; }
  .wheel-center span#center-label { font-size: clamp(22px, 6vw, 30px); }
  .wheel-rim { border-width: 11px; }
  .wheel-caption { font-size: 11px; margin-top: 16px; }
  .start-card { margin-top: 12px; width: 100%; padding: 12px 23px 12px; border-radius: 17px; }
  .spin-button { min-height: 52px; font-size: 21px; margin-top: 10px; }
  .spin-status { margin-top: 9px; }
  .center-decoration { display: none; }
  .panel { padding: 18px; border-radius: 18px; }
  h2, .duration-section h2 { font-size: 19px; }
  .panel-heading { margin-bottom: 14px; }
  .heading-icon { width: 29px; height: 29px; }
  .heading-icon img { width: 25px; height: 25px; }
  .name-list { max-height: 342px; }
  .name-row { min-height: 41px; }
  .name-input { font-size: 14px; padding: 6px 7px; }
  .name-dot { display: block; }
  .icon-button { width: 28px; height: 32px; }
  .move-up, .move-down { width: 24px; }
  .name-actions .button { font-size: 12px; min-height: 42px; }
  .name-actions .button img { width: 16px; height: 16px; }
  .names-note { margin-top: 10px; }
  .duration-control { grid-template-columns: 46px 1fr 46px; gap: 12px; }
  .duration-field { min-height: 55px; }
  .quick-times { gap: 7px; }
  .quick-times button { min-height: 35px; font-size: 12px; }
  .section-description { margin-left: 37px; font-size: 11px; }
  .duration-footer { margin-top: 13px; }
  .duration-footer p, .text-button { font-size: 11px; }
  .sound-panel .panel-heading { flex-wrap: nowrap; }
  .switch-label { font-size: 11px; }
  .sound-body { padding: 14px; }
  .field-label { font-size: 13px; }
  select { min-height: 44px; font-size: 13px; }
  .select-wrap::after { top: 17px; }
  .sound-select-row { gap: 10px; }
  .preview-button { padding: 8px 12px; font-size: 13px; }
  .volume-row { gap: 11px; margin: 23px 0; }
  .upload-button { min-height: 43px; font-size: 13px; }
  .custom-audio-note { font-size: 10px; }
  .history-empty { min-height: 190px; }
  .history-table { font-size: 12px; }
  .history-table th { font-size: 11px; }
  .history-table td time { font-size: 11px; }
  .history-table th:nth-child(2) { width: 31%; }
  .history-table td { height: 42px; }
  .privacy-hint { font-size: 10px; line-height: 1.8; margin-top: 21px; letter-spacing: 0; }
  .site-footer { width: calc(100% - 20px); border-radius: 23px 23px 0 0; padding: 14px 10px; }
  .footer-brand { gap: 5px; font-size: 10px; }
  .footer-brand img { width: 20px; height: 20px; }
  .site-footer p { font-size: 9px; letter-spacing: 0; }
  .site-footer button { font-size: 9px; }
  .dialog { padding: 21px; }
  .winner-dialog { padding: 26px 25px; }
  .winner-name { font-size: 36px; }
  .toast { bottom: 20px; width: max-content; padding: 11px 17px; font-size: 12px; }
  html[data-theme="dark"] body { background-color: #102e32; }
}
@media (max-width: 360px) {
  .header-inner { padding-left: 12px; padding-right: 12px; }
  .brand span { font-size: 17px; }
  .header-actions { gap: 6px; }
  .header-icon { width: 29px; height: 29px; }
  main { padding-left: 12px; padding-right: 12px; }
  .panel { padding: 15px; }
  h1 { font-size: 35px; }
  .nav-link { font-size: 10px; gap: 4px; }
  .name-dot { display: none; }
  .section-description { margin-left: 0; }
  .sound-body { padding: 11px; }
  .quick-times { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body { background: #fff; }
  .site-header, .wheel-column, .names-panel, .sound-panel, .site-footer, .history-footer, .privacy-hint, .toast { display: none; }
  main { max-width: none; padding: 0; }
  .workspace, .right-column { display: block; }
  .panel { border: 0; box-shadow: none; background: #fff; }
  .history-table-wrap { max-height: none; overflow: visible; }
  .history-panel .text-button { display: none; }
}
