:root { --glass: #fffcf5ed; --sidebar-glass: #f4eedff2; --rim: #ffffffa6; }
:root[data-theme=dark] { --glass: #1d192eee; --sidebar-glass: #262139e8; --rim: #ffffff0e; }
.page-shell { width: min(1280px, calc(100% - 72px)); }
.site-header { padding-block: 24px; flex-wrap: wrap; gap: 12px; }
.header-actions { margin-left: auto; }
.hero { padding: 18px 4px 31px; }
h1 { font-size: clamp(33px, 3.2vw, 45px); font-weight: 550; }
.hero-aside { font-size: 13px; }
.workspace { grid-template-columns: 198px minmax(0,1fr); border-radius: 24px; background: var(--surface); box-shadow: 0 22px 65px var(--shadow), inset 0 1px 0 var(--rim); }
.sidebar { padding: 25px 12px; background: var(--elevated); }
.nav-label { font-size: 9px; letter-spacing: 1.4px; margin: 2px 13px 17px; }
.tool-nav { gap: 5px; }
.tool-nav a { min-height: 59px; gap: 12px; padding: 11px 12px; border-radius: 12px; }
.tool-nav a > span:not(.nav-arrow) { font-size: 13px; }
.tool-nav a small { font-size: 10px; }
.tool-nav a[aria-current=page] { box-shadow: inset 0 0 0 1px var(--checked-border), 0 2px 5px var(--shadow); }
.nav-arrow { display: none; }
.tool { padding: 30px 34px; }
.tool-heading .eyebrow { font-size: 8px; letter-spacing: 1.5px; }
.tool-heading h2 { font-size: 27px; font-weight: 620; }
.button { border-radius: 11px; border-color: var(--border); box-shadow: 0 1px 2px var(--shadow); min-height: 40px; }
.button.primary { box-shadow: inset 0 1px 0 #ffffff25, 0 2px 5px var(--shadow); }
.button.quiet { box-shadow: none; }
.segments { border-radius: 12px; border: 1px solid var(--border); gap: 2px; padding: 3px; }
.segments span { border-radius: 8px; min-height: 33px; padding-block: 7px; }
.segments input:checked + span { box-shadow: 0 2px 5px var(--shadow); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), textarea, select { border-radius: 11px; }
.generated-box, .result, .character-options label { border-radius: 15px; }
.theme-button { background: var(--header-hover); box-shadow: inset 0 1px 0 var(--rim); }
dialog { border-radius: 25px; border: 1px solid var(--strong-border); background: var(--surface); box-shadow: 0 30px 100px #100a2859; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; }
.dialog-top { gap: 12px; }
.dialog-top > button { flex: none; }
#wheel-save-note { margin: -6px 0 16px; }
dialog::backdrop { background: #100c284d; }
.small-button { border-radius: 9px; }
.wheel-focused .site-header, .wheel-focused .hero, .wheel-focused .sidebar, .wheel-focused .site-footer { display: none; }
.wheel-focused .page-shell { padding-block: 16px; width: min(1140px, calc(100% - 32px)); }
.wheel-focused .workspace { display: block; }
.wheel-focused .wheel-play-layout { grid-template-columns: minmax(0,1fr) 240px; }
.wheel-focused .wheel-disc { width: min(100% - 20px, 48vh, 440px); }
.wheel-focused .wheel-result-card { min-height: 88px; padding-bottom: 22px; }
.wheel-focused .wheel-tool > .tool-heading { margin-bottom: 15px; }
@supports (backdrop-filter: blur(18px)) {
  .workspace { background: var(--glass); }
  .sidebar { background: var(--sidebar-glass); backdrop-filter: blur(18px); }
  dialog { background: var(--glass); backdrop-filter: blur(24px); }
  dialog::backdrop { backdrop-filter: blur(5px); }
}
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), textarea, select { font-size: 16px !important; }
  .wheel-focused .wheel-play-layout { grid-template-columns: 1fr; }
  .wheel-focused .page-shell { width: calc(100% - 20px); padding-block: 10px; }
  .wheel-focused .wheel-disc { width: min(100% - 20px, 440px); }
  .page-shell { width: calc(100% - 32px); }
  .site-header { padding-block: 21px; }
  .hero { padding: 14px 1px 25px; }
  .workspace { grid-template-columns: 1fr; border-radius: 21px; }
  .sidebar { padding: 10px; }
  .tool-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; overflow: visible; }
  .tool-nav a { min-width: 0; min-height: 50px; padding: 7px 4px; flex-direction: column; justify-content: center; gap: 4px; }
  .tool-nav a > span:not(.nav-arrow) { font-size: 11px; }
  .tool-nav a:last-child { grid-column: span 2; flex-direction: row; gap: 9px; }
  .tool-nav a .icon { width: 18px; height: 18px; }
  .tool { padding: 25px 24px; }
}
@media (max-width: 440px) {
  .page-shell { width: calc(100% - 20px); }
  .site-header { padding: 20px 4px; }
  .hero { padding: 9px 5px 23px; }
  h1 { font-size: 32px; }
  .workspace { border-radius: 19px; }
  .tool { padding: 23px 17px; }
  .wheel-tool { padding: 20px 15px; }
  .sidebar { padding: 8px; }
  .tool-nav a { min-height: 47px; }
  .segments span { padding-inline: 10px; }
}
@media (prefers-reduced-transparency: reduce) { .workspace, dialog { background: var(--surface); backdrop-filter: none; } .sidebar { background: var(--elevated); backdrop-filter: none; } dialog::backdrop { backdrop-filter: none; } }
@media (max-width: 600px) {
  .character-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .switch-row > span, .setting-row > label { min-width: 0; overflow-wrap: anywhere; }
  .setting-row { flex-wrap: wrap; }
  .wheel-stepper { flex: none; }
}
@media (pointer: coarse) {
  .button, .small-button, .about-button, .theme-button, .icon-button, .wheel-enable, .wheel-delete, .wheel-card-menu summary, .wheel-card-actions button, .wheel-stepper button, .wheel-tag { min-height: 44px; }
  .theme-button, .icon-button { min-width: 44px; }
  .conversion-grid { grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); }
  .segments span { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .check-line, .method-note summary, .wheel-history-details summary, .wheel-bulk-details summary { min-height: 44px; }
  input[type=range] { min-height: 36px; }
}
@media (forced-colors: active) { .workspace, .sidebar, dialog { background: Canvas; backdrop-filter: none; } .tool-nav a[aria-current=page] { outline: 2px solid Highlight; } }
