@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root {
  color-scheme:light;
  --page:#f6f7f9;
  --paper:#fff;
  --ink:#202533;
  --muted:#737b8e;
  --line:#e8eaf0;
  --blue:#3755df;
  --blue-soft:#eef1ff;
  --orange:#e37a4b;
  --radius:18px
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  background:var(--page);
  color:var(--ink);
  font-family:'DM Sans',sans-serif;
  font-size:16px;
  -webkit-font-smoothing:antialiased
}

button,input,select {
  font:inherit
}

button {
  cursor:pointer
}

button:disabled {
  cursor:default
}

button,a,input,select {
  touch-action:manipulation
}

button {
  color:inherit
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #6782ff;
  outline-offset:4px
}

button {
  transition:background .18s,transform .18s,border-color .18s
}

button:active:not(:disabled) {
  transform:translateY(1px)
}

[hidden] {
  display:none!important
}

.site-header {
  height:86px;
  background:#fff;
  border-bottom:1px solid var(--line)
}

.header-inner {
  max-width:1248px;
  padding:0 32px;
  margin:auto;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px
}

.brand {
  display:flex;
  align-items:center;
  text-decoration:none;
  color:var(--ink);
  font-family:'Manrope',sans-serif;
  font-size:21px;
  font-weight:800;
  letter-spacing:-.7px
}

.brand-mark {
  background:var(--blue);
  color:white;
  font-family:monospace;
  font-size:19px;
  letter-spacing:-3px;
  padding-right:3px;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:11px;
  margin-right:12px
}

.brand-dot {
  color:var(--blue)
}

.header-note {
  font-size:14px;
  color:var(--muted)
}

.edition {
  font-size:12px;
  color:var(--muted);
  font-family:monospace;
  letter-spacing:1.5px
}

.container {
  max-width:1184px;
  margin:0 auto;
  padding:0 0 24px
}

.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:51px 0 32px
}

.eyebrow {
  font-family:monospace;
  letter-spacing:1.8px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  gap:9px;
  align-items:center
}

.tiny-line {
  width:19px;
  height:2px;
  background:var(--blue)
}

h1,h2,h3,p {
  margin:0
}

h1,h2 {
  font-family:'Manrope',sans-serif
}

h1 {
  font-weight:800;
  font-size:42px;
  letter-spacing:-1.7px;
  margin:10px 0 10px;
  line-height:1.2
}

h1>span {
  color:var(--blue)
}

.intro p,.panel-heading p {
  color:var(--muted);
  line-height:1.6
}

.tech-stack {
  display:flex;
  gap:7px;
  align-self:flex-end;
  margin-bottom:6px
}

.tech-stack span {
  background:white;
  border:1px solid var(--line);
  border-radius:6px;
  padding:6px 9px;
  font-family:monospace;
  font-size:12px;
  letter-spacing:.5px
}

.app-tabs {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-bottom:26px
}

.app-tabs>button {
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  padding:18px 16px;
  border:1px solid #e2e5ed;
  border-radius:12px;
  background:var(--paper);
  position:relative;
  min-width:0
}

.app-tabs>button:hover {
  border-color:#aab6ef;
  background:#fcfcff
}

.app-tabs>button[aria-selected=true] {
  border-color:var(--blue);
  box-shadow:0 0 0 1px var(--blue);
  background:#fcfcff
}

.app-tabs strong {
  font-size:14px;
  font-weight:700;
  display:block
}

.app-tabs small {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-top:5px
}

.tab-icon {
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:40px;
  height:42px;
  border-radius:10px;
  font-size:25px;
  font-weight:500
}

.blue {
  color:var(--blue);
  background:var(--blue-soft)
}

.amber {
  background:#fff5df;
  color:#a7690f
}

.green {
  background:#e6f5ee;
  color:#217953
}

.pink {
  background:#f8eaf7;
  color:#a64791
}

