/* ============================================================
   ShareSafeNote — Design system (dark)
   ============================================================ */

:root{
  /* Surfaces */
  --bg:#080B0F;
  --bg-glow:rgba(16,185,129,.10);
  --surface:#111820;
  --surface-2:#161E27;
  --surface-3:#1B242E;

  /* Lines */
  --border:#202A35;
  --border-hi:#2B3743;

  /* Text */
  --text:#E8EFF5;
  --text-2:#A9B9C6;
  --muted:#71838F;

  /* Brand */
  --brand:#10B981;
  --brand-hi:#34D399;
  --brand-soft:rgba(16,185,129,.12);
  --brand-line:rgba(16,185,129,.28);
  --on-brand:#04160F;

  /* Feedback */
  --danger:#F87171;
  --danger-soft:rgba(248,113,113,.10);
  --success:#34D399;

  /* Shape */
  --r-sm:8px;
  --r:12px;
  --r-lg:16px;
  --r-xl:22px;

  /* Depth */
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
  --shadow-lg:0 1px 2px rgba(0,0,0,.4), 0 28px 60px -24px rgba(0,0,0,.75);
  --ring:0 0 0 3px rgba(16,185,129,.20);

  --ease:cubic-bezier(.22,.61,.36,1);
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }
html,body{ min-height:100%; }

body{
  margin:0;
  font-family:Inter,"SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  font-size:15px;
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
  background-image:
    radial-gradient(60rem 32rem at 50% -14rem, var(--bg-glow), transparent 70%),
    radial-gradient(42rem 26rem at 100% 0%, rgba(56,189,248,.05), transparent 65%);
  background-repeat:no-repeat;
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  flex-direction:column;
}

::selection{ background:rgba(16,185,129,.28); color:#fff; }

h1,h2,h3{
  margin:0;
  font-weight:650;
  letter-spacing:-.022em;
  line-height:1.15;
  color:var(--text);
}

a{ color:var(--brand-hi); }

:focus-visible{ outline:2px solid var(--brand-hi); outline-offset:2px; border-radius:4px; }

.wrap{ width:100%; max-width:1120px; margin:0 auto; padding:24px 24px; }

/* ---------------- Topbar ---------------- */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(8,11,15,.72);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding-top:14px;
  padding-bottom:14px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
  white-space:nowrap;
}
.brand-logo{ width:28px; height:28px; display:block; }
.brand-name{
  font-size:16px;
  font-weight:650;
  letter-spacing:-.02em;
}

.nav{ display:flex; align-items:center; gap:2px; flex-wrap:wrap; justify-content:flex-end; }
.nav a{
  text-decoration:none;
  color:var(--text-2);
  font-size:14px;
  font-weight:500;
  padding:8px 12px;
  border-radius:var(--r-sm);
  transition:color .16s var(--ease), background .16s var(--ease);
}
.nav a:hover{ color:var(--text); background:var(--surface-2); }
.nav .lang{
  margin-left:8px;
  border:1px solid var(--border-hi);
  background:var(--surface);
  color:var(--text);
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:12px;
  padding:7px 12px;
}
.nav .lang:hover{ border-color:var(--brand-line); background:var(--brand-soft); color:var(--brand-hi); }

/* ---------------- Layout ---------------- */

main.wrap{ flex:1 0 auto; }

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
  gap:48px;
  align-items:center;
  padding-top:64px;
  padding-bottom:44px;
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:20px;
  padding:5px 12px 5px 8px;
  border:1px solid var(--brand-line);
  border-radius:999px;
  background:var(--brand-soft);
  color:var(--brand-hi);
  font-size:12.5px;
  font-weight:600;
  letter-spacing:-.005em;
}
.kicker svg{ width:14px; height:14px; flex:0 0 auto; }

.hero h1{
  max-width:17ch;
  margin:0 0 18px;
  font-size:clamp(34px,4.6vw,54px);
  font-weight:680;
  letter-spacing:-.035em;
}
.sub{
  max-width:52ch;
  margin:0 0 26px;
  color:var(--text-2);
  font-size:17px;
  line-height:1.6;
}

/* ---------------- Card ---------------- */

.card{
  position:relative;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow);
}
.form-card{ padding:24px; box-shadow:var(--shadow-lg); }

