:root {
  --panel-w: 208px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

body.theme-dark  { background: #0a0a0a; }
body.theme-light { background: #f0ede8; }

/* ══════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════ */

#panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 44px;           /* PAGEBAR_H */
  width: var(--panel-w);
  z-index: 100;
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 14px 10px 10px;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

body.theme-light #panel {
  background: rgba(246, 244, 240, 0.96);
  border-left-color: rgba(0, 0, 0, 0.08);
}

#panel::-webkit-scrollbar        { width: 3px; }
#panel::-webkit-scrollbar-track  { background: transparent; }
#panel::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.10); border-radius: 2px; }
body.theme-light #panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); }

/* ── Panel sections ── */
.pn-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
}

.pn-section:first-of-type { padding-top: 0; }

.pn-section-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.pn-section-head .pn-label { flex: 1; }

/* Divider between sections */
.pn-div {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
body.theme-light .pn-div { background: rgba(0, 0, 0, 0.07); }

/* ── Panel text atoms ── */
.pn-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, 0.22);
  text-transform: uppercase;
  padding-bottom: 10px;
  flex-shrink: 0;
  user-select: none;
}
body.theme-light .pn-title { color: rgba(0, 0, 0, 0.30); }

.pn-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  user-select: none;
  line-height: 1;
}
body.theme-light .pn-label { color: rgba(0, 0, 0, 0.32); }

.pn-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.pn-vcenter { align-items: center; }

.pn-full  { width: 100%; text-align: center; }
.pn-flex  { flex: 1; min-width: 0; text-align: center; }
.pn-spacer { flex: 1; }

/* Clickable dim display (canvas size) */
.pn-dim-clickable {
  display: block;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.30);
  cursor: pointer;
  user-select: none;
  text-align: center;
  padding: 1px 0;
  transition: color .15s;
}
.pn-dim-clickable:hover { color: rgba(255, 255, 255, 0.60); }
body.theme-light .pn-dim-clickable       { color: rgba(0, 0, 0, 0.38); }
body.theme-light .pn-dim-clickable:hover { color: rgba(0, 0, 0, 0.70); }

/* Selection count */
.pn-sel-count {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
  min-height: 13px;
  user-select: none;
}
body.theme-light .pn-sel-count { color: rgba(0, 0, 0, 0.32); }

/* Zoom value */
.pn-zoom {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.40);
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
body.theme-light .pn-zoom { color: rgba(0, 0, 0, 0.42); }

/* Col/row input */
.pn-colrow {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
}
.pn-colrow.hidden,
.pn-colrow[style*="display: none"] { display: none !important; }

.pn-colrow-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}
body.theme-light .pn-colrow-lbl { color: rgba(0, 0, 0, 0.32); }

.pn-num {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.72);
  padding: 5px 4px;
  border-radius: 7px;
  font-size: 11px;
  font-family: inherit;
  min-width: 0;
  outline: none;
  text-align: center;
  transition: border-color .15s;
}
.pn-num:focus { border-color: rgba(255, 255, 255, 0.28); }
.pn-num::placeholder { color: rgba(255, 255, 255, 0.20); }
.pn-num::-webkit-inner-spin-button,
.pn-num::-webkit-outer-spin-button { opacity: 0.3; }

body.theme-light .pn-num {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.09);
  color: rgba(0, 0, 0, 0.70);
}
body.theme-light .pn-num:focus       { border-color: rgba(0, 0, 0, 0.25); }
body.theme-light .pn-num::placeholder { color: rgba(0, 0, 0, 0.22); }

/* ── Panel-scoped button size ── */
#panel .tb-btn {
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 7px;
}

#panel .tb-btn.icon {
  padding: 6px 7px;
  border-radius: 7px;
}

#panel .tb-select {
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11px;
}