.tab-number {
  position:absolute;
  right:11px;
  top:9px;
  color:#939bae;
  font-family:monospace;
  font-size:10px
}

.app-panel {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 7px 22px #20253303
}

.panel-heading {
  padding:27px 34px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  gap:20px
}

.panel-heading .eyebrow {
  font-size:11px;
  letter-spacing:1.5px
}

.panel-heading h2 {
  font-size:27px;
  letter-spacing:-.7px;
  margin:6px 0
}

.panel-heading p {
  font-size:14px
}

.category {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:30px;
  padding:8px 12px;
  white-space:nowrap
}

.category>span {
  font-size:17px
}

.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 362px
}

.game-stage {
  min-height:433px;
  padding:29px 30px 24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  background:radial-gradient(circle,#dfe3ed .65px,transparent .9px) 0 0/15px 15px;
  background-color:#fafbfe
}

.stage-label {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:14px;
  font-weight:500;
  border:1px solid #e4e8f4;
  padding:9px 15px;
  border-radius:30px;
  background:#fff;
  min-height:38px;
  margin-bottom:22px
}

.live-dot {
  width:7px;
  height:7px;
  background:var(--blue);
  border-radius:50%
}

.board {
  display:grid;
  grid-template-columns:repeat(3,90px);
  gap:10px
}

.cell {
  width:90px;
  height:90px;
  background:#fff;
  border:1px solid #e0e4f0;
  border-radius:13px;
  font-family:'Manrope',sans-serif;
  font-weight:500;
  font-size:64px;
  line-height:1;
  display:grid;
  place-items:center;
  box-shadow:0 3px 0 #e8ebf2
}

.cell:hover:not(:disabled) {
  background:var(--blue-soft);
  border-color:#aebcf7
}

.cell.x {
  color:var(--blue)
}

.cell.o {
  color:var(--orange)
}

.cell.winner {
  background:#eaf0ff;
  border-color:#acbafb
}

.stage-hint {
  font-size:12px;
  color:var(--muted);
  margin-top:25px
}

.control-panel {
  border-left:1px solid var(--line);
  padding:29px 28px;
  display:flex;
  flex-direction:column;
  gap:25px
}

.control-panel h3 {
  font-size:14px;
  font-weight:600;
  margin-bottom:13px
}

.segmented {
  display:flex;
  padding:4px;
  background:#f3f4f7;
  border-radius:9px;
  gap:4px
}

.segmented button {
  flex:1;
  border:0;
  background:transparent;
  border-radius:6px;
  padding:9px 5px;
  font-size:14px;
  color:#667084
}

.segmented button[aria-pressed=true] {
  background:#fff;
  color:var(--ink);
  box-shadow:0 1px 4px #20253314;
  font-weight:600
}

.scoreboard {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px
}

.score-card {
  display:flex;
  align-items:center;
  flex-direction:column;
  gap:7px;
  padding:11px 0 13px;
  border-radius:10px;
  background:#f5f6f8
}

.score-card>strong {
  font-family:'Manrope',sans-serif;
  font-size:23px;
  line-height:1
}

.score-card>span:last-child {
  font-size:12px;
  color:var(--muted)
}

.player-symbol {
  font-size:26px;
  line-height:24px
}

.equals {
  font-size:23px;
  color:#8d95a6
}

.player-x {
  background:#f0f3ff
}

.player-x .player-symbol {
  color:var(--blue)
}

.player-o {
  background:#fdf2ec
}

.player-o .player-symbol {
  color:var(--orange)
}

.primary-button {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  border:0;
  border-radius:9px;
  background:var(--blue);
  color:#fff;
  min-height:44px;
  font-weight:600;
  font-size:14px;
  padding:11px 20px
}

.primary-button:hover {
  background:#2944c3
}

.primary-button>span {
  font-size:21px;
  font-weight:400
}

.rule-note {
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:var(--muted);
  padding-top:1px
}

.rule-note strong {
  font-size:12px;
  color:#5c6579;
  font-weight:600
}

.rule-note p {
  font-size:12px;
  line-height:1.7;
  margin-top:5px
}

.note-icon {
  flex-shrink:0;
  display:grid;
  place-items:center;
  border:1px solid #98a0b0;
  width:15px;
  height:15px;
  border-radius:50%;
  font-family:serif;
  font-size:11px;
  margin-top:3px
}

footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#8b93a2;
  font-size:12px;
  padding:25px 2px
}

