/* -----------------------------------------
   MyNooto / Atlas Admin
----------------------------------------- */

:root{
  --mn-brand:#0498CC;

  --mn-bg:#ececec;
  --mn-panel:#fafafa;
  --mn-card:#ffffff;
  --mn-text:#151515;
  --mn-muted:#777;
  --mn-line:rgba(0,0,0,.10);
  --mn-soft:rgba(0,0,0,.04);
  --mn-radius:18px;
}



*{
  box-sizing:border-box;
}

html{
  overflow-y:scroll;
  scrollbar-gutter:stable;
}

html,
body{
  margin:0;
  min-height:100%;
}

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

a:hover{
  color:#027da8;
}


body.MyNootoBody{
  background:var(--mn-bg);
  color:var(--mn-text);
  font-family:Lato, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}



/* -----------------------------------------
   Desktop only
----------------------------------------- */

@media (max-width:1099px){

  body.MyNootoBody:not(.MyNootoMobileOK){
    min-height:100vh;
    background:#ececec;
  }

  body.MyNootoBody:not(.MyNootoMobileOK) > *{
    display:none !important;
  }

  html:has(body.MyNootoBody:not(.MyNootoMobileOK))::before{
content:
  "MyNooto is available on desktop only.\A"
  "MyNooto è disponibile solo su desktop.\A"
  "MyNooto はデスクトップ専用です。";


    position:fixed;
    inset:0;
    z-index:9999;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:120px 40px 40px;

    background:
      url('https://nooto.org/favicons/mynooto.png')
      center calc(50% - 130px) / 250px auto no-repeat,
      #ececec;

    color:#111;
    text-align:center;
    white-space:pre-line;

    font-size:1rem;
    line-height:1.45;
    font-weight:600;
    font-family:Lato, system-ui, sans-serif;
  }
}





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

.MyNootoTopbar{
  position:sticky;
  top:0;
  z-index:100;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 34px;
  background:rgba(250,250,250,.92);
  border-bottom:1px solid var(--mn-line);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.MyNootoBrand{
  font-weight:800;
  letter-spacing:-.03em;
  font-size:1.25rem;
}

.MyNootoTopnav{
  display:flex;
  align-items:center;
  gap:8px;
}

.MyNootoTopnav a{
  display:inline-flex;
  align-items:center;
  height:36px;
  padding:0 13px;
  border-radius:999px;
  color:#222;
  text-decoration:none;
  font-size:.9rem;
  font-weight:700;
}

.MyNootoTopnav a:hover{
  background:var(--mn-soft);
}



.MyNootoGroup{
  display:flex;
  align-items:center;
  gap:16px;
  padding:6px 14px;
  border-radius:999px;
  background:#ECECEC;

  border:1px solid rgba(0,0,0,.02);
}




/* -----------------------------------------
   Shell
----------------------------------------- */

.MyNootoShell{
  width:min(1280px, calc(100% - 64px));
  margin:34px auto;
}

.MyNootoPanel{
  background:var(--mn-panel);
  border:1px solid var(--mn-line);
  border-radius:var(--mn-radius);
  box-shadow:0 18px 50px rgba(0,0,0,.06);
  overflow:hidden;
}

.MyNootoPanelHead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  padding:34px 38px 26px;
  border-bottom:1px solid var(--mn-line);
}

.MyNootoPanelHead h1{
  margin:0;
  font-size:clamp(2rem, 4vw, 3.6rem);
  line-height:.95;
  letter-spacing:-.06em;
}

.MyNootoPanelHead p{
  margin:10px 0 0 10px;
  color:var(--mn-muted);
  font-size:.95rem;
}

/* -----------------------------------------
   Table
----------------------------------------- */



.IsDisabled{
  opacity:.35;
  pointer-events:none;
}



.MyNootoDisabledFieldset{
  display:contents;
  border:0;
  padding:0;
  margin:0;
}

.MyNootoDisabledFieldset[disabled]{
  opacity:.55;
}