/* ── Resize handle ── */
#panel-resize {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  cursor: ew-resize;
  transition: background .15s;
  z-index: 1;
}
#panel-resize:hover,
#panel-resize.dragging {
  background: rgba(255, 255, 255, 0.10);
}
body.theme-light #panel-resize:hover,
body.theme-light #panel-resize.dragging {
  background: rgba(0, 0, 0, 0.08);
}

/* ══════════════════════════════════════════
   SHARED BUTTON STYLES
══════════════════════════════════════════ */

.tb-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.70);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  font-family: inherit;
  letter-spacing: .01em;
}

.tb-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.tb-btn:active { opacity: .60; }

.tb-btn:disabled {
  opacity: .25;
  cursor: default;
  pointer-events: none;
}

.tb-btn.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.tb-btn.danger {
  color: rgba(255, 80, 80, 0.88);
  border-color: rgba(200, 60, 60, 0.20);
}
.tb-btn.danger:hover {
  background: rgba(180, 30, 30, 0.55);
  border-color: rgba(220, 60, 60, 0.80);
  color: #fff;
}

.tb-btn.accent {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.tb-btn.green {
  color: rgba(80, 215, 125, 0.90);
  border-color: rgba(80, 215, 125, 0.20);
}
.tb-btn.green:hover {
  background: rgba(50, 175, 85, 0.22);
  border-color: rgba(80, 215, 125, 0.55);
  color: #b0f5d0;
}

.tb-btn.blue {
  color: rgba(100, 165, 255, 0.90);
  border-color: rgba(100, 165, 255, 0.20);
}
.tb-btn.blue:hover {
  background: rgba(55, 125, 225, 0.22);
  border-color: rgba(100, 165, 255, 0.55);
  color: #c5e0ff;
}

.tb-btn.icon {
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

/* Snap */
#btn-snap.snap-off {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.32);
}
#btn-snap.snap-on {
  background: rgba(100, 175, 255, 0.18);
  border-color: rgba(100, 175, 255, 0.65);
  color: #daeeff;
}

/* Export loading state */
#btn-export.loading {
  opacity: 0.45;
  pointer-events: none;
}

/* Light theme buttons */
body.theme-light .tb-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.09);
  color: rgba(0, 0, 0, 0.68);
}
body.theme-light .tb-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
  color: #000;
}
body.theme-light .tb-btn.active {
  background: rgba(0, 0, 0, 0.10);
  border-color: rgba(0, 0, 0, 0.20);
  color: #000;
}
body.theme-light .tb-btn.accent {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
}
body.theme-light .tb-btn.green {
  color: rgba(20, 125, 60, 0.90);
  border-color: rgba(20, 125, 60, 0.20);
}
body.theme-light .tb-btn.green:hover {
  background: rgba(20, 125, 60, 0.10);
  border-color: rgba(20, 125, 60, 0.45);
  color: rgba(10, 70, 35, 1);
}
body.theme-light .tb-btn.blue {
  color: rgba(35, 105, 195, 0.90);
  border-color: rgba(35, 105, 195, 0.20);
}
body.theme-light .tb-btn.blue:hover {
  background: rgba(35, 105, 195, 0.10);
  border-color: rgba(35, 105, 195, 0.45);
  color: rgba(15, 55, 135, 1);
}
body.theme-light .tb-btn.danger {
  color: rgba(195, 30, 30, 0.85);
  border-color: rgba(195, 50, 50, 0.18);
}
body.theme-light .tb-btn.danger:hover {
  background: rgba(195, 30, 30, 0.10);
  border-color: rgba(195, 50, 50, 0.40);
  color: rgba(160, 15, 15, 1);
}
body.theme-light #btn-snap.snap-off {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.38);
}
body.theme-light #btn-snap.snap-on {
  background: rgba(35, 115, 195, 0.10);
  border-color: rgba(35, 115, 195, 0.50);
  color: rgba(15, 55, 130, 1);
}

/* ══════════════════════════════════════════
   SELECT
══════════════════════════════════════════ */