footer>span {
  display:flex;
  align-items:center;
  gap:10px
}

.footer-mark {
  font-family:monospace;
  font-size:15px;
  color:#6e778b
}

@media(min-width:1500px) {
  .intro {
    padding-top:65px
  }
  .game-stage {
    min-height:465px;
    padding-top:36px
  }
  .board {
    grid-template-columns:repeat(3,98px)
  }
  .cell {
    width:98px;
    height:98px
  }
}

@media(max-width:1250px) {
  .container {
    margin:0 32px
  }
  .app-tabs>button {
    padding:17px 12px;
    gap:9px
  }
  .tab-icon {
    width:34px
  }
  .workspace {
    grid-template-columns:minmax(0,1fr) 330px
  }
  .control-panel {
    padding:28px 23px
  }
  .header-inner {
    padding:0 32px
  }
}

@media(max-width:950px) {
  .intro {
    padding-top:35px
  }
  .header-note {
    display:none
  }
  .tech-stack {
    display:none
  }
  .app-tabs {
    grid-template-columns:repeat(2,1fr)
  }
  .app-tabs>button {
    padding:16px
  }
  .tab-icon {
    width:40px
  }
  .workspace {
    grid-template-columns:minmax(0,1fr) 300px
  }
  .control-panel {
    padding:26px 20px
  }
  .board {
    grid-template-columns:repeat(3,78px);
    gap:8px
  }
  .cell {
    width:78px;
    height:78px
  }
  .game-stage {
    padding:29px 16px;
    justify-content:center
  }
  .stage-hint {
    font-size:12px;
    text-align:center
  }
  .panel-heading {
    padding:25px
  }
}

@media(max-width:650px) {
  .site-header {
    height:72px
  }
  .header-inner {
    padding:0 20px
  }
  .brand {
    font-size:18px
  }
  .brand-mark {
    width:33px;
    height:33px;
    font-size:17px;
    margin-right:9px
  }
  .edition {
    font-size:10px
  }
  .container {
    margin:0 18px
  }
  .intro {
    padding:30px 0 25px
  }
  h1 {
    font-size:32px;
    letter-spacing:-1.3px
  }
  .intro .eyebrow {
    font-size:10px;
    letter-spacing:1.2px
  }
  .intro p {
    font-size:14px
  }
  .app-tabs {
    gap:10px;
    margin-bottom:20px
  }
  .app-tabs>button {
    padding:15px 11px;
    gap:8px
  }
  .app-tabs strong {
    font-size:13px
  }
  .app-tabs small {
    display:none
  }
  .tab-icon {
    width:31px;
    height:34px;
    font-size:23px
  }
  .tab-number {
    font-size:9px;
    right:7px;
    top:5px
  }
  .panel-heading {
    padding:23px 21px
  }
  .panel-heading h2 {
    font-size:25px
  }
  .category {
    display:none
  }
  .workspace {
    grid-template-columns:1fr
  }
  .game-stage {
    min-height:405px;
    padding:25px 14px
  }
  .board {
    grid-template-columns:repeat(3,82px);
    gap:9px
  }
  .cell {
    height:82px;
    width:82px;
    font-size:57px
  }
  .control-panel {
    border-left:0;
    border-top:1px solid var(--line);
    padding:25px 22px;
    gap:22px
  }
  .score-card {
    padding:12px
  }
  .rule-note p,.rule-note strong {
    font-size:13px
  }
  footer {
    font-size:11px;
    padding:22px 0
  }
  footer>span:last-child {
    display:none
  }
}

