/* ============================================================
   SLIDE EDITOR — chrome styling
   This stylesheet styles ONLY the editor shell. It never enters
   the deck iframe (the deck keeps its own CSS, fully isolated).
   ============================================================ */

/* ---- DARK theme (default) ---- */
:root, :root[data-theme="dark"] {
  --bg:        #0d0f14;
  --panel:     #161a22;
  --panel-2:   #1d222c;
  --line:      #2a313d;
  --text:      #e7ebf2;
  --text-dim:  #8b95a6;
  --accent:    #5b8cff;
  --accent-hi: #6f9bff;   /* accent hover */
  --accent-ink:#07101f;   /* text/ink on accent fills */
  --accent-soft:  rgba(91,140,255,.16);
  --accent-soft2: rgba(91,140,255,.06);
  --accent-2:  #ff6a3d;
  --ok:        #3ad29f;
  --hover:     #232a35;   /* button hover surface */
  --hover-bd:  #3a4350;   /* button hover border */
  --stage-glow:#181d27;   /* stage backdrop highlight */
  --radius:    9px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

/* ---- LIGHT theme ---- */
:root[data-theme="light"] {
  --bg:        #eaeef4;
  --panel:     #ffffff;
  --panel-2:   #f1f4f9;
  --line:      #d6dde9;
  --text:      #1b2231;
  --text-dim:  #5f6b82;
  --accent:    #2f6bff;
  --accent-hi: #1f5cf5;
  --accent-ink:#ffffff;
  --accent-soft:  rgba(47,107,255,.12);
  --accent-soft2: rgba(47,107,255,.06);
  --accent-2:  #ef5a2a;
  --ok:        #16a06b;
  --hover:     #e7ecf6;
  --hover-bd:  #c1cbdc;
  --stage-glow:#dfe6f2;
}

/* theme transition on the surfaces that change */
.ribbon, .rail, .props, .stage-host, .tb-btn, .rb-ico, .ctl input, .ctl select,
.rail-item, .cm-item, .cm-text, body { transition: background-color .18s, border-color .18s, color .18s; }

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   RIBBON  (PowerPoint-style two-row toolbar)
   ============================================================ */
:root { --titlebar-h: 46px; --tools-h: 76px; }

.ribbon {
  background: linear-gradient(var(--panel), var(--panel-2));
  border-bottom: 1px solid var(--line);
  user-select: none;
}

/* Row 1 — title / file bar */
.rb-titlebar {
  height: var(--titlebar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; letter-spacing: .3px; color: var(--text); white-space: nowrap; }
.brand-mark { color: var(--accent); }
.rb-divider { width: 1px; height: 22px; background: var(--line); }
.rb-spacer { flex: 1; }
.hint { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

/* flat icon system: a span/div carrying an inline SVG that inherits color */
.ic { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.ic svg { width: 18px; height: 18px; display: block; }

/* shared button used in the title bar */
.tb-btn {
  height: 32px; padding: 0 13px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.tb-btn .ic svg { width: 16px; height: 16px; }
.tb-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-bd); }
.tb-btn:disabled { opacity: .4; cursor: default; }
.tb-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tb-btn.primary:hover:not(:disabled) { background: var(--accent-hi); }

/* compact title-bar toggles (language + theme) */
.tb-toggle { padding: 0 9px; gap: 5px; }
.tb-toggle .ic svg { width: 16px; height: 16px; }
#langLabel { font-weight: 700; font-size: 12px; min-width: 16px; text-align: center; letter-spacing: .2px; }

/* Row 2 — tool ribbon */
.rb-tools {
  height: var(--tools-h);
  display: flex; align-items: flex-start; gap: 0;
  padding: 5px 10px 8px;
  overflow-x: auto; overflow-y: hidden;
}
.rb-tools::-webkit-scrollbar { height: 6px; }
.rb-tools::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.rb-group {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start;
  padding: 3px 8px 0;
}
.rb-row { display: flex; align-items: stretch; gap: 3px; }
.rb-label {
  font-size: 10px; letter-spacing: .4px; text-transform: uppercase;
  color: var(--text-dim); margin-top: 5px;
}
.rb-sep { width: 1px; background: var(--line); margin: 5px 6px 0; height: 44px; }
.rb-mini-sep { width: 1px; background: var(--line); margin: 4px 4px; }

/* big labelled ribbon button (icon over/with text) */
.rb-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-width: 50px; height: 44px; padding: 2px 8px;
  background: transparent; color: var(--text);
  border: 1px solid transparent; border-radius: 7px;
  font-size: 11px; line-height: 1.1; white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.rb-btn .ic { font-size: 17px; line-height: 1; }
.rb-btn:hover:not(:disabled) { background: var(--panel); border-color: var(--line); }
.rb-btn:active:not(:disabled) { background: var(--hover); }
.rb-btn:disabled { opacity: .35; cursor: default; }
.rb-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

/* small square icon button (format toggles) */
.rb-ico {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px;
}
.rb-ico:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-bd); }
.rb-ico:disabled { opacity: .4; cursor: default; }
.rb-ico.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rb-ico b, .rb-ico i, .rb-ico u { font-style: inherit; }
.rb-ico i { font-style: italic; }

/* inline text-color control */
.rb-color {
  position: relative; width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  border-bottom: 3px solid var(--accent-2);
}
.rb-color input[type=color] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; border: 0; padding: 0;
}