.tb-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.70);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: background .15s;
}
.tb-select:hover { background: rgba(255, 255, 255, 0.09); }
.tb-select option { background: #1a1a1a; color: #ccc; }

body.theme-light .tb-select {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.09);
  color: rgba(0, 0, 0, 0.68);
}
body.theme-light .tb-select:hover { background: rgba(0, 0, 0, 0.07); }
body.theme-light .tb-select option { background: #fff; color: #000; }

.tb-dim {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  white-space: nowrap;
  user-select: none;
}
body.theme-light .tb-dim { color: rgba(0, 0, 0, 0.42); }

/* ══════════════════════════════════════════
   COLOR SWATCH
══════════════════════════════════════════ */

.color-swatch {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  outline: none;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.color-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.color-swatch::-webkit-color-swatch { border: none; }
body.theme-light .color-swatch { border-color: rgba(0, 0, 0, 0.14); }

/* ══════════════════════════════════════════
   FREE-CANVAS SIZE PANEL
══════════════════════════════════════════ */

#size-panel {
  position: fixed;
  z-index: 300;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 16px;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  gap: 12px;
  min-width: 210px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}
#size-panel.open { display: flex; }

.sp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  width: 46px;
  flex-shrink: 0;
}
.sp-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  width: 88px;
  outline: none;
  transition: border-color .15s;
}
.sp-input:focus { border-color: rgba(255, 255, 255, 0.30); }
.sp-unit { font-size: 11px; color: rgba(255, 255, 255, 0.28); }
.sp-btns {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   DROP OVERLAY
══════════════════════════════════════════ */

#drop-ov {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
#drop-ov.on { opacity: 1; }

.drop-box {
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  padding: 50px 80px;
  text-align: center;
}
.drop-box h2 {
  font-size: 20px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 5px;
}
.drop-box p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */

#toast {
  position: fixed;
  bottom: 54px;
  left: calc((100vw - var(--panel-w)) / 2);
  transform: translateX(-50%);
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  white-space: nowrap;
  border-radius: 8px;
}
#toast.show { opacity: 1; }

body.theme-light #toast {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.10);
  color: rgba(0, 0, 0, 0.80);
}

/* ══════════════════════════════════════════
   MISC
══════════════════════════════════════════ */

#file-input { display: none; }
canvas      { display: block !important; }

#btn-shortcuts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.18);
  font-size: 9.5px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: .06em;
  cursor: pointer;
  padding: 8px 0 6px;
  transition: color .15s;
  flex-shrink: 0;
}
#btn-shortcuts:hover { color: rgba(255, 255, 255, 0.50); }
body.theme-light #btn-shortcuts       { color: rgba(0, 0, 0, 0.22); }
body.theme-light #btn-shortcuts:hover { color: rgba(0, 0, 0, 0.55); }

/* ══════════════════════════════════════════
   PAGE BAR
══════════════════════════════════════════ */

#page-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding-left: 10px;
  padding-right: calc(var(--panel-w) + 8px);
  gap: 6px;
  overflow-x: auto;
}
body.theme-light #page-bar {
  background: rgba(248, 246, 242, 0.92);
  border-top-color: rgba(0, 0, 0, 0.07);
}

#page-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.page-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.page-tab:hover        { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.14); }
.page-tab.active       { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); }

.page-title {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.50);
  outline: none;
  min-width: 40px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: inherit;
  user-select: none;
}
.page-tab.active .page-title { color: rgba(255,255,255,0.85); cursor: text; user-select: text; }

.page-rename {
  background: none; border: none;
  color: rgba(255,255,255,0.28); cursor: pointer;
  font-size: 12px; line-height: 1;
  padding: 0 2px; border-radius: 4px;
  transition: color .1s, background .1s;
  font-family: inherit; flex-shrink: 0;
}
.page-rename:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.07); }
.page-rename.confirming { color: rgba(110,210,110,0.9); }
.page-rename.confirming:hover { color: rgba(130,240,130,1); background: rgba(100,200,100,0.10); }