.MyNootoTable{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

.MyNootoTable th,
.MyNootoTable td{
  padding:18px 22px;
  border-bottom:1px solid var(--mn-line);
  text-align:left;
  vertical-align:middle;
  font-size:.94rem;
}

.MyNootoTable th{
  color:#777;
  font-size:.76rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:#fafafa;
}

.MyNootoTable tr:last-child td{
  border-bottom:0;
}

.MyNootoTable strong{
  font-weight:800;
}

.MyNootoActions{
  white-space:nowrap;
  text-align:right !important;
}

.MyNootoActions a{
  display:inline-flex;
  align-items:center;
  height:32px;
  padding:0 11px;
  margin-left:4px;
  border-radius:999px;
  background:#f3f3f3;
  color:#111;
  text-decoration:none;
  font-size:.82rem;
  font-weight:800;
}

.MyNootoActions a:hover{
  background:#111;
  color:#fff;
}

/* -----------------------------------------
   Empty
----------------------------------------- */

.MyNootoEmpty{
  padding:48px;
  background:#fff;
  color:var(--mn-muted);
}

/* -----------------------------------------
   Login
----------------------------------------- */

.MyNootoLoginBody{
  min-height:100vh;
}

.MyNootoLogin{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px;
}

.MyNootoLoginCard{
  width:min(460px, 100%);
  padding:42px;
  background:var(--mn-panel);
  border:1px solid var(--mn-line);
  border-radius:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.08);
}

.MyNootoLoginCard h1{
  margin:0;
  font-size:3rem;
  line-height:.9;
  letter-spacing:-.07em;
}

.MyNootoLoginCard p{
  margin:14px 0 30px;
  color:var(--mn-muted);
}

.MyNootoForm{
  display:grid;
  gap:16px;
}

.MyNootoForm label{
  display:grid;
  gap:7px;
  color:#555;
  font-size:.82rem;
  font-weight:800;
}

.MyNootoForm input,
.MyNootoForm select,
.MyNootoForm textarea{
  width:100%;
  min-height:46px;
  padding:0 14px;
  border:1px solid var(--mn-line);
  border-radius:12px;
  background:#fff;
  color:#111;
  font:inherit;
}

.MyNootoForm textarea{
  min-height:140px;
  padding:14px;
  resize:vertical;
}

.MyNootoForm input:focus,
.MyNootoForm select:focus,
.MyNootoForm textarea:focus{
  outline:2px solid rgba(0,0,0,.18);
  outline-offset:2px;
}

.MyNootoForm button{
  min-height:48px;
  border:0;
  border-radius:999px;
  background:#111;
  color:#fff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.MyNootoForm button:hover{
  background:#000;
}

.MyNootoError{
  margin:0 0 18px;
  padding:12px 14px;
  border-radius:12px;
  background:#fff0f0;
  color:#b00000;
  font-weight:800;
  font-size:.9rem;
}




.MyNootoLang{
  display:inline-flex;
  align-items:center;
  gap:4px;

  margin:0 0 18px;
  padding:4px;

  border:1px solid var(--mn-line);
  border-radius:999px;
  background:#fff;
}

.MyNootoLang a{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:28px;
  padding:0 10px;

  border-radius:999px;

  color:#777;
  text-decoration:none;
  font-size:.70rem;
  font-weight:700;
}

.MyNootoLang a:hover{
  color:#111;
  background:var(--mn-soft);
}

.MyNootoLang a.IsActive{
  color:#fff;
  background:var(--mn-brand);
}