/* contextual groups dim when nothing is selected */
.rb-group.disabled { opacity: .4; pointer-events: none; }

/* ---------- Workspace layout ---------- */
.workspace {
  height: calc(100% - var(--titlebar-h) - var(--tools-h));
  display: grid;
  grid-template-columns: 210px 1fr 300px;
}

/* ---------- Slide rail ---------- */
.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}
.mini {
  width: 24px; height: 24px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 15px; line-height: 1;
}
.mini:hover:not(:disabled) { background: var(--hover); }
.mini:disabled { opacity: .4; cursor: default; }

.rail-list { list-style: none; overflow-y: auto; padding: 8px; flex: 1; }
.rail-item {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px;
  margin-bottom: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rail-item:hover { border-color: var(--hover-bd); }
.rail-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rail-item.dragover { border-color: var(--accent-2); }
.rail-num {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--bg); border-radius: 5px;
  font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.rail-label {
  flex: 1; min-width: 0;
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}
.rail-free { flex: none; font-size: 11px; color: var(--accent-2); }
.rail-actions { display: none; gap: 3px; flex: none; }
.rail-item:hover .rail-actions, .rail-item.selected .rail-actions { display: flex; }
.rail-actions button {
  width: 20px; height: 20px;
  background: transparent; color: var(--text-dim);
  border: none; border-radius: 4px; font-size: 12px; line-height: 1;
}
.rail-actions button:hover { background: var(--bg); color: var(--text); }

/* ---------- Stage host ---------- */
.stage-host {
  position: relative;
  background:
    radial-gradient(circle at 50% 40%, var(--stage-glow) 0%, var(--bg) 70%);
  display: grid; place-items: center;
  overflow: hidden;
}
#deckFrame {
  width: 100%; height: 100%;
  border: 0;
  background: #000;
}