.aside-copy {
  color:var(--muted);
  font-size:14px;
  line-height:1.8
}

.calculator-stage {
  padding:28px
}

.calculator {
  width:310px;
  max-width:100%;
  background:#fff;
  border:1px solid #e1e5ef;
  border-radius:17px;
  padding:12px;
  box-shadow:0 9px 24px #27315b0c
}

.calc-screen {
  background:#222b4b;
  border-radius:10px;
  text-align:right;
  color:#fff;
  padding:18px 17px 15px;
  margin-bottom:12px;
  min-height:105px;
  overflow:hidden
}

.calc-expression {
  font-size:12px;
  color:#b6c0e2;
  min-height:20px;
  overflow-wrap:anywhere
}

.calc-screen output {
  display:block;
  font-family:'Manrope',sans-serif;
  font-size:35px;
  font-weight:600;
  letter-spacing:-.8px;
  margin-top:7px;
  overflow-wrap:anywhere;
  line-height:1.3
}

.calc-screen output.long-result {
  font-size:23px
}

.calc-keys {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px
}

.calc-keys button {
  border:0;
  background:#f5f6fa;
  border-radius:8px;
  min-height:44px;
  font-size:18px
}

.calc-keys button:hover {
  background:#e8ecf7
}

.calc-keys .utility {
  background:#edf0f6;
  color:#59627c;
  font-size:15px
}

.calc-keys .operator {
  background:#edf1ff;
  color:var(--blue);
  font-size:22px
}

.calc-keys .key-equals {
  background:var(--blue);
  color:#fff
}

.shortcut-list {
  display:flex;
  flex-direction:column;
  gap:16px
}

.shortcut-list>div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:13px;
  color:#667084
}

kbd {
  display:inline-block;
  font-family:monospace;
  font-size:12px;
  padding:4px 7px;
  border:1px solid var(--line);
  border-bottom:2px solid #dee2eb;
  border-radius:5px;
  min-width:24px;
  text-align:center;
  background:#fafbfe;
  color:#525d76
}

.rps-stage {
  justify-content:center
}

.duel {
  display:flex;
  align-items:center;
  gap:34px;
  margin:5px 0 29px
}

.duel>div {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  min-width:94px
}

.duel>div>span:last-child {
  font-size:12px;
  color:var(--muted)
}

.duel-hand {
  display:grid;
  place-items:center;
  width:100px;
  height:110px;
  border:1px solid #e0e5f3;
  border-radius:20px;
  background:white;
  font-size:48px;
  color:#aab6d7
}

.versus {
  font-family:monospace;
  font-size:13px;
  color:#8a92a5;
  letter-spacing:1px
}

.rps-choices {
  display:flex;
  gap:12px;
  max-width:100%
}

.rps-choices button {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  border:1px solid #e2e6ef;
  border-radius:12px;
  background:white;
  padding:12px 17px;
  min-width:86px;
  font-size:13px
}

.rps-choices button span {
  font-size:31px
}

.rps-choices button:hover,.rps-choices button.selected {
  background:var(--blue-soft);
  border-color:var(--blue)
}

.rps-rules {
  display:flex;
  flex-direction:column;
  gap:15px
}

.rps-rules>div {
  display:flex;
  gap:13px;
  align-items:center;
  font-size:13px;
  color:#657086
}

.rps-rules>div>span:first-child {
  font-size:22px
}

.gradient-stage {
  padding:26px;
  background:#fafbfe;
  display:flex;
  flex-direction:column;
  gap:16px;
  min-width:0
}