.MyNootoLoginLinks{
  margin-top:18px;

  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

.MyNootoLoginLinks a{
  color:#777;
  text-decoration:none;
  font-size:.82rem;
  font-weight:700;
}

.MyNootoLoginLinks a:hover{
  color:var(--mn-brand);
}



/* -----------------------------------------
   Account
----------------------------------------- */

.MyNootoAccountMeta p{
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin:0;
  padding:13px 0;
  border-bottom:1px solid var(--mn-line);
}

.MyNootoAccountMeta p:last-child{
  border-bottom:0;
}

.MyNootoAccountMeta strong{
  color:#555;
  font-size:.82rem;
}

.MyNootoAccountMeta span{
  color:#111;
  font-family:ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size:.82rem;
}

.MyNootoDanger a{
  color:var(--mn-brand);
  font-weight:900;
  text-decoration:none;
}

.MyNootoDanger a:hover{
  text-decoration:underline;
}




/* -----------------------------------------
   Editor
----------------------------------------- */

.MyNootoEditorForm{
  height:calc(100vh - 68px);
  display:flex;
  flex-direction:column;
}

.MyNootoEditorTop{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:12px 24px;
  background:var(--mn-bg);
  border-bottom:1px solid var(--mn-line);
}

.MyNootoTitleInput{
  flex:1;
  height:42px;
  padding:0 14px;
  border:1px solid var(--mn-line);
  border-radius:12px;
  background:#fff;
  color:#111;
  font:inherit;
  font-weight:800;
}

.MyNootoEditorMeta{
  display:flex;
  align-items:center;
  gap:12px;
}

.MyNootoEditorMeta button{
  height:42px;
  padding:0 20px;
  border:0;
  border-radius:999px;
  background:#111;
  color:#fff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.MyNootoSaved{
  color:#0a7a2f;
  font-weight:900;
  font-size:.86rem;
}

/* Main split */

.MyNootoEditorSplit{
  flex:1;
  display:grid;
  grid-template-columns:minmax(80px, var(--mn-editor-left, 50%)) 8px minmax(260px, 1fr);
  gap:0;
  min-height:0;
}

.MyNootoEditorSplit > *{
  min-width:0;
  min-height:0;
}

.MyNootoEditorPane,
.MyNootoPreviewPane{
  min-width:0;
  min-height:0;
  background:#fff;
}

/* Left panel: Markdown + Images */

.MyNootoEditorPane.MyNootoEditorLeft{
  display:grid;
  grid-template-columns:100%;
  grid-template-rows:minmax(260px, 1fr) 8px 220px;
  height:100%;
  min-height:0;
  overflow:hidden;
}





.MyNootoMarkdownPane,
.MyNootoImagesPane{
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}

.MyNootoImagesPane{
  background:#fff6cc;
}

.MyNootoMarkdown{
  flex:1;
  width:100%;
  min-height:0;
  padding:24px;
  border:0;
  resize:none;
  outline:none;
  background:#fff;
  color:#111;
  font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size:15px;
  line-height:1.65;
}

/* Horizontal divider */

.MyNootoHorizontalDivider{
  background:#d0d0d0;
  cursor:row-resize;
  position:relative;
}

.MyNootoHorizontalDivider::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:3px;
  height:2px;
  background:rgba(0,0,0,.18);
}

.MyNootoHorizontalDivider:hover{
  background:#c2c2c2;
}

body.IsDraggingHorizontalDivider{
  cursor:row-resize;
  user-select:none;
}

body.IsDraggingHorizontalDivider iframe{
  pointer-events:none;
}



/* Images iframe */

.MyNootoImagesFrame{
  display:block;
  flex:1;
  width:100%;
  height:100%;
  min-height:0;
  border:0;
  background:#fff;
}

/* Vertical divider */

.MyNootoDivider{
  background:#d0d0d0;
  cursor:col-resize;
  position:relative;
}

.MyNootoDivider::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:3px;
  width:2px;
  background:rgba(0,0,0,.18);
}

.MyNootoDivider:hover{
  background:#c2c2c2;
}

/* Preview */

.MyNootoPreviewPane{
  display:flex;
  flex-direction:column;
}

.MyNootoPreview{
  flex:1;
  width:100%;
  min-height:0;
  border:0;
  background:#fff;
}

/* Shared pane header */

.MyNootoPaneHead{
  height:42px;
  display:flex;
  align-items:center;
  padding:0 18px;
  border-bottom:1px solid var(--mn-line);
  background:#fafafa;
  color:#777;
  font-size:.75rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}

/* Dragging state */

body.IsDraggingDivider{
  cursor:col-resize;
  user-select:none;
}

body.IsDraggingDivider iframe{
  pointer-events:none;
}



.MyNootoMarkdownPane{
  width:100%;
}

.MyNootoMarkdown{
  display:block;
  width:100%;
  height:100%;
  box-sizing:border-box;
}

.MyNootoMarkdownPane .MyNootoPaneHead{
  flex:0 0 42px;
}

.MyNootoImagesPane .MyNootoPaneHead{
  flex:0 0 42px;
}






/* -----------------------------------------
   Preview devices
----------------------------------------- */

.MyNootoPreviewHead{
  justify-content:space-between;
  gap:16px;
}

.MyNootoDevicePills{
  display:flex;
  align-items:center;
  gap:6px;
}

.MyNootoDevicePills button{
  height:26px;
  padding:0 10px;
  border:1px solid var(--mn-line);
  border-radius:999px;
  background:#fff;
  color:#555;
  font:inherit;
  font-size:.72rem;
  font-weight:700;
  cursor:pointer;
}

.MyNootoDevicePills button.IsActive{
  background:#111;
  color:#fff;
  border-color:#111;
}

.MyNootoPreviewStage{
  flex:1;
  min-height:0;
  display:flex;
  justify-content:center;
  background:#e4e4e4;
  overflow:auto;
  padding:0;
}

.MyNootoPreview{
  flex:0 0 auto;
  width:100%;
  height:100%;
  min-height:100%;
  border:0;
  background:#fff;
  box-shadow:0 12px 36px rgba(0,0,0,.12);
}

