/* Appearance section in Settings + the rule that hides the light/dark switch while a custom palette is on (2026-10-13).
   Everything here reads the colour tokens, so it follows whatever palette is active. */
html[data-look="custom"] #themeBtn,
html[data-look="custom"] #lpThemeBtn{ display:none !important; }

#settingsPanel .lk-note{ margin:0; font:500 13px/1.45 var(--font-ui, inherit); color:var(--text-dim); max-width:46ch; }
.lk-modes{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; padding:4px; border-radius:999px; background:var(--panel); border:1px solid var(--line); }
.lk-mode{
  min-width:0; min-height:40px; padding:8px 4px; border:0; border-radius:999px; background:transparent; cursor:pointer;
  font:600 12.5px/1.15 var(--font-ui, inherit); color:var(--text-dim); text-align:center; touch-action:manipulation;
  transition:background-color .2s, color .2s, box-shadow .2s;
}
.lk-mode[aria-checked="true"]{ background:var(--accent-tint); color:var(--text); box-shadow:0 0 0 1px var(--gold) inset; }
.lk-palette{ display:flex; flex-direction:column; gap:16px; padding:16px; border-radius:18px; border:1px solid var(--line); background:var(--panel); }
.lk-palette[hidden]{ display:none !important; }
.lk-group{ display:flex; flex-direction:column; gap:10px; }
.lk-label{ font:700 12px/1 var(--font-ui, inherit); letter-spacing:.06em; text-transform:uppercase; color:var(--text-dim); }
.lk-swatches{ display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.lk-sw{
  position:relative; aspect-ratio:1/1; min-height:44px; width:100%; padding:0; cursor:pointer; touch-action:manipulation;
  border:1px solid var(--line-strong); border-radius:14px; overflow:hidden; background:var(--sw);
  transition:transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s;
}
.lk-sw:active{ transform:scale(.93); }
.lk-sw::before{ content:""; position:absolute; left:18%; right:18%; bottom:16%; height:26%; border-radius:6px; background:var(--sw-card, transparent); }
.lk-acc{ grid-template-columns:repeat(5,minmax(0,1fr)); }
.lk-acc .lk-sw{ border-radius:50%; }
.lk-sw[aria-checked="true"]{ box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.lk-sw[aria-checked="true"]::after{
  content:""; position:absolute; left:50%; top:50%; width:20px; height:20px; transform:translate(-50%,-50%); background:var(--sw-mark, #fff);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lk-acc .lk-sw::before{ display:none; }
.lk-name{ font:600 13px/1.4 var(--font-ui, inherit); color:var(--text-dim); }
.lk-name b{ color:var(--text); font-weight:700; }
@media (prefers-reduced-motion:reduce){ .lk-sw, .lk-mode{ transition:none; } }

/* Profile photo in the Settings crest (2026-10-13): optional, falls back to the letter */
.su-crest{ cursor:pointer; }
.su-crest .su-photo{ position:absolute; inset:5px; width:calc(100% - 10px); height:calc(100% - 10px); border-radius:50%; object-fit:cover; z-index:1; }
.su-crest.has-photo span{ display:none; }
.su-crest .su-cam{
  position:absolute; right:-3px; bottom:-3px; width:26px; height:26px; border-radius:50%; z-index:2; pointer-events:none;
  background:var(--gold); border:2px solid var(--panel); display:grid; place-items:center;
}
.su-crest .su-cam::before{
  content:""; width:14px; height:14px; background:var(--ink);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l1.6-2.4h6.8L17 8h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.2'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l1.6-2.4h6.8L17 8h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.su-crest:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }
.su-photo-row{ display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:4px; }
.su-photo-btn{
  padding:6px 0; min-height:32px; border:0; background:none; cursor:pointer; touch-action:manipulation;
  font:700 12.5px/1.2 var(--font-ui, inherit); color:var(--gold); text-decoration:underline; text-underline-offset:3px;
}
.su-photo-btn.su-photo-rm{ color:var(--text-dim); font-weight:600; }
.su-photo-btn[hidden]{ display:none; }
.su-photo-msg{ min-height:0; font:500 12px/1.35 var(--font-ui, inherit); color:var(--text-dim); }
.su-photo-msg:empty{ display:none; }

/* colour zones (2026-10-27): strength, one colour per feature / only mine, second colour */
.lk-fx{ margin-top:10px; }
.lk-lvl{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.lk-two{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.lk-group[hidden]{ display:none !important; }
.lk-auto{ display:grid; place-items:center; font:700 15px var(--font-ui, inherit); color:var(--text-dim); background:var(--panel-2) !important; border-radius:50%; }
#lkSec{ grid-template-columns:repeat(6,minmax(0,1fr)); }
.lk-auto[aria-checked="true"]{ color:transparent; }