.page-tab.editing .page-title {
  border-bottom: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.95);
}

.page-del {
  background: none; border: none;
  color: rgba(255,255,255,0.28); cursor: pointer;
  font-size: 14px; line-height: 1;
  padding: 0 2px; border-radius: 4px;
  transition: color .1s, background .1s;
  font-family: inherit;
}
.page-del:hover { color: rgba(255,100,100,0.90); background: rgba(255,0,0,0.08); }

#btn-add-page {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  width: 28px; height: 28px;
  border-radius: 8px; font-size: 18px;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit; line-height: 1; padding: 0;
}
#btn-add-page:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.16); color: #fff; }

/* Light theme page bar */
body.theme-light .page-tab          { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
body.theme-light .page-tab:hover    { background: rgba(0,0,0,0.07); border-color: rgba(0,0,0,0.14); }
body.theme-light .page-tab.active   { background: rgba(0,0,0,0.09); border-color: rgba(0,0,0,0.18); }
body.theme-light .page-title        { color: rgba(0,0,0,0.45); }
body.theme-light .page-tab.active .page-title { color: rgba(0,0,0,0.82); }
body.theme-light .page-rename       { color: rgba(0,0,0,0.25); }
body.theme-light .page-rename:hover { color: rgba(0,0,0,0.70); background: rgba(0,0,0,0.06); }
body.theme-light .page-rename.confirming       { color: rgba(30,140,30,0.90); }
body.theme-light .page-rename.confirming:hover { color: rgba(20,120,20,1); background: rgba(30,140,30,0.08); }
body.theme-light .page-tab.editing .page-title { border-bottom-color: rgba(0,0,0,0.30); color: rgba(0,0,0,0.90); }
body.theme-light .page-del          { color: rgba(0,0,0,0.28); }
body.theme-light .page-del:hover    { color: rgba(180,30,30,0.90); background: rgba(200,0,0,0.07); }
body.theme-light #btn-add-page      { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); color: rgba(0,0,0,0.50); }
body.theme-light #btn-add-page:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); color: #000; }

/* ══════════════════════════════════════════
   WELCOME / SHORTCUTS OVERLAY
══════════════════════════════════════════ */

#welcome {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 44px;
  right: var(--panel-w);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
#welcome.show { opacity: 1; }

#welcome-card {
  pointer-events: auto;
  background: rgba(15, 15, 15, 0.90);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 20px 22px 16px;
  width: 390px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.wc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.wc-sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  margin-top: 3px;
}
#wc-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-size: 13px;
  padding: 1px 5px;
  border-radius: 4px;
  transition: color .15s;
  line-height: 1;
  font-family: inherit;
}
#wc-close:hover { color: rgba(255, 255, 255, 0.78); }

.wc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.wc-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wc-group {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.20);
  margin-bottom: 4px;
}
.wc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wc-row span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 5px;
  font-size: 10px;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  flex-shrink: 0;
}
.wc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wc-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.20);
  flex: 1;
}
#wc-ok { padding: 6px 16px; font-size: 11px; flex-shrink: 0; }

/* Light theme */
body.theme-light #welcome-card {
  background: rgba(248, 246, 242, 0.96);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}
body.theme-light .wc-title  { color: rgba(0, 0, 0, 0.75); }
body.theme-light .wc-sub    { color: rgba(0, 0, 0, 0.28); }
body.theme-light #wc-close  { color: rgba(0, 0, 0, 0.28); }
body.theme-light #wc-close:hover { color: rgba(0, 0, 0, 0.70); }
body.theme-light .wc-group  { color: rgba(0, 0, 0, 0.25); }
body.theme-light .wc-row span { color: rgba(0, 0, 0, 0.48); }
body.theme-light kbd {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.10);
  color: rgba(0, 0, 0, 0.55);
}
body.theme-light .wc-footer { border-top-color: rgba(0, 0, 0, 0.07); }
body.theme-light .wc-hint   { color: rgba(0, 0, 0, 0.28); }
