:root{
  --note-gold:#f2b84b;
  --note-violet:#7b4ed8;
  --note-bg:#121219;
  --note-card:#1a1a24;
  --note-line:rgba(255,255,255,.10);
  --note-muted:#a8a9b5;
  --note-ok:#79d7a8;
  --note-danger:#ff8178;
}

.note-page{min-height:100vh;background:radial-gradient(circle at 15% 5%,rgba(123,78,216,.11),transparent 32%),#111118}
.note-shell{width:min(1500px,calc(100% - 36px));margin:0 auto;padding:20px 0 54px}

.note-ad{position:relative;min-height:118px;margin:0 0 22px;padding:26px 18px 16px;border:1px solid var(--note-line);border-radius:18px;background:rgba(255,255,255,.025);overflow:hidden}
.note-ad-label{position:absolute;top:8px;left:14px;color:#7f818d;font-size:.62rem;font-weight:850;letter-spacing:.16em}
.note-ad-slot{min-height:76px;display:grid;place-items:center}
.note-ad-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;color:#858793}
.note-ad-placeholder strong{color:#a9abb5;font-size:.8rem}
.note-ad-placeholder span{max-width:620px;font-size:.7rem;line-height:1.4}
.note-ad.is-live{background:#0e0e14}
.note-ad.is-hidden{display:none}

.note-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 18px;padding:14px 2px}
.note-heading h1{margin:3px 0 8px;font-size:clamp(2.5rem,5vw,4.7rem);line-height:.95;letter-spacing:-.045em}
.note-heading p:not(.eyebrow){max-width:780px;margin:0;color:var(--note-muted);font-size:1rem;line-height:1.55}
.note-heading-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.note-heading-badges span{display:inline-flex;align-items:center;min-height:34px;padding:7px 11px;border:1px solid var(--note-line);border-radius:999px;font-size:.74rem;font-weight:800}
.note-local-badge{color:var(--note-ok);background:rgba(121,215,168,.07);border-color:rgba(121,215,168,.25)!important}
.note-limit-badge{color:#d6c5ff;background:rgba(123,78,216,.09);border-color:rgba(123,78,216,.28)!important}

.note-editor-card{border:1px solid var(--note-line);border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.018));box-shadow:0 22px 65px rgba(0,0,0,.19);overflow:hidden}
.note-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;border-bottom:1px solid var(--note-line);background:rgba(255,255,255,.02)}
.note-save-state{display:flex;align-items:center;gap:10px;min-width:0}
.note-save-state>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.note-save-state strong{font-size:.82rem}
.note-save-state small{color:var(--note-muted);font-size:.68rem;white-space:normal}
.note-save-dot{width:10px;height:10px;flex:0 0 10px;border-radius:999px;background:#8a8c96;box-shadow:0 0 0 5px rgba(138,140,150,.08)}
.note-save-dot.dirty{background:var(--note-gold);box-shadow:0 0 0 5px rgba(242,184,75,.09)}
.note-save-dot.saved{background:var(--note-ok);box-shadow:0 0 0 5px rgba(121,215,168,.09)}
.note-save-dot.error{background:var(--note-danger);box-shadow:0 0 0 5px rgba(255,129,120,.09)}
.note-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.note-button{min-height:36px;padding:8px 12px;border:1px solid var(--note-line);border-radius:11px;background:rgba(255,255,255,.045);color:#eeeef4;font:inherit;font-size:.75rem;font-weight:800;cursor:pointer;transition:.15s ease}
.note-button:hover{border-color:rgba(242,184,75,.35);background:rgba(255,255,255,.065);transform:translateY(-1px)}
.note-button.primary{border-color:rgba(123,78,216,.42);background:rgba(123,78,216,.18);color:#e4d8ff}
.note-button.danger{color:#ffaaa4}
.note-button:disabled{opacity:.45;cursor:not-allowed;transform:none}

.note-editor-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#note-text{display:block;width:100%;min-height:68vh;max-height:none;box-sizing:border-box;padding:28px 30px;border:0;outline:0;resize:vertical;background:#15151e;color:#f3f3f7;font:400 1.05rem/1.72 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;letter-spacing:.005em;caret-color:var(--note-gold);tab-size:4}
#note-text::placeholder{color:#696b76}
#note-text:focus{background:#161620;box-shadow:inset 0 0 0 1px rgba(123,78,216,.16)}
.note-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:11px 16px;border-top:1px solid var(--note-line);background:rgba(255,255,255,.02)}
.note-editor-footer p{margin:0;color:var(--note-muted);font-size:.7rem;line-height:1.4}
.note-editor-footer strong{flex:0 0 auto;color:#d8d9e0;font-size:.78rem;font-variant-numeric:tabular-nums}
.note-editor-footer strong.near-limit{color:var(--note-gold)}
.note-editor-footer strong.at-limit{color:var(--note-danger)}

.note-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.note-info-grid article{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;padding:15px;border:1px solid var(--note-line);border-radius:16px;background:rgba(255,255,255,.025)}
.note-info-grid article>span{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:rgba(123,78,216,.12);color:#d5c2ff;font-size:.68rem;font-weight:900}
.note-info-grid strong{font-size:.8rem}
.note-info-grid p{margin:4px 0 0;color:var(--note-muted);font-size:.7rem;line-height:1.5}

@media(max-width:980px){
  .note-heading{align-items:flex-start;flex-direction:column}
  .note-heading-badges{justify-content:flex-start}
  .note-toolbar{align-items:flex-start;flex-direction:column}
  .note-actions{width:100%;justify-content:flex-start}
  .note-info-grid{grid-template-columns:1fr}
  #note-text{min-height:64vh;padding:22px 20px}
}

@media(max-width:620px){
  .note-shell{width:min(100% - 20px,1500px);padding-top:12px}
  .note-ad{min-height:96px;border-radius:14px}
  .note-heading h1{font-size:2.7rem}
  .note-actions{display:grid;grid-template-columns:1fr 1fr}
  .note-button{width:100%}
  #note-text{min-height:70vh;padding:18px 15px;font-size:.95rem;line-height:1.65}
  .note-editor-footer{align-items:flex-start;flex-direction:column}
}
