@import url('/theme-base.css?v=2');
:root {
  color-scheme:light;
  --bg:#f7f2f4;--side:#fffafc;--surface:#fffafc;--surface-2:#f5eaf0;
  --text:#321c28;--muted:#795f6d;--line:#e4d2dc;--border:var(--line);
  --accent:#902547;--accent-hover:#78203e;--accent-text:#902547;--on-accent:#fff;
  --soft:#f1dfe7;--hover:#efdee6;--control-line:#c89cae;
  --board-light:#f0dfe5;--board-dark:#78243f;--board-ink:#672039;--board-coordinate:#f9e9ef;
  --ink:var(--text);--green:var(--accent);--deep:var(--soft);--light:var(--board-light);--dark:var(--board-dark);
  font-family:Manrope,system-ui,sans-serif;
}
:root[data-color="gray"] {
  --bg:#f1f3f5;--side:#fff;--surface:#fff;--surface-2:#f5f6f8;
  --text:#252c35;--muted:#626d7a;--line:#dce1e7;--accent:#45505f;--accent-hover:#303a47;--accent-text:#45505f;--on-accent:#fff;
  --soft:#e8ecf1;--hover:#e4e8ee;--control-line:#b6c0cd;
  --board-light:#e8e9e6;--board-dark:#9da8b1;--board-ink:#343e49;--board-coordinate:#26333e;
}
:root[data-mode="dark"] {
  color-scheme:dark;
  --bg:#210f18;--side:#29121e;--surface:#321823;--surface-2:#402130;
  --text:#fff0f5;--muted:#c5a6b4;--line:#593244;--accent:#a42f58;--accent-hover:#b43b66;--accent-text:#f2b5ce;--on-accent:#fff;
  --soft:#53233b;--hover:#4c273a;--control-line:#87506b;
}
:root[data-mode="dark"][data-color="gray"] {
  --bg:#15181d;--side:#1b1f25;--surface:#20252d;--surface-2:#292f38;
  --text:#f3f5f7;--muted:#adb7c5;--line:#3b4450;--accent:#c7cfda;--accent-hover:#e1e5ec;--accent-text:#d7dee9;--on-accent:#18202a;
  --soft:#303945;--hover:#343e4b;--control-line:#687688;
}
body{background:var(--bg);color:var(--text);font-family:Manrope,system-ui,sans-serif}
[hidden]{display:none!important}
input,textarea,select{background-color:var(--surface);border-color:var(--control-line);color:var(--text)}
input::placeholder,textarea::placeholder{color:var(--muted)}
button,a,summary,input,select,textarea{touch-action:manipulation}
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent-text);outline-offset:3px}
html .btn.primary,html .button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
html .btn.primary:hover:not(:disabled),html .button.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover);color:var(--on-accent)}
html .btn,html .button{background:var(--surface);border-color:var(--line);color:var(--text)}
html .button:hover:not(:disabled){background:var(--hover)}
html .brand-symbol{filter:none}
html[data-mode="dark"] .brand-symbol,html[data-mode="dark"] .studio-brand img,html[data-mode="dark"] .public-brand img{filter:invert(92%) sepia(9%) saturate(380%) hue-rotate(283deg) brightness(105%)}
html[data-mode="dark"] .brand-symbol{background-image:url('/studio/pieces/bN.svg')}
html .breadcrumb::before{display:none}
.appearance-controls{display:inline-flex;align-items:center;gap:8px;flex-shrink:0;position:relative;line-height:1;vertical-align:middle}
.mode-options{display:flex;gap:2px;background:var(--surface-2);border:1px solid var(--line);padding:3px;border-radius:9px}
.mode-options button{width:34px;height:34px;min-height:34px;display:grid;place-items:center;border:0;border-radius:6px;padding:0;background:transparent;color:var(--muted)}
.mode-options button[aria-pressed="true"]{background:var(--surface);color:var(--accent-text);box-shadow:0 1px 4px #160a1510}
.mode-options button:hover{background:var(--hover)}
.appearance-controls svg{width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.color-control{position:relative}
.color-trigger{display:flex;align-items:center;justify-content:center;gap:4px;min-width:48px;height:42px;padding:0 7px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--muted)}
.color-trigger>svg{width:14px;height:14px}
.color-trigger:hover{background:var(--hover)}
.selected-color,.color-chip{width:17px;height:17px;border-radius:50%;flex:none;background:#78243f;border:1px solid #ffffff55;box-shadow:0 0 0 1px #78243f33}
[data-color="gray"] .selected-color,.gray-chip{background:#8f9aa8;box-shadow:0 0 0 1px #8f9aa833}
.color-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:100;min-width:190px;padding:8px;background:var(--surface);border:1px solid var(--line);box-shadow:0 12px 40px #17061320;border-radius:10px;line-height:1.6}
.color-menu-label{display:block;padding:4px 8px 8px;font-size:12px;color:var(--muted)}
.color-menu button{width:100%;display:flex;align-items:center;text-align:left;gap:10px;padding:10px 9px;min-height:44px;font-size:14px;background:transparent;color:var(--text);border:0;border-radius:6px}
.color-menu button:hover,.color-menu button[aria-checked="true"]{background:var(--soft)}
.color-check{margin-left:auto;visibility:hidden;color:var(--accent-text)}
[aria-checked="true"] .color-check{visibility:visible}
html .studio-sidebar{background:var(--side);border-color:var(--line)}
html .studio-sidebar nav a:hover{background:var(--hover)}
html .studio-sidebar nav a.active{background:var(--soft);color:var(--accent-text)}
html .studio-sidebar nav a:nth-child(5){border-color:var(--line)}
html .studio-sidebar nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}
html .initial{background:var(--soft);color:var(--accent-text)}
html .panel,html .auth-card,html .state-box,html .catalog-symbol,html .diagram{background:var(--surface);border-color:var(--line)}
html .tag,html .term-links a{background:var(--soft);color:var(--accent-text)}
html .tabs>.active,html .back-link{color:var(--accent-text);border-color:var(--accent-text)}
html .back-link{font-size:14px}
html .note,html .line-moves{background:var(--soft);color:var(--muted)}
html .study-square{background:var(--board-light);opacity:1}
html .study-square.dark{background:var(--board-dark)}
html .study-square small{color:var(--board-ink)}
html .study-square.dark small{color:var(--board-coordinate)}
html .study-square.legal::after{background:#e1b353aa}
html .study-square.selected{background:#d5b766}
html .piece img{width:100%;height:100%;object-fit:contain;display:block}
html .lesson-board{border-color:var(--line)}
html .diagram>.variation-board{width:100%;max-width:none;height:auto}
html .guide-diagram{background:var(--surface);max-width:100%}
html[data-mode="dark"] .error{color:#ffb6b7}
html[data-mode="dark"] .success,html[data-mode="dark"] .earned .award-status{color:#9edcc1}
html .rating-chart{overflow:visible}
html .rating-chart polyline{stroke:var(--accent-text)}
html .rating-chart line{stroke:var(--line)}
.workspace-header{margin-left:192px;min-height:76px;padding:12px 40px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}
.workspace-home{font-size:14px;color:var(--muted)}
.workspace-actions{display:flex;align-items:center;gap:16px;min-width:0}
.header-pages{font-size:14px;color:var(--muted)}
html .studio-main{padding-top:28px}
html .topbar{position:relative;z-index:30}
html .app-footer{font-size:13px}
html .topbar-right .appearance-controls{margin-right:5px}
html .sq .piece img[src*="/b"],html .study-square .piece img[src*="/b"]{filter:drop-shadow(0 0 .65px #ffe8f0) drop-shadow(0 0 .65px #ffe8f0)}
[data-color="gray"] .sq .piece img[src*="/b"],[data-color="gray"] .study-square .piece img[src*="/b"]{filter:none}
html .sq.last::before{background:#d8b56b66}
html .rank-label,html .file-label{color:var(--board-ink)!important}
html .sq.dark .rank-label,html .sq.dark .file-label{color:var(--board-coordinate)!important}
html .suggested-move{background:var(--surface-2);border-color:var(--line)}
html .suggested-move [data-action="show-hint"]{font-size:14px;color:var(--accent-text)}
html .coach-input button{background:var(--accent);color:var(--on-accent)}
html .format-option code{color:var(--text)}
html .format-option input{accent-color:var(--accent-text)}
html .modal-inner .rating-choice{display:none}
html .modal-inner .rating-choice+p{display:none}
html .section-toolbar{gap:8px;flex-wrap:wrap}
@media(max-width:1020px){.workspace-header{margin-left:76px;padding:12px 26px}}
@media(max-width:800px){.workspace-header{margin-left:70px}.workspace-actions{gap:10px}.workspace-home{display:none}.workspace-header{justify-content:flex-end}}
@media(max-width:700px){.workspace-header{margin-left:0;padding:10px 16px;min-height:64px}.workspace-actions{width:100%;justify-content:space-between}.header-pages{font-size:13px}.workspace-header .button{padding:9px 13px;min-height:42px;font-size:14px}html .studio-main{padding-top:20px}html .topbar{height:64px;padding:0 14px;gap:8px}html .topbar-right{gap:4px}html .breadcrumb #breadcrumb{font-size:12px}html .topbar-right .appearance-controls{margin:0}.mode-options{padding:2px}.mode-options button{width:31px;height:32px;min-height:32px}.color-trigger{height:38px;min-width:42px;padding:0 5px}.appearance-controls{gap:6px}html .topbar-right>.icon-btn{width:35px;height:40px}html .topbar-right>.icon-btn:last-child{display:none}html .app-footer{font-size:12px}.auth-header{padding:18px 16px}.auth-header>.workspace-actions{width:auto}.auth-header .button{display:none}.auth-header .studio-brand{font-size:27px}.color-menu{min-width:185px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