.MyNootoPreviewStage[data-size="desktop"] .MyNootoPreview{
  width:100%;
  max-width:none;
}

.MyNootoPreviewStage[data-size="tablet"] .MyNootoPreview{
  width:820px;
  max-width:none;
}

.MyNootoPreviewStage[data-size="mobile"] .MyNootoPreview{
  width:430px;
  max-width:none;
}







/* -----------------------------------------
   Settings
----------------------------------------- */

.MyNootoSettings .MyNootoEditorMeta button{
  height:42px;
  padding:0 22px;
  border:0;
  border-radius:999px;
  background:#111;
  color:#fff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.MyNootoSettingsGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  background:#fff;
}

.MyNootoSettingsSection{
  padding:34px 38px;
  border-right:1px solid var(--mn-line);
  border-bottom:1px solid var(--mn-line);
}

.MyNootoSettingsSection:nth-child(2n){
  border-right:0;
}

.MyNootoSettingsSection h2{
  margin:0 0 24px;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:#777;
}

.MyNootoSettingsSection p{
  margin:10px 0 0 10px;
  color:var(--mn-muted);
  font-size:.85rem;
}


.MyNootoSettingsSection label{
  display:grid;
  gap:8px;
  margin:0 0 18px;
}

.MyNootoSettingsSection label:last-child{
  margin-bottom:0;
}

.MyNootoSettingsSection label span{
  color:#555;
  font-size:.82rem;
  font-weight:900;
}

.MyNootoSettingsSection input,
.MyNootoSettingsSection select{
  width:100%;
  height:46px;
  padding:0 14px;
  border:1px solid var(--mn-line);
  border-radius:12px;
  background:#fff;
  color:#111;
  font:inherit;
}



.MyNootoSettingsSection input[type="color"]{
  padding:4px;
}

.MyNootoSettingsSection input:focus,
.MyNootoSettingsSection select:focus{
  outline:2px solid rgba(0,0,0,.18);
  outline-offset:2px;
}

.MyNootoSettingsMeta p{
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin:0;
  padding:13px 0;
  border-bottom:1px solid var(--mn-line);
}

.MyNootoSettingsMeta p:last-child{
  border-bottom:0;
}

.MyNootoSettingsMeta strong{
  color:#555;
  font-size:.82rem;
}

.MyNootoSettingsMeta span{
  color:#111;
  font-family:ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size:.82rem;
}



/* -----------------------------------------
   Final override / Select + checkbox
----------------------------------------- */

.MyNootoSettingsSection select{
  appearance:none;
  -webkit-appearance:none;

  padding-right:52px;

  background-color:#fff;

  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230498CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  background-repeat:no-repeat;
  background-position:right 18px center;
  background-size:12px 8px;
}

.MyNootoSettingsSection select::-ms-expand{
  display:none;
}




.MyNootoSettingsSection label.MyNootoCheck{
  display:flex;
  align-items:center;
  gap:10px;
  margin:18px 0 0;
}

.MyNootoSettingsSection label.MyNootoCheck input[type="checkbox"]{
  width:20px;
  height:20px;
  min-width:20px;
  min-height:20px;
  padding:0;
  margin:0;
  border-radius:5px;
  accent-color:var(--mn-brand);

}

.MyNootoSettingsSection label.MyNootoCheck span{
  font-size:.82rem;
  font-weight:900;
  color:#555;
}


/* -----------------------------------------
   Settings media previews
----------------------------------------- */

.MyNootoSettingsSection label.MyNootoMediaField{
  display:flex;
  align-items:flex-end;
  gap:14px;
  margin-bottom:18px;
}

