:root{
  --smask-gold:#c6a75c;
  --smask-gold-2:#a88638;
  --smask-bg:#0b0b0b;
  --smask-surface:#151515;
  --smask-surface-2:#1d1d1d;
  --smask-line:rgba(255,255,255,.1);
  --smask-text:#f5f5f5;
  --smask-muted:rgba(255,255,255,.58);
  --smask-danger:#e57373;
  --smask-success:#53b36e;
}

#smask-edit-launcher{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:2147483000;
  width:46px;
  height:46px;
  border:none;
  border-radius:999px;
  background:rgba(12,12,12,.78);
  color:var(--smask-gold);
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  border:1px solid rgba(198,167,92,.38);
  backdrop-filter:blur(10px);
  cursor:pointer;
  font-size:18px;
}

#smask-page-switcher{
  position:fixed;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  z-index:2147483001;
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(10,10,10,.9);
  color:#fff;
  border:1px solid rgba(198,167,92,.28);
  border-radius:999px;
  padding:8px 12px;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  backdrop-filter:blur(10px);
  font-family:"Noto Sans JP",system-ui,sans-serif;
}
#smask-page-switcher .smask-switcher-label{font-size:10px;letter-spacing:.24em;color:var(--smask-gold);font-weight:700}
#smask-page-switcher .smask-switcher-pages{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#smask-page-switcher .smask-switcher-page,
#smask-page-switcher .smask-switcher-exit{
  border:none;
  cursor:pointer;
  border-radius:999px;
  padding:6px 10px;
  background:transparent;
  color:rgba(255,255,255,.68);
  font-size:11px;
}
#smask-page-switcher .smask-switcher-page.is-active{background:rgba(198,167,92,.18);color:var(--smask-gold)}
#smask-page-switcher .smask-switcher-exit{background:rgba(229,115,115,.14);color:#ffb2b2;width:28px;height:28px;padding:0}

#smask-editor-root{
  position:fixed;
  top:66px;
  right:16px;
  width:min(380px,calc(100vw - 24px));
  max-height:calc(100vh - 84px);
  z-index:2147483002;
  background:rgba(11,11,11,.96);
  color:var(--smask-text);
  border:1px solid rgba(198,167,92,.24);
  border-radius:18px;
  box-shadow:0 18px 48px rgba(0,0,0,.45);
  overflow:hidden;
  font-family:"Noto Sans JP",system-ui,sans-serif;
  backdrop-filter:blur(14px);
}
#smask-editor-root.is-collapsed .smask-editor-body{display:none}
.smask-editor-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--smask-line);background:linear-gradient(180deg,rgba(198,167,92,.1),rgba(198,167,92,0))}
.smask-editor-brand{display:flex;flex-direction:column;gap:2px}.smask-editor-brand strong{font-size:13px;letter-spacing:.18em;color:var(--smask-gold)}.smask-editor-brand span{font-size:11px;color:var(--smask-muted)}
.smask-editor-actions{display:flex;gap:8px;align-items:center}
.smask-btn{appearance:none;border:none;border-radius:10px;padding:9px 12px;background:var(--smask-surface-2);color:var(--smask-text);cursor:pointer;font-size:12px;line-height:1;font-family:inherit}
.smask-btn.is-primary{background:linear-gradient(180deg,#d1af66,#b28d42);color:#111;font-weight:700}
.smask-btn.is-danger{background:rgba(229,115,115,.16);color:#ffb6b6}
.smask-btn.is-ghost{background:transparent;border:1px solid var(--smask-line)}
.smask-editor-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border-bottom:1px solid var(--smask-line)}
.smask-editor-tab{appearance:none;border:none;background:transparent;color:var(--smask-muted);padding:12px 8px;font-size:11px;letter-spacing:.12em;cursor:pointer;font-family:inherit}
.smask-editor-tab.is-active{color:var(--smask-gold);background:rgba(198,167,92,.08)}
.smask-editor-body{padding:14px;overflow:auto;max-height:calc(100vh - 180px)}
.smask-tab-pane{display:none}.smask-tab-pane.is-active{display:block}
.smask-field{margin-bottom:14px}.smask-field label{display:block;font-size:11px;color:var(--smask-gold);margin-bottom:6px;letter-spacing:.08em}.smask-field small{display:block;color:var(--smask-muted);font-size:11px;margin-top:6px;line-height:1.6}
.smask-input,.smask-select,.smask-textarea{width:100%;background:#1b1b1b;border:1px solid rgba(255,255,255,.12);border-radius:10px;color:#fff;padding:10px 12px;font-size:13px;font-family:inherit;outline:none}
.smask-input:focus,.smask-select:focus,.smask-textarea:focus{border-color:var(--smask-gold);box-shadow:0 0 0 3px rgba(198,167,92,.14)}
.smask-textarea{min-height:110px;resize:vertical}
.smask-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.smask-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.smask-inline{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.smask-chip{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:rgba(198,167,92,.12);color:var(--smask-gold);font-size:10px;letter-spacing:.08em}
.smask-muted{color:var(--smask-muted);font-size:12px;line-height:1.7}
.smask-note{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);font-size:12px;color:var(--smask-muted);line-height:1.7}
.smask-selected-target{outline:2px solid var(--smask-gold)!important;outline-offset:2px!important;box-shadow:0 0 0 4px rgba(198,167,92,.16)!important}
#smask-editor-toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:2147483003;background:rgba(10,10,10,.92);color:#fff;border:1px solid rgba(198,167,92,.28);padding:10px 16px;border-radius:999px;box-shadow:0 8px 24px rgba(0,0,0,.35);font-family:"Noto Sans JP",system-ui,sans-serif;font-size:12px}
#smask-editor-toast.is-success{border-color:rgba(83,179,110,.28);color:#c6f2d1}
#smask-editor-toast.is-error{border-color:rgba(229,115,115,.28);color:#ffd0d0}
.smask-upload-row{display:flex;gap:8px;align-items:center}.smask-upload-row input[type="file"]{display:block;width:100%;font-size:12px;color:var(--smask-muted)}
.smask-divider{height:1px;background:var(--smask-line);margin:14px 0}

@media (max-width: 768px){
  #smask-editor-root{left:12px;right:12px;top:auto;bottom:12px;width:auto;max-height:72vh}
  #smask-page-switcher{top:10px;left:12px;right:12px;transform:none;border-radius:18px;justify-content:space-between}
  #smask-page-switcher .smask-switcher-pages{flex:1;overflow:auto;white-space:nowrap}
}