.label{
  display:block;
  margin-bottom:9px;
  color:var(--text);
  font-size:13.5px;
  font-weight:600;
  letter-spacing:-.005em;
}
.label.small{ color:var(--text-2); font-size:12.5px; }

/* ---------------- Fields ---------------- */

textarea, select, input{
  width:100%;
  border:1px solid var(--border-hi);
  border-radius:var(--r);
  padding:12px 14px;
  background:var(--bg);
  color:var(--text);
  font:inherit;
  font-size:15px;
  transition:border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
textarea{ height:170px; min-height:120px; resize:vertical; line-height:1.6; }
textarea::placeholder{ color:var(--muted); }

select{
  appearance:none;
  -webkit-appearance:none;
  padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371838F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 13px center;
  cursor:pointer;
}
select option{ background:var(--surface-2); color:var(--text); }

textarea:hover, select:hover, input:hover{ border-color:#37454F; }
textarea:focus, select:focus, input:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:var(--ring);
}

.row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(230px,.85fr);
  gap:16px;
  margin-top:18px;
  align-items:start;
}

.how{
  border:1px solid var(--border);
  border-radius:var(--r);
  padding:16px;
  background:var(--surface-2);
  height:100%;
}
.how-title{
  margin-bottom:6px;
  font-size:13px;
  font-weight:600;
  color:var(--text);
}
.how-body{ color:var(--muted); font-size:13px; line-height:1.55; }

/* ---------------- Buttons ---------------- */

.btn-primary{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  min-height:48px;
  margin-top:20px;
  border:0;
  border-radius:var(--r);
  padding:13px 18px;
  background:linear-gradient(180deg,var(--brand-hi),var(--brand));
  color:var(--on-brand);
  cursor:pointer;
  font:inherit;
  font-size:15px;
  font-weight:650;
  letter-spacing:-.01em;
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset, 0 8px 24px -10px rgba(16,185,129,.8);
  transition:filter .16s var(--ease), transform .1s var(--ease), box-shadow .16s var(--ease);
}
.btn-primary:hover{ filter:brightness(1.07); box-shadow:0 1px 0 rgba(255,255,255,.2) inset, 0 12px 30px -10px rgba(16,185,129,.9); }
.btn-primary:active{ transform:translateY(1px); }
.btn-primary:disabled{ cursor:not-allowed; opacity:.5; box-shadow:none; filter:none; }

.btn-secondary,
.btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  border-radius:var(--r);
  padding:11px 16px;
  font:inherit;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.btn-secondary{ border:1px solid var(--brand-line); background:var(--brand-soft); color:var(--brand-hi); }
.btn-secondary:hover{ background:rgba(16,185,129,.2); border-color:var(--brand); }
.btn-ghost{ text-decoration:none; border:1px solid var(--border-hi); background:var(--surface-2); color:var(--text-2); }
.btn-ghost:hover{ background:var(--surface-3); border-color:#3A4854; color:var(--text); }

/* ---------------- Result ---------------- */

.result{
  margin-top:20px;
  padding-top:20px;
  border-top:1px solid var(--border);
}
.success-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
  color:var(--success);
  font-size:14px;
  font-weight:600;
}
.link-box{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.link-box input{
  flex:1 1 320px;
  min-height:44px;
  background:var(--bg);
  border-color:var(--brand-line);
  color:var(--text-2);
  font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  font-size:12.5px;
}
.copy-status{ margin-top:10px; color:var(--success); font-size:13px; font-weight:600; }
.hint{ margin-top:10px; color:var(--muted); font-size:13px; }
.hidden{ display:none !important; }

/* ---------------- Toggle ---------------- */

.option-line{ margin-top:16px; }
.toggle{ display:inline-flex; align-items:center; gap:11px; cursor:pointer; user-select:none; }
.toggle input{ position:absolute; opacity:0; width:0; height:0; }
.toggle .slider{
  flex:0 0 auto;
  width:40px;
  height:23px;
  border-radius:999px;
  background:var(--surface-3);
  border:1px solid var(--border-hi);
  position:relative;
  transition:background .18s var(--ease), border-color .18s var(--ease);
}
.toggle .slider::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:17px;
  height:17px;
  border-radius:50%;
  background:#8FA0AE;
  transition:transform .18s var(--ease), background .18s var(--ease);
}
.toggle input:checked + .slider{ background:var(--brand); border-color:var(--brand); }
.toggle input:checked + .slider::after{ transform:translateX(17px); background:#fff; }
.toggle input:focus-visible + .slider{ box-shadow:var(--ring); }
.toggle-text{ color:var(--text-2); font-size:13.5px; font-weight:500; }

/* ---------------- Chips ---------------- */

.chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:0; }
.chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 13px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text-2);
  font-size:12.5px;
  font-weight:500;
}
.chip::before{
  content:"";
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--brand);
  box-shadow:0 0 8px var(--brand);
}

