/* MIANU glass: the look shared by the apps on their own hosts (Notes, Content, sign-in).
   Light greens, frosted panels over a garden backdrop, and a little technology in the details. */
:root {
  color-scheme: light;
  --bg: #eef8f2; --ink: #0b2a1d; --ink-2: #3f6553; --dim: #6b8b7b;
  --emerald: #0f9d63; --deep: #0b6b45; --lime: #b6ef72; --mint: #5ff0b4; --sprout: #7fd88f; --danger: #c2412d;
  --line: rgb(15 110 70 / .12); --line-2: rgb(15 110 70 / .22);
  --glass: linear-gradient(140deg, rgb(255 255 255 / .66), rgb(255 255 255 / .36));
  --glass-strong: linear-gradient(140deg, rgb(255 255 255 / .86), rgb(255 255 255 / .62));
  --glass-edge: rgb(255 255 255 / .75);
  --blur: blur(22px) saturate(1.7);
  --shadow: inset 0 1px 0 rgb(255 255 255 / .85), 0 26px 50px -30px rgb(11 70 45 / .38), 0 2px 8px -3px rgb(11 70 45 / .1);
  --radius: 22px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", Charter, Georgia, serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
}
* { box-sizing: border-box; }
html { height: 100%; }
/* flow-root: the bar's top margin stays inside the page instead of pushing it a few pixels past the screen. */
body { margin: 0; min-height: 100%; display: flow-root; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ico { display: inline-block; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- The garden behind the glass ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(60% 50% at 75% 20%, rgb(255 255 255 / .9), transparent 70%), linear-gradient(180deg, #f7fcf9 0%, #eaf7ef 55%, #d7f0e0 100%); }
.backdrop::before { content: ''; position: absolute; inset: -20%; filter: blur(60px); opacity: .9;
  background:
    radial-gradient(28% 32% at 18% 22%, rgb(95 240 180 / .45), transparent 70%),
    radial-gradient(24% 30% at 82% 70%, rgb(182 239 114 / .42), transparent 70%),
    radial-gradient(26% 30% at 60% 30%, rgb(64 200 160 / .25), transparent 70%),
    radial-gradient(22% 26% at 30% 80%, rgb(127 216 143 / .35), transparent 70%);
  animation: drift 30s ease-in-out infinite alternate; }
.backdrop::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34vh; opacity: .85;
  background:
    radial-gradient(rgb(15 130 85 / .14) 1px, transparent 1.5px) 0 0 / 28px 28px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath d='M0 210C240 150 480 245 720 205S1200 150 1440 195V320H0Z' fill='%23c9ebd5'/%3E%3Cpath d='M0 250C300 210 520 285 820 245S1280 230 1440 250V320H0Z' fill='%23a2d8b5'/%3E%3Cpath d='M0 285C260 265 560 305 860 283S1300 270 1440 288V320H0Z' fill='%2377c393'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%); mask-image: linear-gradient(180deg, transparent, #000 35%); }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.06); } }

/* ---------- Glass ---------- */
.glass { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.glass--strong { background: var(--glass-strong); }

/* ---------- The bar across the top ---------- */
.topbar { position: sticky; top: 12px; z-index: 20; display: flex; align-items: center; gap: 14px; margin: 12px; padding: 8px 10px 8px 16px; border-radius: 18px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand__mark { width: 24px; height: 24px; color: var(--deep); flex: none; }
.brand b { font-weight: 760; font-size: 14px; letter-spacing: .32em; margin-right: -.32em; }
.brand span { padding-left: 11px; margin-left: 4px; border-left: 1px solid var(--line-2); font-weight: 600; font-size: 14px; color: var(--deep); white-space: nowrap; }
.topbar__space { flex: 1; }
.topbar__tools { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons, fields, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: 99px;
  background: rgb(255 255 255 / .6); color: var(--ink); font: 550 14px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: #fff; border-color: rgb(15 157 99 / .4); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn--primary { border-color: transparent; background: linear-gradient(100deg, var(--lime), var(--mint)); color: #05301c; font-weight: 650; box-shadow: 0 8px 22px -10px rgb(47 191 127 / .75), inset 0 1px 0 rgb(255 255 255 / .6); }
.btn--primary:hover { background: linear-gradient(100deg, #c6f58b, #7ff5c4); border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { border-color: rgb(194 65 45 / .45); background: #fff5f2; }
.btn--icon { width: 38px; padding: 0; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn--sm.btn--icon { width: 30px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: rgb(255 255 255 / .7); color: var(--ink); font: 400 15px/1 var(--sans); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.input:focus { border-color: var(--emerald); background: #fff; box-shadow: 0 0 0 4px rgb(95 240 180 / .3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: rgb(255 255 255 / .55); font: 600 11.5px/1.2 var(--mono); color: var(--ink-2); letter-spacing: .02em; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 6px rgb(15 157 99 / .6); }
.chip--private i { background: #b9a37a; box-shadow: none; }
.muted { color: var(--dim); }
.mono { font-family: var(--mono); }

/* ---------- Messages and dialogs ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 550; pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tone="error"] { color: var(--danger); }
dialog.dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--glass-edge); border-radius: var(--radius); color: var(--ink);
  background: var(--glass-strong); box-shadow: var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
dialog.dialog::backdrop { background: rgb(11 42 29 / .18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog h2 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.01em; }
.dialog p { margin: 0 0 18px; color: var(--ink-2); }
.dialog__row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------- The sign-in page ---------- */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.signin__card { width: min(400px, 100%); display: grid; gap: 16px; padding: 30px 28px; }
.signin__card .brand { margin-bottom: 6px; }
.signin__card h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; }
.signin__card p { margin: 0; color: var(--ink-2); }
.signin__keep { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.signin__keep input { width: 16px; height: 16px; accent-color: var(--emerald); }
.signin__error { margin: 0; color: var(--danger); font-size: 14px; }
.signin__back { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.signin__back:hover { color: var(--emerald); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