.gradient-preview {
  background:linear-gradient(135deg,#6258e8,#f3a6a2);
  flex:1;
  min-height:275px;
  border-radius:12px;
  padding:22px;
  display:flex;
  flex-direction:column;
  justify-content:space-between
}

.preview-chip {
  align-self:flex-start;
  background:#ffffffea;
  color:#34394f;
  border-radius:24px;
  padding:8px 12px;
  font-family:monospace;
  font-size:10px;
  letter-spacing:1px
}

.preview-bottom {
  display:flex;
  justify-content:space-between;
  gap:12px
}

.preview-bottom>span {
  font-family:monospace;
  font-size:12px;
  color:#31364c;
  background:#ffffffdf;
  border-radius:6px;
  padding:8px 10px
}

.code-block {
  background:#222b4b;
  color:#eff2ff;
  border-radius:10px;
  padding:16px 18px;
  min-width:0
}

.code-block>div {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-family:monospace;
  font-size:10px;
  color:#b7c3ea;
  letter-spacing:1px;
  margin-bottom:10px
}

.code-block code {
  display:block;
  font-size:13px;
  line-height:1.8;
  overflow-wrap:anywhere
}

.gradient-controls {
  gap:19px
}

.color-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:12px
}

.color-row label {
  font-size:12px;
  color:#69738a
}

.color-input {
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--line);
  padding:5px 7px;
  border-radius:7px;
  min-width:0
}

.color-input input[type=color] {
  width:25px;
  height:26px;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
  flex-shrink:0
}

.color-input input[type=color]::-webkit-color-swatch-wrapper {
  padding:1px
}

.color-input input[type=color]::-webkit-color-swatch {
  border:0;
  border-radius:4px
}

.color-input input[type=text],.color-input input:not([type]) {
  width:72px;
  border:0;
  font-family:monospace;
  font-size:12px;
  color:#555f77;
  text-transform:uppercase;
  background:none;
  padding:0
}

.gradient-settings>label,.gradient-settings #angle-control>label {
  display:flex;
  justify-content:space-between;
  font-size:13px;
  font-weight:500;
  align-items:center
}

.gradient-settings select {
  width:100%;
  margin:8px 0 17px;
  border:1px solid #e1e5ee;
  border-radius:7px;
  padding:8px 11px;
  background:white;
  color:#606b81;
  font-size:13px
}

.gradient-settings input[type=range] {
  width:100%;
  accent-color:var(--blue);
  margin:14px 0 5px;
  cursor:pointer
}

.gradient-settings output {
  color:var(--blue);
  font-family:monospace;
  font-size:12px
}

.range-labels {
  display:flex;
  justify-content:space-between;
  font-family:monospace;
  font-size:10px;
  color:#8b93a7
}

.gradient-actions {
  display:flex;
  flex-direction:column;
  gap:10px
}

.secondary-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px solid #e1e5ef;
  border-radius:9px;
  background:white;
  padding:11px 16px;
  min-height:43px;
  font-size:14px;
  font-weight:500
}

.secondary-button:hover {
  background:#f4f6fd;
  border-color:#aab7df
}

.secondary-button>span {
  font-size:19px
}

.feedback {
  font-size:12px;
  color:#526077;
  min-height:16px;
  margin-top:-10px;
  line-height:1.5
}

.cell {
  animation:appear .15s ease-out
}

@keyframes appear {
  from {
    opacity:.7
  }
  to {
    opacity:1
  }
}

@media(max-width:950px) and (min-width:651px) {
  .rps-choices {
    gap:7px
  }
  .rps-choices button {
    min-width:73px;
    padding:10px
  }
  .duel {
    gap:17px
  }
  .gradient-stage {
    padding:18px
  }
  .gradient-preview {
    padding:16px
  }
  .preview-bottom {
    flex-wrap:wrap
  }
  .preview-chip {
    font-size:9px
  }
  .color-input {
    gap:4px;
    padding:5px
  }
  .color-input input:not([type]) {
    width:65px
  }
}