/* ---------------- Hero side ---------------- */

.hero-right{ display:grid; gap:16px; }
.illustration{
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  background:var(--surface);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.hero-right img{ display:block; width:100%; height:auto; }

.mini{ padding:18px 20px; }
.mini-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
  font-size:14px;
  font-weight:600;
}
.muted{ color:var(--muted); }
.mini .muted{ font-size:13.5px; line-height:1.55; }

/* ---------------- Composer ---------------- */

.composer{ max-width:840px; margin:0 auto 56px; }
.composer-head{ margin-bottom:16px; }
.composer-head h2{ font-size:20px; letter-spacing:-.025em; }
.composer-head .muted{ margin-top:4px; font-size:14px; }

/* ---------------- Steps ---------------- */

.steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin:0 0 24px;
}
.step{ padding:20px; }
.step-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  margin-bottom:12px;
  border-radius:8px;
  border:1px solid var(--brand-line);
  background:var(--brand-soft);
  color:var(--brand-hi);
  font-size:13px;
  font-weight:650;
}
.step-title{ margin-bottom:5px; font-size:14.5px; font-weight:600; }
.step-body{ color:var(--muted); font-size:13.5px; line-height:1.55; }

/* ---------------- Footer ---------------- */

.footer{
  flex:0 0 auto;
  margin-top:48px;
  border-top:1px solid var(--border);
  background:rgba(8,11,15,.6);
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px 24px;
  flex-wrap:wrap;
  padding-top:22px;
  padding-bottom:26px;
  font-size:13.5px;
}
.footer-nav{ display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.footer-nav a{
  color:var(--text-2);
  text-decoration:none;
  font-size:13.5px;
  padding:5px 11px;
  border-radius:var(--r-sm);
  transition:color .16s var(--ease), background .16s var(--ease);
}
.footer-nav a:hover{ color:var(--text); background:var(--surface-2); }

/* ---------------- Read page ---------------- */

.read-card{ max-width:720px; margin:56px auto 0; padding:28px; }
.read-title{ margin:0 0 8px; font-size:30px; letter-spacing:-.03em; }
.read-card > .muted{ font-size:14.5px; }

.plain{
  margin-top:20px;
  padding:18px;
  border-radius:var(--r);
  border:1px solid var(--border-hi);
  background:var(--bg);
  color:var(--text);
  font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  font-size:13.5px;
  line-height:1.65;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
}

.alert{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:16px;
  padding:13px 15px;
  border-radius:var(--r);
  border:1px solid rgba(248,113,113,.3);
  background:var(--danger-soft);
  color:var(--danger);
  font-size:14px;
  font-weight:500;
}

/* ---------------- Legal ---------------- */

.legal{ max-width:760px; margin:56px auto 0; padding:32px; }
.legal h1{ margin-bottom:14px; font-size:30px; letter-spacing:-.03em; }
.error-actions{ margin-top:20px; }
.legal .muted{ font-size:15px; line-height:1.7; white-space:pre-line; }

/* ---------------- Ads ---------------- */

.ad-slot{
  max-width:760px;
  margin:20px auto;
  padding:12px;
  border:1px solid var(--border);
  border-radius:var(--r);
  background:var(--surface);
  color:var(--muted);
  text-align:center;
  overflow:hidden;
}

/* ---------------- Admin ---------------- */

.admin-login,
.admin-page{ max-width:960px; margin:48px auto 0; }
.admin-login{ padding:28px; max-width:440px; }
.admin-login h1,
.admin-heading h1{ margin:0 0 6px; font-size:26px; letter-spacing:-.03em; }
.admin-form{ margin-top:20px; }
.admin-note{ margin-bottom:16px; color:var(--muted); font-size:14px; }

.admin-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}
.admin-panel,
.admin-block{ padding:22px; }
.admin-panel h2{ margin:0 0 18px; font-size:17px; letter-spacing:-.02em; }

