:root{
  --bg:#f6f7f9;
  --bg-soft:#eef1f6;
  --panel:#ffffff;
  --panel-soft:#fafbfc;
  --text:#171923;
  --muted:#667085;
  --subtle:#98a2b3;
  --line:#e4e7ec;
  --line-strong:#d0d5dd;
  --primary:#4f46e5;
  --primary-hover:#4338ca;
  --primary-soft:#eef2ff;
  --danger:#d92d20;
  --danger-soft:#fef3f2;
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
  --shadow-md:0 14px 35px rgba(16,24,40,.08);
  --shadow-lg:0 24px 70px rgba(16,24,40,.16);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,Helvetica,sans-serif;
}
*{box-sizing:border-box}
html{font-size:15px}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 12% 0%,rgba(79,70,229,.10),transparent 30%),
    linear-gradient(180deg,#fbfcff 0%,var(--bg) 44%,#f2f4f8 100%);
  color:var(--text);
  font-size:.94rem;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,textarea,select{font:inherit}
button{transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
button:hover{transform:translateY(-1px)}
button:active{transform:translateY(0)}
.app-header{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  padding:28px clamp(18px,4vw,56px);
  color:var(--text);
  background:rgba(255,255,255,.78);
  border-bottom:1px solid rgba(208,213,221,.72);
  box-shadow:0 1px 0 rgba(255,255,255,.8) inset;
  backdrop-filter:blur(18px);
}
.app-header h1{
  margin:0;
  font-size:clamp(2rem,4.4vw,3.4rem);
  line-height:.98;
  letter-spacing:-.055em;
  font-weight:720;
}
.app-header p{max-width:720px;margin:.55rem 0 0;color:var(--muted);font-size:.94rem}
.eyebrow{
  display:inline-flex;
  margin:0 0 10px;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:#475467;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.68rem;
  font-weight:750;
  box-shadow:var(--shadow-sm);
}
.layout{
  display:grid;
  grid-template-columns:minmax(280px,390px) 1fr;
  gap:18px;
  padding:20px clamp(14px,4vw,56px) 22px;
}
.download-strip{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin:0 clamp(14px,4vw,56px) 34px;
  padding:18px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(208,213,221,.72);
  border-radius:18px;
  box-shadow:var(--shadow-md);
  backdrop-filter:blur(14px);
}
.download-strip h2{margin:0;font-size:1.05rem;letter-spacing:-.02em;font-weight:720}
.download-strip p{margin:.4rem 0 0;color:var(--muted);font-size:.88rem;max-width:680px}
.download-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.download-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}
.panel{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(208,213,221,.72);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow-md);
  backdrop-filter:blur(14px);
}
.panel h2{margin:0;font-size:1.05rem;letter-spacing:-.02em;font-weight:720}
.panel-title-row{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}
.primary,.secondary,.ghost,.danger{
  border:1px solid transparent;
  border-radius:10px;
  padding:9px 12px;
  cursor:pointer;
  font-size:.86rem;
  font-weight:680;
  line-height:1.2;
  box-shadow:var(--shadow-sm);
}
.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.primary:hover{background:var(--primary-hover);border-color:var(--primary-hover);box-shadow:0 10px 22px rgba(79,70,229,.22)}
.secondary{background:var(--primary-soft);border-color:#d9ddff;color:#3730a3}
.secondary:hover{background:#e0e7ff;border-color:#c7d2fe}
.ghost{background:#fff;border-color:var(--line);color:#344054}
.ghost:hover{background:#f9fafb;border-color:var(--line-strong)}
.danger{background:var(--danger-soft);border-color:#fecdca;color:var(--danger)}
.danger:hover{background:#fee4e2;border-color:#fda29b}
.texts-list{display:grid;gap:10px}
.text-card{
  display:grid;
  gap:12px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px;
  background:linear-gradient(180deg,#fff,var(--panel-soft));
  box-shadow:var(--shadow-sm);
}
.text-card h3{margin:0;font-size:.96rem;letter-spacing:-.01em;font-weight:700}
.text-card p{margin:4px 0 0;color:var(--muted);font-size:.79rem}
.card-actions,.form-actions{display:flex;flex-wrap:wrap;gap:8px}
.field-label{display:grid;gap:7px;margin:12px 0 9px;color:#344054;font-size:.84rem;font-weight:700}
.field-label input{
  width:100%;
  border:1px solid var(--line-strong);
  border-radius:12px;
  padding:11px 12px;
  background:#fff;
  color:var(--text);
  outline:none;
  box-shadow:var(--shadow-sm);
}
.field-label input:focus{border-color:#a5b4fc;box-shadow:0 0 0 4px rgba(79,70,229,.10)}
.simple-html-editor{
  border:1px solid var(--line-strong);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,var(--shadow-sm);
}
.she-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:9px;
  background:linear-gradient(180deg,#f9fafb,#f2f4f7);
  border-bottom:1px solid var(--line);
}
.she-toolbar button,.she-toolbar input{
  border:1px solid var(--line);
  background:#fff;
  color:#344054;
  border-radius:9px;
  padding:7px 9px;
  min-height:34px;
  font-size:.82rem;
  font-weight:680;
  box-shadow:var(--shadow-sm);
}
.she-toolbar button:hover{background:#f9fafb;border-color:var(--line-strong)}
.she-toolbar input[type="color"]{width:38px;padding:4px;cursor:pointer}
.she-select-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  padding:0 8px;
  min-height:34px;
  color:#344054;
  font-size:.82rem;
  font-weight:680;
  box-shadow:var(--shadow-sm);
}
.she-select-label span{color:var(--muted);font-size:.66rem;text-transform:uppercase;letter-spacing:.05em;font-weight:760}
.she-toolbar select{
  border:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-weight:680;
  padding:6px 1px;
  min-height:32px;
  outline:none;
  cursor:pointer;
}
.she-toolbar select:focus-visible,.she-toolbar button:focus-visible,.primary:focus-visible,.secondary:focus-visible,.ghost:focus-visible,.danger:focus-visible{
  outline:3px solid rgba(79,70,229,.18);
  outline-offset:2px;
}
.she-content{
  min-height:330px;
  padding:18px;
  outline:none;
  line-height:1.58;
  font-size:.94rem;
  color:var(--text);
  background:#fff;
}
.she-content:focus{box-shadow:inset 0 0 0 2px rgba(79,70,229,.18)}
.she-content:empty:before{content:attr(data-placeholder);color:var(--subtle)}
.preview-content h1,.she-content h1{font-size:1.9rem;line-height:1.08;margin:.7em 0 .34em;letter-spacing:-.045em}
.preview-content h2,.she-content h2{font-size:1.55rem;line-height:1.14;margin:.7em 0 .34em;letter-spacing:-.035em}
.preview-content h3,.she-content h3{font-size:1.3rem;line-height:1.2;margin:.7em 0 .34em;letter-spacing:-.025em}
.preview-content h4,.she-content h4{font-size:1.1rem;line-height:1.25;margin:.7em 0 .34em;letter-spacing:-.01em}
.preview-content h5,.she-content h5{font-size:.98rem;line-height:1.3;margin:.7em 0 .34em;text-transform:uppercase;letter-spacing:.04em}
.preview-content h6,.she-content h6{font-size:.88rem;line-height:1.35;margin:.7em 0 .34em;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.she-content p,.preview-content p{margin:.55em 0}
.she-content ul,.she-content ol,.preview-content ul,.preview-content ol{padding-left:1.35rem;margin:.6em 0}
.empty{
  color:var(--muted);
  background:#f9fafb;
  border:1px dashed var(--line-strong);
  border-radius:14px;
  padding:16px;
  font-size:.88rem;
}
.modal[aria-hidden="true"]{display:none}
.modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:18px}
.modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.54);backdrop-filter:blur(4px)}
.modal-card{
  position:relative;
  width:min(860px,100%);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border:1px solid rgba(255,255,255,.8);
  border-radius:20px;
  padding:22px;
  box-shadow:var(--shadow-lg);
}
.modal-card h2{margin:0;font-size:1.25rem;letter-spacing:-.025em}
.modal-close{
  position:absolute;
  right:14px;
  top:12px;
  border:1px solid var(--line);
  background:#fff;
  color:#344054;
  border-radius:999px;
  width:34px;
  height:34px;
  font-size:1.3rem;
  line-height:1;
  box-shadow:var(--shadow-sm);
}
.preview-content{
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  margin:13px 0;
  padding:15px 0;
  line-height:1.62;
  font-size:.94rem;
}
@media(max-width:860px){
  html{font-size:14px}
  .app-header{display:grid;padding:22px 16px}
  .layout{grid-template-columns:1fr;padding:16px 16px 12px}
  .download-strip{display:grid;margin:0 16px 24px}
  .panel-title-row{align-items:flex-start;flex-direction:column}
  .primary,.secondary,.ghost,.danger{width:100%}
  .card-actions{display:grid}
}
@media(max-width:760px){
  .she-select-label{width:100%;justify-content:space-between}
  .she-toolbar select{flex:1}
}