/* Dropzone / empty state */
.dropzone {
  position: absolute; inset: 24px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  display: grid; place-items: center;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone.hot { border-color: var(--accent); background: var(--accent-soft2); }
.dropzone.hidden { display: none; }
.dz-icon { font-size: 40px; color: var(--accent); margin-bottom: 10px; }
.dz-inner h2 { font-weight: 600; font-size: 20px; margin-bottom: 8px; }
.dz-inner code { font-family: var(--mono); background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }
.dz-inner p { color: var(--text-dim); margin-top: 4px; }
.dz-sub { font-size: 12px; }
.linkbtn { background: none; border: none; color: var(--accent); text-decoration: underline; font-size: inherit; }

/* ---------- Properties panel ---------- */
.props {
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.props-tabs { display: flex; border-bottom: 1px solid var(--line); }
.ptab {
  flex: 1; height: 40px;
  background: transparent; color: var(--text-dim);
  border: none; border-bottom: 2px solid transparent;
  font-size: 13px; font-weight: 500;
}
.ptab.active { color: var(--text); border-bottom-color: var(--accent); }
.props-body { flex: 1; overflow-y: auto; }
.ppanel { display: none; padding: 16px; }
.ppanel.active { display: block; }
.empty { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

/* Control rows */
.ctl {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.ctl label {
  font-size: 12px; color: var(--text-dim);
  flex: none; width: 92px;
}
.ctl label.wide { width: auto; }
.ctl .field { flex: 1; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.ctl input[type=text],
.ctl input[type=number],
.ctl select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  height: 30px; padding: 0 8px; font-size: 13px;
  width: 100%; min-width: 0;
}
.ctl input[type=number] { width: 74px; flex: none; text-align: right; }
.ctl input[type=color] {
  width: 34px; height: 30px; padding: 2px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
}
.ctl .hex { width: 84px; flex: none; font-family: var(--mono); font-size: 12px; }

/* Theme rows: stacked so the (plain-language) name shows in full and the
   control lines up cleanly underneath. */
.theme-row { flex-direction: column; align-items: stretch; gap: 7px; margin-bottom: 14px; }
.theme-name {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  width: auto; font-size: 12.5px; color: var(--text);
}
.theme-var {
  font-family: var(--mono); font-size: 10px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%;
}
.theme-row .field { justify-content: flex-start; }
.theme-row .hex { flex: 1; width: auto; }

/* per-slide background gradient swatches */
.grad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.grad-sw { height: 30px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; padding: 0; }
.grad-sw:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button {
  background: var(--panel-2); color: var(--text-dim);
  border: none; height: 30px; padding: 0 10px; font-size: 12px;
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

.group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--text-dim);
  margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.group-title:first-child { margin-top: 0; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  background: var(--panel-2); color: var(--accent);
  padding: 2px 7px; border-radius: 5px; margin-bottom: 12px;
  word-break: break-all;
}
.smallbtn {
  height: 28px; padding: 0 10px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
}
.smallbtn .ic svg { width: 14px; height: 14px; }
.smallbtn:hover { background: var(--hover); }

/* ---------- per-component icon sizing ---------- */
.rb-ico .ic svg { width: 17px; height: 17px; }
.seg button { display: grid; place-items: center; }
.seg button .ic svg { width: 16px; height: 16px; }
.dz-icon { color: var(--accent); }
.dz-icon svg { width: 42px; height: 42px; }
.mini { display: grid; place-items: center; }
.mini .ic svg { width: 15px; height: 15px; }
.rail-actions button { display: grid; place-items: center; }
.rail-actions button svg { width: 14px; height: 14px; }
.rail-free { display: inline-flex; }
.rail-free svg { width: 13px; height: 13px; }

/* dropdown caret on the Shape button */
.rb-btn.has-caret { position: relative; }
.caret { position: absolute; top: 3px; right: 3px; opacity: .55; }
.caret svg { width: 11px; height: 11px; }

/* ============================================================
   SHAPE PICKER flyout
   ============================================================ */
.shape-menu {
  position: fixed; z-index: 100001;
  display: grid; grid-template-columns: repeat(6, 34px); gap: 6px;
  padding: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 11px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.shape-cell {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--panel-2); color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 7px;
  transition: background .12s, border-color .12s, color .12s;
}
.shape-cell:hover { background: var(--hover); border-color: var(--accent); color: var(--accent); }
.shape-prev { width: 21px; height: 21px; background: currentColor; display: block; }

/* Export dropdown in the title bar */
.tb-exportwrap { position: relative; }
.tb-btn .caret { position: static; margin-left: 1px; opacity: .8; }
.tb-btn .caret svg { width: 13px; height: 13px; }
.drop-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 100001;
  display: flex; flex-direction: column; min-width: 200px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.drop-menu[hidden] { display: none; }
.drop-menu button {
  text-align: left; padding: 9px 10px;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--text); font-size: 13px; white-space: nowrap;
}
.drop-menu button:hover { background: var(--hover); }
/* the flyout's own display rule overrides [hidden]'s display:none, so
   restore it explicitly — otherwise the menu can't be closed again */
.shape-menu[hidden] { display: none; }

/* ============================================================
   COMMENTS (批注) panel + list
   ============================================================ */
.cm-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.cm-bar #cmAuthor {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
}
.cm-bar .smallbtn { flex: none; white-space: nowrap; }
.cm-bar .smallbtn:disabled { opacity: .4; cursor: default; }
.cm-hint { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-bottom: 12px; }

.cm-item {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: 7px; padding: 9px 10px; margin-bottom: 9px;
}
.cm-item.flash { animation: cmflash .9s ease; }
@keyframes cmflash { from { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91,140,255,.4); } }
.cm-top { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.cm-seq {
  flex: none; width: 19px; height: 19px; display: grid; place-items: center;
  background: var(--accent-2); color: #1a1206; border-radius: 50%;
  font-size: 11px; font-weight: 700;
}
.cm-author { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-time { font-size: 10px; color: var(--text-dim); flex: none; }
.cm-del {
  flex: none; width: 22px; height: 22px; border: none; border-radius: 5px;
  background: transparent; color: var(--text-dim); font-size: 12px;
  display: grid; place-items: center;
}
.cm-del svg { width: 14px; height: 14px; }
.cm-del:hover { background: var(--bg); color: var(--accent-2); }
.cm-text {
  width: 100%; min-height: 46px; resize: vertical;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 8px; font-family: inherit; font-size: 13px; line-height: 1.45;
}

/* ============================================================
   PREVIEW (play) overlay
   ============================================================ */
.preview-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: #000; display: flex; flex-direction: column;
}
.preview-bar {
  height: 44px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: #0b0d12; color: var(--text-dim);
  border-bottom: 1px solid var(--line); font-size: 12px;
}
.preview-bar button {
  height: 30px; padding: 0 14px; font-size: 13px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px;
}
.preview-bar button:hover { background: var(--hover); }
.preview-frame { flex: 1; width: 100%; border: 0; background: #000; }

/* ============================================================
   PLAY (fullscreen slideshow) overlay + control bar
   ============================================================ */
.play-overlay { position: fixed; inset: 0; z-index: 100000; background: #000; }
.play-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; display: block; }
.play-bar {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(18, 22, 30, .9); border: 1px solid var(--line);
  border-radius: 13px; box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
  transition: opacity .25s; z-index: 2;
}
.play-bar.hidden { opacity: 0; pointer-events: none; }
.play-bar button {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
}
.play-bar button:hover { background: var(--hover); }
.play-bar button svg { width: 18px; height: 18px; }
.play-count { color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 54px; text-align: center; }
.play-bar select {
  height: 32px; padding: 0 6px; font-size: 12px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
}

/* Toast */
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 16px; font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--accent-2); }

/* ============================================================
   PUBLISH — title-bar button + modal
   ============================================================ */
.tb-btn.publish { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tb-btn.publish:hover:not(:disabled) { background: var(--accent-hi); }
.tb-btn.publish:disabled { opacity: .4; cursor: default; }

.pub-overlay { position: fixed; inset: 0; z-index: 100002; background: rgba(8,10,14,.55);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.pub-overlay[hidden] { display: none; }
.pub-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px; position: relative; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.pub-close { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-dim); font-size: 15px; cursor: pointer; }
.pub-close:hover { background: var(--panel-2); color: var(--text); }
.pub-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.pub-note { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; margin-bottom: 16px; }
.pub-label { display: block; font-size: 12px; color: var(--text-dim); margin: 0 0 6px; }
.pub-urlprev { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; margin-bottom: 10px; word-break: break-all; }
.pub-urlprev b { color: var(--accent); font-weight: 600; }
.pub-input { width: 100%; height: 40px; padding: 0 12px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: var(--font); }
.pub-input:focus { outline: none; border-color: var(--accent); }
.pub-hint { font-size: 12px; color: var(--text-dim); margin: 7px 0 0; min-height: 16px; }
.pub-hint.ok { color: var(--ok); }
.pub-hint.err { color: var(--accent-2); }
.pub-radio { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pub-radio label { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text);
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.pub-radio label:hover { background: var(--panel-2); }
.pub-radio input { accent-color: var(--accent); }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 42px;
  margin-top: 16px; border: 1px solid transparent; border-radius: 8px; font-family: var(--font); font-size: 14.5px;
  font-weight: 600; cursor: pointer; text-decoration: none; }
.pub-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pub-btn.primary:hover { background: var(--accent-hi); }
.pub-btn.ghost { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.pub-btn.ghost:hover { background: var(--hover); }
.pub-btn[disabled] { opacity: .55; cursor: default; }
.pub-textlink { display: block; width: 100%; text-align: center; margin-top: 12px; background: none; border: 0;
  color: var(--text-dim); font-size: 13px; cursor: pointer; font-family: var(--font); }
.pub-textlink:hover { color: var(--text); text-decoration: underline; }
.pub-ok { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: var(--ok); margin-bottom: 18px; }
.pub-ok .ic svg { width: 20px; height: 20px; }
.pub-copy { display: flex; gap: 8px; margin-bottom: 6px; }
.pub-copy input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; font-family: var(--mono); font-size: 12.5px; }
.pub-copybtn { flex: none; height: 38px; padding: 0 14px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; font-size: 13px; cursor: pointer; font-family: var(--font); }
.pub-copybtn:hover { background: var(--hover); }
#pubTokenWrap { margin-top: 14px; }
.pub-actions { display: flex; gap: 10px; margin-top: 18px; }
.pub-actions .pub-btn { margin-top: 0; }