.MyNootoMediaThumb{
  flex:0 0 58px;
  width:58px;
  height:58px;

  display:block;
  overflow:hidden;

  border-radius:13px;
  border:1px solid var(--mn-line);
  background:
    linear-gradient(135deg, #f7f7f7, #ffffff);

  text-decoration:none;
}

.MyNootoMediaThumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.MyNootoMediaThumb.IsEmpty{
  background:
    linear-gradient(135deg, #f3f3f3, #fff);
}

.MyNootoMediaThumb.IsEmpty::after{
  content:'';
  display:block;
  width:100%;
  height:100%;
  background:
    linear-gradient(45deg, transparent 47%, rgba(0,0,0,.18) 48%, rgba(0,0,0,.18) 52%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(0,0,0,.18) 48%, rgba(0,0,0,.18) 52%, transparent 53%);
}

.MyNootoMediaInput{
  flex:1;
  min-width:0;
  display:grid;
  gap:8px;
}

.MyNootoMediaInput input{
  width:100%;
}



.MyNootoSettingsError{
  padding:10px;
  background:#fff0f0;
  color:#b00000;
  border-bottom:1px solid rgba(176,0,0,.15);
  font-weight:900;
  font-size: 80%
}



.MyNootoTopnav a{
  position:relative;
  text-decoration:none;
}

.MyNootoTopnav a::after{
  content:'';
  position:absolute;

  left:0;
  right:0;
  bottom:-8px;

  height:3px;
  border-radius:999px;

  opacity:0;
  transition:.20s ease;
}

.MyNootoTopnav a:hover::after{
  opacity:.25;
  background:currentColor;
}

.MyNootoTopnav a.IsActive{
  font-weight:700;
}

.MyNootoTopnav a.IsActive::after{
  opacity:1;
  background:currentColor;
  height:4px;
}


.MyNootoNotice{
  margin:0 0 18px;
  padding:12px 14px;
  border-radius:12px;
  background:#eef9ff;
  color:#046f94;
  font-weight:800;
  font-size:.9rem;
}





.MyNootoPlanCards{
  display:grid;
  gap:14px;
  margin:20px 0;
}

.MyNootoPlanCard{
  position:relative;
  display:block;
  padding:22px;
  border:1px solid var(--mn-line);
  border-radius:18px;
  background:#fff;
  cursor:pointer;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.MyNootoPlanCard:hover{
  border-color:rgba(0,0,0,.20);
}

.MyNootoPlanCard input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.MyNootoPlanCard::after{
  content:'';
  position:absolute;
  top:18px;
  right:18px;
  width:14px;
  height:14px;
  border-radius:50%;
  border:2px solid rgba(0,0,0,.35);
  background:#fff;
}

.MyNootoPlanCard:has(input:checked){
  border-color:#000;
  box-shadow:0 0 0 2px #000 inset;
}

.MyNootoPlanCard:has(input:checked)::after{
  border-color:#000;
  background:#000;
}

.MyNootoPlanCard strong,
.MyNootoPlanCard span,
.MyNootoPlanCard small{
  display:block;
}

.MyNootoPlanCard strong{
  margin:0 0 6px;
  font-size:1.25rem;
  font-weight:700;
  line-height:1.2;
}

.MyNootoPlanCard span{
  margin:0 0 10px;
  font-size:1rem;
  font-weight:700;
}

.MyNootoPlanCard small{
  color:var(--mn-muted);
  line-height:1.5;
}





/* NootoID */

.MyNootoSlug{
  font-family:JetBrains Mono, monospace;
  font-size:.60rem;
  letter-spacing:.02em;
}

/* Status */

.MyNootoStatus{
  font-weight:400;
  font-size: .70rem;
}

.MyNootoStatus--public{
  background:#198754;color: white;padding: 4px;border-radius: 4px;
}

.MyNootoStatus--private{
  background:#b54747;color: white;padding: 4px;border-radius: 4px;
}

.MyNootoStatus--featured{
  color:#b8860b;
}

/* Actions */

.MyNootoActions a.IsEdit{
  background:#111;
  color:#fff;
  border-color:#111;
}

.MyNootoActions a.IsEdit:hover{
  background:#000;
}










.MyNootoBrandPreview{
  margin-top:28px;
  border-radius:22px;
  padding:18px;
  background:var(--preview-bg, #f7f7f4);
  border:1px solid rgba(0,0,0,.10);
  min-height:190px;
  display:flex;
  align-items:center;
}

.MyNootoBrandPreviewInner{
  width:100%;
  padding:26px;
  border-radius:18px;
  background:rgba(255,255,255,.62);
  color:#111;
  font-family:var(--preview-font, Lato, system-ui, sans-serif);
}

.MyNootoBrandPreviewKicker{
  color:var(--preview-color, #111);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  margin-bottom:10px;
}

.MyNootoBrandPreview h3{
  margin:0 0 10px;
  color:var(--preview-color, #111);
  font-size:1.8rem;
  line-height:1.1;
}

.MyNootoBrandPreview p{
  margin:0 0 16px;
  font-size:.98rem;
  line-height:1.55;
}

.MyNootoBrandPreview span{
  display:inline-block;
  color:var(--preview-color, #111);
  font-weight:800;
  border-bottom:2px solid var(--preview-color, #111);
}