@media(max-width:650px) {
  .calculator-stage {
    padding:24px
  }
  .calc-keys button {
    min-height:48px
  }
  .gradient-stage {
    padding:18px
  }
  .gradient-preview {
    min-height:300px;
    padding:19px
  }
  .preview-bottom>span {
    font-size:11px
  }
  .gradient-controls {
    gap:22px
  }
  .color-row label,.gradient-settings>label,.gradient-settings #angle-control>label {
    font-size:14px
  }
  .color-input input:not([type]) {
    width:84px;
    font-size:14px
  }
  .color-input input[type=color] {
    width:29px;
    height:29px
  }
  .gradient-settings select {
    font-size:14px;
    padding:11px
  }
  .rps-choices {
    gap:8px
  }
  .rps-choices button {
    padding:12px;
    min-width:79px
  }
  .duel {
    gap:20px
  }
  .duel-hand {
    width:92px;
    height:100px
  }
}

@media(max-width:360px) {
  .container {
    margin:0 12px
  }
  .app-tabs strong {
    font-size:12px
  }
  .app-tabs>button {
    gap:6px;
    padding:14px 9px
  }
  .tab-icon {
    width:27px
  }
  .brand {
    font-size:17px
  }
  .edition {
    display:none
  }
  .board {
    grid-template-columns:repeat(3,76px)
  }
  .cell {
    width:76px;
    height:76px
  }
  .rps-choices {
    gap:6px
  }
  .rps-choices button {
    min-width:72px;
    padding:12px 10px
  }
  .preview-chip {
    font-size:9px
  }
  .preview-bottom {
    flex-wrap:wrap
  }
}

@media(min-width:951px) and (max-height:820px) {
  .site-header {
    height:66px
  }
  .intro {
    padding:23px 0 22px
  }
  h1 {
    font-size:35px;
    margin:8px 0
  }
  .intro p {
    font-size:14px
  }
  .app-tabs {
    margin-bottom:19px
  }
  .app-tabs>button {
    padding-top:13px;
    padding-bottom:13px
  }
  .panel-heading {
    padding:17px 28px
  }
  .panel-heading h2 {
    font-size:24px;
    margin:4px 0
  }
  .game-stage {
    min-height:340px;
    padding:20px 24px
  }
  .stage-label {
    margin-bottom:16px;
    padding:7px 13px;
    min-height:34px
  }
  .board {
    grid-template-columns:repeat(3,72px);
    gap:8px
  }
  .cell {
    width:72px;
    height:72px;
    font-size:50px;
    border-radius:10px
  }
  .stage-hint {
    margin-top:18px
  }
  .control-panel {
    padding:22px 25px;
    gap:19px
  }
  .control-panel h3 {
    margin-bottom:10px
  }
  .score-card {
    padding:8px 0 10px
  }
  .score-card>strong {
    font-size:21px
  }
  .rule-note p {
    line-height:1.55
  }
  .calculator-stage {
    padding:18px
  }
  .calculator {
    width:285px
  }
  .calc-screen {
    padding:12px 15px;
    min-height:87px
  }
  .calc-screen output {
    font-size:30px
  }
  .calc-keys button {
    min-height:38px
  }
  .gradient-preview {
    min-height:245px
  }
  footer {
    padding:18px 2px
  }
}

html[data-motion="reduced"] *,html[data-motion="reduced"] *::before,html[data-motion="reduced"] *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}


.project-motion-toggle{font:inherit;font-size:12px;min-height:44px;padding:8px;border:0;background:transparent;color:inherit;cursor:pointer;white-space:nowrap}.project-motion-toggle:focus-visible{outline:2px solid currentColor;outline-offset:3px}.header-actions{display:flex;align-items:center;gap:12px}