.admin-grid,
.admin-block-top{
  display:grid;
  grid-template-columns:1fr 230px;
  gap:16px;
  margin-bottom:16px;
}
.ad-form textarea{ margin-bottom:14px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:13px; }

.check-line{
  display:flex;
  align-items:center;
  gap:9px;
  margin:6px 0 16px;
  color:var(--text-2);
  font-size:13.5px;
  font-weight:500;
}
.check-line input{ width:auto; accent-color:var(--brand); }
.check-line.compact{ margin:0; }

.admin-list{ display:grid; gap:16px; margin-top:20px; }
.admin-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.delete-form{ margin-top:12px; }

.btn-danger{
  min-height:40px;
  border:1px solid rgba(248,113,113,.3);
  border-radius:var(--r-sm);
  padding:9px 14px;
  background:var(--danger-soft);
  color:var(--danger);
  cursor:pointer;
  font:inherit;
  font-size:13.5px;
  font-weight:600;
  transition:background .16s var(--ease), border-color .16s var(--ease);
}
.btn-danger:hover{ background:rgba(248,113,113,.18); border-color:var(--danger); }

.empty-state{
  padding:32px 20px;
  border:1px dashed var(--border-hi);
  border-radius:var(--r);
  background:var(--surface);
  color:var(--muted);
  font-size:14px;
  text-align:center;
}

/* ---------------- Responsive ---------------- */

@media (max-width:1000px){
  .hero{ grid-template-columns:1fr; gap:32px; padding-top:44px; }
  .hero-right{ max-width:560px; }
  .steps{ grid-template-columns:1fr; }
}

@media (max-width:760px){
  .nav a:not(.lang){ display:none; }
  .nav .lang{ margin-left:0; }
}

@media (max-width:680px){
  .wrap{ padding:20px 16px; }
  .topbar-inner{ gap:12px; }
  .brand-name{ font-size:15px; }
  .hero{ padding-top:32px; }
  .hero h1{ max-width:none; }
  .sub{ font-size:16px; margin-bottom:26px; }
  .form-card{ padding:18px; }
  .row{ grid-template-columns:1fr; }
  .link-box{ display:grid; grid-template-columns:1fr; }
  .btn-secondary,.btn-ghost{ width:100%; }
  .read-card,.legal{ margin-top:32px; padding:20px; }
  .read-title,.legal h1{ font-size:25px; }
  .footer-inner{ flex-direction:column; align-items:flex-start; gap:10px; }
  .footer-nav{ margin-left:-11px; }
  .admin-heading{ flex-direction:column; }
  .admin-grid,.admin-block-top{ grid-template-columns:1fr; }
  .admin-actions{ flex-direction:column; align-items:stretch; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* ============================================================
   Live code sessions
   ============================================================ */

.nav-primary{
  color:var(--brand-hi) !important;
  font-weight:600;
}
.nav-primary:hover{ background:var(--brand-soft) !important; }

.live-intro{ max-width:720px; margin:0 auto; padding-top:56px; }
.live-intro h1{ margin:0 0 16px; font-size:clamp(30px,3.6vw,42px); letter-spacing:-.033em; }
.live-intro .sub{ margin-bottom:28px; }
.live-intro .how{ background:var(--surface-2); }
.live-intro .hint{ text-align:center; }

.live-page{ padding-top:36px; }

.live-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  margin-bottom:20px;
}
.live-title{ font-size:26px; letter-spacing:-.03em; }
.live-lede{ margin:6px 0 0; max-width:60ch; font-size:14px; }

.live-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.live-count{ font-size:13px; }

.live-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:5px 12px;
  border-radius:999px;
  border:1px solid var(--border-hi);
  background:var(--surface-2);
  color:var(--text-2);
  font-size:12.5px;
  font-weight:600;
}
.live-status::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
}
.live-status--live{
  border-color:var(--brand-line);
  background:var(--brand-soft);
  color:var(--brand-hi);
}
.live-status--live::before{ animation:live-pulse 1.8s var(--ease) infinite; }
.live-status--warn{ border-color:rgba(234,179,8,.3); background:rgba(234,179,8,.1); color:#FACC15; }
.live-status--off{ color:var(--muted); }

@keyframes live-pulse{
  0%,100%{ box-shadow:0 0 0 0 rgba(52,211,153,.55); }
  70%{ box-shadow:0 0 0 6px rgba(52,211,153,0); }
}

.live-badge{
  padding:5px 12px;
  border-radius:999px;
  border:1px solid rgba(234,179,8,.35);
  background:rgba(234,179,8,.12);
  color:#FACC15;
  font-size:12.5px;
  font-weight:600;
}

.live-share{ padding:18px 20px; margin-bottom:16px; }
.live-warn{ color:#FACC15; }

.live-panel{ padding:0; overflow:hidden; }

.live-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background:var(--surface-2);
}
.live-toolbar-left,
.live-toolbar-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.live-toolbar .label{ margin-bottom:0; }
.live-toolbar .btn-ghost{ min-height:36px; padding:8px 13px; font-size:13px; }

.live-lang-picker{ display:flex; align-items:center; gap:8px; }
/* The panel is already labelled "Code"; the select carries an aria-label instead. */
.live-lang-picker .label{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}
.live-lang-picker select{
  width:auto;
  min-width:150px;
  min-height:36px;
  padding:6px 34px 6px 11px;
  font-size:13px;
}
.live-lang-tag{
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border-hi);
  background:var(--bg);
  color:var(--text-2);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;
}