/* Night is the default, including when JavaScript is unavailable. */
:root:not([data-theme="light"]) {
  color-scheme:dark;
  --page:#111620;
  --paper:#1a2230;
  --ink:#edf0f7;
  --muted:#adb7ca;
  --line:#354158;
  --blue:#9caeff;
  --blue-soft:#293557;
  --orange:#f3a079;
}
:root:not([data-theme="light"]) :is(.site-header,.tech-stack span,.stage-label,.cell,.calculator,.duel-hand,.rps-choices button,.secondary-button,.gradient-settings select) {
  background:var(--paper);
  border-color:var(--line);
}
:root:not([data-theme="light"]) .app-tabs>button { border-color:var(--line); }
:root:not([data-theme="light"]) .app-tabs>button:is(:hover,[aria-selected="true"]) {
  background:#25314b;
  border-color:var(--blue);
}
:root:not([data-theme="light"]) .game-stage {
  background-color:#151c29;
  background-image:radial-gradient(circle,#34425e .65px,transparent .9px);
}
:root:not([data-theme="light"]) .gradient-stage { background:#151c29; }
:root:not([data-theme="light"]) .cell { box-shadow:0 3px 0 #0d121d; }
:root:not([data-theme="light"]) .cell:is(:hover:not(:disabled),.winner) {
  background:var(--blue-soft);
  border-color:var(--blue);
}
:root:not([data-theme="light"]) :is(.segmented,.score-card) { background:#252e40; }
:root:not([data-theme="light"]) .segmented button[aria-pressed="true"] { background:#3a4761; }
:root:not([data-theme="light"]) .player-x { background:#293557; }
:root:not([data-theme="light"]) .player-o { background:#3b2c29; }
:root:not([data-theme="light"]) .amber { background:#3b3021;color:#f0bf74; }
:root:not([data-theme="light"]) .green { background:#203d33;color:#89d5ae; }
:root:not([data-theme="light"]) .pink { background:#3e2940;color:#e3a5d8; }
:root:not([data-theme="light"]) :is(.rule-note strong,.segmented button,.shortcut-list>div,.rps-rules>div,.color-row label,.range-labels,.feedback,.tab-number,footer,.footer-mark,.equals,.versus) { color:var(--muted); }
:root:not([data-theme="light"]) :is(.color-input input:not([type]),.color-input input[type="text"],.gradient-settings select) { color:var(--ink); }
:root:not([data-theme="light"]) :is(.brand-mark,.primary-button,.calc-keys .key-equals) { background:#405bd8;color:#fff; }
:root:not([data-theme="light"]) .primary-button:hover { background:#344dbf; }
:root:not([data-theme="light"]) :is(.calc-screen,.code-block) { background:#101827; }
:root:not([data-theme="light"]) .calc-keys button { background:#29344a;color:var(--ink); }
:root:not([data-theme="light"]) .calc-keys .utility { background:#333f56; }
:root:not([data-theme="light"]) .calc-keys .operator { background:var(--blue-soft);color:var(--blue); }
:root:not([data-theme="light"]) .calc-keys .key-equals { background:#405bd8;color:#fff; }
:root:not([data-theme="light"]) .calc-keys button:hover { background:#435376;color:#fff; }
:root:not([data-theme="light"]) kbd { background:#252e40;color:var(--ink);border-color:var(--line); }
:root:not([data-theme="light"]) :is(.rps-choices button.selected,.rps-choices button:hover,.secondary-button:hover) { background:var(--blue-soft);border-color:var(--blue); }
:root:not([data-theme="light"]) :is(.preview-chip,.preview-bottom>span) { background:#151c29ed;color:var(--ink); }

.theme-toggle {
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  color:var(--ink);
  background:var(--paper);
  font-size:23px;
}
.theme-toggle:hover { background:var(--blue-soft); }
.header-actions { flex-shrink:0;gap:8px; }
@media(max-width:1100px) { .header-note { display:none; } }
@media(max-width:650px) {
  .site-header { height:auto;min-height:72px; }
  .header-inner { flex-wrap:wrap;gap:8px;padding:12px 18px; }
  .header-actions { margin-left:auto; }
}