.live-panel .copy-status{ margin:10px 18px -4px; }

/* --- code surfaces --- */

.live-editor,
.live-view{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  background:var(--bg);
  min-height:340px;
  max-height:64vh;
}

.live-gutter{
  padding:16px 10px 16px 16px;
  border-right:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.65;
  text-align:right;
  overflow:hidden;
  user-select:none;
}
.live-gutter span{ display:block; }

.live-editor textarea{
  height:auto;
  min-height:0;
  border:0;
  border-radius:0;
  padding:16px;
  background:transparent;
  font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.65;
  resize:none;
  overflow:auto;
  white-space:pre;
  tab-size:2;
}
.live-editor textarea:focus{ box-shadow:none; border:0; }
.live-editor textarea:hover{ border:0; }
.live-editor textarea[readonly]{ color:var(--text-2); }

.live-pre{
  margin:0;
  padding:16px;
  overflow:auto;
  background:transparent;
}
.live-pre code,
.live-pre code.hljs{
  display:block;
  background:transparent;
  padding:0;
  font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.65;
  white-space:pre;
  tab-size:2;
}

.live-empty{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  color:var(--muted);
  font-size:14px;
  text-align:center;
  pointer-events:none;
}

/* --- role and mode switching --- */

.live-editor-only,
.live-viewer-only,
.live-title-editor,
.live-title-viewer{ display:none; }

.live-role-editor .live-editor-only{ display:flex; }
.live-role-editor .live-title-editor{ display:inline; }
.live-role-editor .card.live-editor-only{ display:block; }
.live-role-editor .live-editor{ display:grid; }
.live-role-editor .live-view{ display:none; }

.live-role-viewer .live-viewer-only{ display:inline-flex; }
.live-role-viewer .live-title-viewer{ display:inline; }
.live-role-viewer .live-view{ display:grid; }

/* author previewing their own snippet */
.live-role-editor .live-empty{ display:none; }
.live-role-editor.live-previewing .live-editor{ display:none; }
.live-role-editor.live-previewing .live-view{ display:grid; }

@media (max-width:680px){
  .live-intro{ padding-top:32px; }
  .live-page{ padding-top:24px; }
  .live-head{ gap:14px; }
  .live-title{ font-size:22px; }
  .live-toolbar{ padding:12px 14px; }
  .live-toolbar-right{ width:100%; }
  .live-toolbar-right .btn-ghost{ flex:1 1 auto; }
  .live-lang-picker select{ min-width:0; flex:1 1 auto; }
  .live-editor,.live-view{ min-height:280px; max-height:56vh; }
  .live-gutter{ padding-left:12px; }
  .live-share{ padding:16px; }
}
