:root { --bee: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAA/1BMVEUAAAAtLS73lxz9/eExMTH2hhr0dxfIybE7Ozv4+N1VVVXS07osLC4qKiotLS4tLS4sLC0tLS5JOSwtLS7n6M9sSCiNVyQeJjAeHiJXV1JVQi1HR0R3eG24uKXa2sOnp5e2dCKGhnrPaBvThCCTYyWWl4ipaCJiYlvvbhbFfCF5VChpamLYeR0wMDCkWCCMjIGwWx7dhx6wsZ0fHx+HTSO2YR4AAFX/oxsZGR0cHDhgPyl/f3+foI/f4MYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtZt8eAAAAQHRSTlMA/v///v///wb/A/9PEq7RL4//bv////////////////////////////////8w//////8I//8D//8J/wL//wAA4ycXgAAAEDZJREFUeNrtXQl32roSRkYGGzA2BkzCnhBIQ5Lmtml73/r//9aTZK22Ftss7TuHueeeBmLIfJp9NJZbrRvd6EY3utGNbnSjG93oRjc6A/WCnngRBP9n3FN+gyhJ3qOoJ79XhBkYMP/OtSfsDsbDGOQUD0eDhP9G4pfBDJL3IIpaZpzXXvxkHAOIiALAP4N4lCjcEzARhinjjEowr7/60XgIBO9AgADDAeMuIMyPSjDRNePkd7Ov455xOEyoQSPuAdRdiDEkv0sKvdY/EfvAQhCMsJIkoxhCy0XD5Dct/yC2sk+4iwfYQBwXYZy9qxtvNFSWVWgINLxvxZlc3R8N5HWlTMLcSO+AzTDIJRAWYIJrIxjL7OP/7x823ckknEzWq/0zBAbPhNDd0Vd39JOMBtdEEAyhwv79Zt2WabK5BwXNz18tXh82qy6i1ebjdYFASDivhqDXioT14rVedjHTYRi26b/4h1UJwmK5WocyzLD7sZAvGlzHkov8L/HiK4zR13sFwbIbMniM8MvNQrroKu70l8Q/BHf3XcxUu0zovbVgDoIHzXX4jfCB44RxdA0EMv9gb2A/hzC5l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4MUNJsxMEc0ebT1qOtYTc0pzbHKKOmL/PE5EKcNneUGjsIEO9xuda7UhKCCGasinEsnUZ/p5MhAvocDgtl06rBjv1ZKqiKYgwscYNtT7qKpEI8qb9gXkiLvLRVXJ+c9e3Tg4MNcXaVVJEAQyPcjnvv83UC9FUhDbyYEhyoiQAi+yZso5z86tecSgrk+TEE1GaRiD+UiR1D3is8OsadlNUWg3IBwoSO0XU9vOZoQpKAeXezoXSwE2/NzMgOCbc2bO8aXO0UeH7QxMrNjQjCvs/wXfqII+m58eGw9BLsa/A8v/lSang3C1Pd0CI4zWHH5R9d4vBSGYFIkmL3ljGtrdBf/tY/TPRGCnq10Os0O27c3CcDf20rLP46u90gg8kAy68OuICSzO8djhglW0J5rLb+0pWkWQ6H/M3OyP3y//lP6etapHSEJ5y1lOfu/5dlwAkODmykZwPjayqOfeAFNMJAHEAa/+fmIOYbeO348ZR1JQMZ96w94mmg+LfKZjPGh706dz3EOx0nE4P8RRO/hD/Ax+zG/I7Rsz/jQ39E4CVp/FPcMBNOGIBmMRwgIfxooIvRiOBoP3hN2FNiv1p9JyqF9QRCRR08EURQYLvlDqYeY7lV680Y3utGNbnSjG93oRje60Y1q0P8AAj1OXAnYLjgAAAAASUVORK5CYII="); }

:root {
  --safe-top: max(env(safe-area-inset-top, 0px), var(--cut-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--cut-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left, 0px), var(--cut-left, 0px));
  --safe-right: max(env(safe-area-inset-right, 0px), var(--cut-right, 0px));
  color-scheme: light dark;
  --bg: #FBF4E4;
  --raised: #FFFCF4;
  --ink: #2B2620;
  --muted: #7A6F5E;
  --accent: #D9922A;
  --line: #E6DAC1;
  --shade: rgba(43, 38, 32, .07);
  --danger: #B33B1E;
  --fold: rgba(71, 53, 20, .16);
  --shadow-1: 0 1px 2px rgba(71, 53, 20, .12);
  --shadow-2: 0 4px 12px rgba(71, 53, 20, .16);
  --shadow-3: 0 12px 32px rgba(50, 37, 14, .26);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --pixels: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23C98A12' stroke-opacity='0.13' stroke-width='1.6'%3E%3Cpath d='M28 1L41 8.5v15L28 31 15 23.5v-15z'/%3E%3Cpath d='M28 49L41 56.5v15L28 79 15 71.5v-15z'/%3E%3Cpath d='M0 25l13 7.5v15L0 55zM56 25l-13 7.5v15L56 55z'/%3E%3Cpath d='M0 73l13 7.5v15L0 96zM56 73l-13 7.5v15L56 96z'/%3E%3C/g%3E%3C/svg%3E");
  --grid-x: repeating-linear-gradient(to right, rgba(28, 29, 31, .045) 0 1px, transparent 1px 24px);
  --grid-y: repeating-linear-gradient(to bottom, rgba(28, 29, 31, .045) 0 1px, transparent 1px 24px);

  --t1: #F7DE8B;
  --t2: #EFC163;
  --t3: #E3D9C2;
  --t4: #EFAE84;
  --t5: #CBD7A7;
  --t6: #17140E;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140E;
    --raised: #221E16;
    --ink: #F1EADC;
    --muted: #A99C86;
    --accent: #F0B840;
    --line: #3A3329;
    --shade: rgba(241, 234, 220, .08);
    --danger: #F0907A;
    --fold: rgba(0, 0, 0, .34);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, .55);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, .65);

    --pixels: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23F0B840' stroke-opacity='0.13' stroke-width='1.6'%3E%3Cpath d='M28 1L41 8.5v15L28 31 15 23.5v-15z'/%3E%3Cpath d='M28 49L41 56.5v15L28 79 15 71.5v-15z'/%3E%3Cpath d='M0 25l13 7.5v15L0 55zM56 25l-13 7.5v15L56 55z'/%3E%3Cpath d='M0 73l13 7.5v15L0 96zM56 73l-13 7.5v15L56 96z'/%3E%3C/g%3E%3C/svg%3E");
    --grid-x: repeating-linear-gradient(to right, rgba(236, 237, 239, .04) 0 1px, transparent 1px 24px);
    --grid-y: repeating-linear-gradient(to bottom, rgba(236, 237, 239, .04) 0 1px, transparent 1px 24px);

    --t1: #F7DE8B;
    --t2: #EFC163;
    --t3: #E3D9C2;
    --t4: #EFAE84;
    --t5: #CBD7A7;
    --t6: #0C0A06;
  }
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

html { scrollbar-gutter: stable; overflow-x: hidden; overscroll-behavior-y: contain; }
body { overflow-x: hidden; overscroll-behavior-y: contain; }

img, svg, .note { -webkit-user-drag: none; }

html, body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: var(--pixels);
  background-size: 112px 192px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  image-rendering: pixelated;
}

body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#ed-text, #ed-title, .ed-view, .list-row input,
#lg-user, #lg-pass, #set-name, #set-cur, #set-new, #set-rep,
#new-user, #dlg-input, #dlg-input2 {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

body.is-dragging { overflow: hidden; touch-action: none; }

button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }

.login-card {
  width: min(380px, 100%);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  padding: 34px 30px 30px;
}

.logo {
  display: block;
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  background-image: var(--bee);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.wordmark { margin: 0; font-size: 31px; font-weight: 700; letter-spacing: -.035em; }
.login-sub { margin: 6px 0 28px; color: var(--muted); font-size: 14px; }

.login-card label, .dialog label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.login-card input, .dialog input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.login-card input:focus, .dialog input:focus { border-color: var(--accent); outline: none; }

.primary {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  cursor: pointer;
}

.primary.small { width: auto; padding: 8px 20px; font-size: 14px; border-radius: 999px; }
.primary:hover { filter: brightness(1.05); }

.err { margin: 6px 0 12px; color: var(--danger); font-size: 14px; }

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  padding-top: calc(6px + var(--safe-top));
  padding-left: calc(12px + var(--safe-left));
  padding-right: calc(12px + var(--safe-right));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.mark { flex: 0 0 auto; width: 28px; height: 28px; padding: 0; background: none; border: 0; cursor: pointer; }
.mark-img {
  display: block;
  width: 28px;
  height: 28px;
  background-image: var(--bee);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.mark { width: 30px; height: 30px; display: grid; place-items: center; }
.mark:hover .mark-img { transform: rotate(-8deg) scale(1.06); }
.mark-img { transition: transform .2s cubic-bezier(.34, 1.4, .64, 1); }

.field {
  position: relative;
  justify-self: center;
  width: min(340px, 100%);
  display: flex;
  align-items: center;
}

.bar-actions { display: flex; align-items: center; gap: 4px; justify-self: end; }

.field-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  pointer-events: none;
}

.search {
  width: 100%;
  padding: 7px 14px 7px 32px;
  font-size: 14px;
  background: var(--shade);
  border: 1px solid transparent;
  border-radius: 999px;
  -webkit-appearance: none;
}

.search:focus { background: var(--raised); border-color: var(--line); outline: none; }

.icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
}

.icon:hover { background: var(--shade); color: var(--ink); }
.icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.icon[aria-pressed="true"] { color: var(--accent); }
.icon.danger { color: var(--danger); }

#menu-btn { margin-left: auto; }

.menu {
  position: absolute;
  right: 12px;
  top: calc(100% + 6px);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  min-width: 212px;
  box-shadow: var(--shadow-3);
}

.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14.5px;
}

.menu button svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; flex: 0 0 auto; }
.menu button:hover { background: var(--shade); }
.menu button:hover svg { stroke: var(--ink); }

.view-label {
  max-width: 1280px;
  margin: 16px auto -6px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.notes {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 14px 96px;
  padding-left: calc(14px + var(--safe-left));
  padding-right: calc(14px + var(--safe-right));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 560px) { .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 820px) { .notes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .notes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.notes.blurred .note-body { filter: blur(7px); user-select: none; }

.note {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 11px 12px 24px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow .1s ease, transform .15s ease;
}

.note:hover, .note:focus-visible { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.note.dragging { opacity: .35; }

.note.ghost {
  position: fixed;
  z-index: 40;
  margin: 0;
  pointer-events: none;
  box-shadow: var(--shadow-3);
  opacity: .95;
  rotate: -2deg;
}

.note::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, transparent 50%, var(--fold) 50%);
}

.note.bg1 { background: var(--t1); border-color: transparent; }
.note.bg2 { background: var(--t2); border-color: transparent; }
.note.bg3 { background: var(--t3); border-color: transparent; }
.note.bg4 { background: var(--t4); border-color: transparent; }
.note.bg5 { background: var(--t5); border-color: transparent; }
.note.bg6 { background: var(--t6); border-color: transparent; }

.note.bg1, .note.bg2, .note.bg3, .note.bg4, .note.bg5 { color: #1C1D1F; }
.note.bg1 .when, .note.bg2 .when, .note.bg3 .when,
.note.bg4 .when, .note.bg5 .when { color: rgba(28, 29, 31, .6); }
.note.bg1 .code, .note.bg2 .code, .note.bg3 .code,
.note.bg4 .code, .note.bg5 .code { background: rgba(0, 0, 0, .07); }

.note-body {
  max-height: 100%;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.42;
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

.note-title {
  margin: 0 0 5px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.note-body p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-body .copy { display: none; }

.note .when {
  position: absolute;
  left: 12px;
  bottom: 9px;
  color: var(--muted);
  font-size: 11.5px;
}

.note .bell {
  position: absolute;
  right: 26px;
  bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  background: var(--shade);
}

.note .bell.past { color: var(--danger); }

.note .pin {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.code-wrap { position: relative; margin: 6px 0; }
.code-wrap .code { margin: 0; }

.code {
  position: relative;
  padding: 10px 12px;
  background: var(--shade);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
}

.copy {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 12px;
  font-family: var(--sans);
  color: var(--muted);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.copy:hover { color: var(--ink); }

.empty { text-align: center; color: var(--muted); font-size: 15px; padding: 60px 24px; }

.status {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  color: var(--ink);
  background: var(--raised);
  border: 1px solid var(--line);
  font-size: 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-3);
  pointer-events: none;
  max-width: calc(100% - 32px);
  padding: 0;
  opacity: 0;
  z-index: 80;
  bottom: calc(24px + var(--safe-bottom));
}

.status:not(:empty) { padding: 10px 20px; opacity: 1; }

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + var(--safe-bottom));
  width: 62px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #2B2620;
  border: 0;
  border-radius: 0;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  filter: drop-shadow(0 8px 18px rgba(50, 37, 14, .34));
  box-shadow: none;
  cursor: pointer;
  z-index: 10;
  transition: transform .12s cubic-bezier(.34, 1.4, .64, 1), filter .12s ease;
}

.fab::before { display: none; }

.fab svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
}

.fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
}

.fab:hover svg { transform: rotate(90deg) scale(1.08); }
.fab:active { transform: scale(.92); }
.fab:active::before { animation: ripple .5s ease-out; }

@keyframes ripple {
  from { opacity: .7; transform: scale(1); }
  to { opacity: 0; transform: scale(1.7); }
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(20, 21, 23, .5);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: end center;
}

@media (min-width: 600px) { .sheet { place-items: center; } }

.sheet-inner {
  width: min(1040px, 94vw);
  max-height: 88dvh;
  height: 88dvh;
  display: flex;
  flex-direction: column;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-3);
  padding: 8px 16px calc(14px + var(--safe-bottom));
}

@media (min-width: 600px) { .sheet-inner { border-radius: 18px; } }

.sheet-inner.bg1 { background: var(--t1); }
.sheet-inner.bg2 { background: var(--t2); }
.sheet-inner.bg3 { background: var(--t3); }
.sheet-inner.bg4 { background: var(--t4); }
.sheet-inner.bg5 { background: var(--t5); }
.sheet-inner.bg6 { background: var(--t6); }

.sheet-inner.bg1, .sheet-inner.bg2, .sheet-inner.bg3,
.sheet-inner.bg4, .sheet-inner.bg5 { color: #1C1D1F; }
.sheet-inner.bg1 .icon, .sheet-inner.bg2 .icon, .sheet-inner.bg3 .icon,
.sheet-inner.bg4 .icon, .sheet-inner.bg5 .icon { color: rgba(28, 29, 31, .62); }
.sheet-inner.bg1 .when, .sheet-inner.bg2 .when, .sheet-inner.bg3 .when,
.sheet-inner.bg4 .when, .sheet-inner.bg5 .when { color: rgba(28, 29, 31, .55); }

.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.when { color: var(--muted); font-size: 12.5px; }

.ed-title {
  width: 100%;
  padding: 6px 6px 4px;
  background: none;
  border: 0;
  outline: none;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
}

#ed-text {
  flex: 1;
  min-height: 34dvh;
  padding: 6px 6px 10px;
  background: none;
  border: 0;
  resize: none;
  outline: none;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.55;
}

.remind-row { display: flex; gap: 8px; align-items: center; padding: 4px 2px 6px; }

.remind-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  background: var(--shade);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.palette { display: flex; gap: 10px; padding: 8px 2px; overflow-x: auto; justify-content: center; }

.swatch {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
}

.swatch[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--raised), 0 0 0 2px var(--accent); }
.swatch.s0 { background: var(--raised); }
.swatch.s1 { background: var(--t1); }
.swatch.s2 { background: var(--t2); }
.swatch.s3 { background: var(--t3); }
.swatch.s4 { background: var(--t4); }
.swatch.s5 { background: var(--t5); }
.swatch.s6 { background: var(--t6); }

.sheet-tools { display: flex; gap: 6px; align-items: center; justify-content: center; padding-top: 2px; flex-wrap: wrap; }

.dialog {
  width: min(400px, calc(100% - 32px));
  align-self: center;
  margin-bottom: 12vh;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
  padding: 24px 24px 16px;
  max-height: 90dvh;
  overflow-y: auto;
}

@media (min-width: 600px) { .dialog { margin-bottom: 0; } }

.dialog p { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.dlg-title { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.dialog .chip { padding: 9px 18px; border-radius: 10px; }
.dialog-tools { padding-top: 2px; }
.dlg-title { margin: 0 0 4px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.dlg-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.dialog-tools { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.chip {
  padding: 8px 18px;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.chip:hover { color: var(--ink); background: var(--shade); }
.chip.solid { background: var(--accent); color: #FFFFFF; border-color: transparent; }

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

.group-hint { margin: 8px 2px 0; color: var(--muted); font-size: 12.5px; }

.sheet-bar-left { display: flex; gap: 2px; }

.icon.save { color: var(--accent); }
.icon.save:disabled { opacity: .35; cursor: not-allowed; }

.sheet-inner.locked .ed-title, .sheet-inner.locked #ed-text { opacity: .72; }

.note .marks { position: absolute; top: 8px; right: 24px; font-size: 12px; opacity: .8; }

.notes.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .notes.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 820px) { .notes.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .notes.compact { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.row > span { flex: 1 1 auto; min-width: 0; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  font-size: 14.5px;
  cursor: pointer;
}

.row + .row { border-top: 1px solid var(--line); }

.toggle {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background .12s ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--raised);
  box-shadow: var(--shadow-1);
  transition: transform .13s cubic-bezier(.34, 1.4, .64, 1);
}

.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(18px); }

.users { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex-wrap: wrap;
}

.user strong { display: block; font-size: 14.5px; font-weight: 600; }
.user span { display: block; color: var(--muted); font-size: 12.5px; }
.user-tools { display: flex; gap: 6px; }
.chip.danger { color: var(--danger); border-color: var(--line); }

.row-add { display: flex; gap: 8px; }
.row-add input { flex: 1; margin-bottom: 0; }

body.no-scroll { overflow: hidden; }
body.is-dragging, body.no-scroll { padding-right: 0; }
.sheet { overscroll-behavior: contain; }
#ed-text, .ed-view, .ed-list { overscroll-behavior: contain; }

#dlg-input, #dlg-input2 {
  width: 100%;
  padding: 12px 14px;
  margin: 0 0 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font-size: 15px;
}

#dlg-input:focus, #dlg-input2:focus { border-color: var(--accent); }
#dlg-err { margin: -6px 0 14px; }

@media (max-width: 599px) {
  .sheet-inner {
    height: var(--vvh, 100dvh);
    max-height: var(--vvh, 100dvh);
    border-radius: 0;
    padding: 6px 12px calc(10px + var(--safe-bottom));
    padding-top: calc(6px + var(--safe-top));
  }
  #ed-text { min-height: 0; }
  .palette { padding: 6px 2px; }
  .sheet-tools { gap: 2px; }
  .icon { width: 34px; height: 34px; }
}

.note.bg6, .note.bg6 .note-title, .note.bg6 .when, .sheet-inner.bg6, .sheet-inner.bg6 .when { color: #F2F3F4; }
.note.bg6 .code, .sheet-inner.bg6 .code { background: rgba(255, 255, 255, .10); }
.note.bg6::after { background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .16) 50%); }
.note.bg6 .bell { color: #C8CBD0; border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); }
.sheet-inner.bg6 .ed-title::placeholder, .sheet-inner.bg6 #ed-text::placeholder { color: rgba(242, 243, 244, .5); }
.sheet-inner.bg6 .icon { color: #C8CBD0; }
.sheet-inner.bg6 .chip { color: #C8CBD0; border-color: rgba(255, 255, 255, .2); }
.swatch.s6 { background: var(--t6); }

.badge {
  margin-left: 7px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  vertical-align: 1px;
}

.tool-lights { display: none !important; }
.sheet-inner.focus .tool-write { color: var(--muted); }
.sheet-inner.focus .tool-write:hover { color: var(--ink); }

.sheet-inner.focus {
  width: min(1400px, 97vw);
  height: 96dvh;
  max-height: 96dvh;
  padding: 26px 30px 12px;
}

.sheet-inner.focus.hide-cursor { cursor: none; }
.sheet-inner.focus .sheet-bar,
.sheet-inner.focus .palette,
.sheet-inner.focus .tool-main { display: none !important; }
.sheet-inner.focus .tool-lights { display: grid !important; }

.sheet-inner.focus .ed-title,
.sheet-inner.focus #ed-text {
  width: min(96ch, 100%);
  margin: 0 auto;
}

.sheet-inner.focus .ed-title { font-size: 26px; padding-bottom: 10px; }
.sheet-inner.focus #ed-text { font-size: 17.5px; line-height: 1.75; flex: 1; }

.sheet.lights-off { background: rgba(0, 0, 0, .93); backdrop-filter: none; }

.sheet.lights-off .sheet-inner {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.sheet.lights-off .ed-title,
.sheet.lights-off #ed-text { color: #E9EAEC; }

.sheet.lights-off .ed-title::placeholder,
.sheet.lights-off #ed-text::placeholder { color: rgba(233, 234, 236, .35); }

.sheet.lights-off .icon { color: rgba(233, 234, 236, .55); }
.sheet.lights-off .icon:hover { color: #E9EAEC; background: rgba(255, 255, 255, .08); }

@media (max-width: 599px) {
  .sheet-inner.focus { width: 100%; height: 100dvh; max-height: 100dvh; padding: 14px 16px 8px; }
  .sheet-inner.focus .ed-title { font-size: 21px; }
}

.md-h { margin: 0 0 5px; font-weight: 700; letter-spacing: -.01em; }
.md-h1 { font-size: 16px; }
.md-h2 { font-size: 14.5px; }
.md-h3 { font-size: 13.5px; }
.note-body ul { margin: 0 0 6px; padding-left: 18px; }
.note-body li { margin: 0 0 2px; overflow-wrap: anywhere; }
.note-body code {
  padding: 1px 5px;
  background: var(--shade);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: .92em;
}
.note-body .big { font-size: 1.35em; font-weight: 600; }
.note-body del { opacity: .6; }
.note.bg6 .note-body code { background: rgba(255, 255, 255, .14); }

.login { position: relative; overflow: hidden; }

.login::before,
.login::after {
  content: "";
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 46%;
  filter: blur(60px);
  opacity: .5;
  z-index: 0;
}

.login::before {
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 65%);
  top: -16vmax;
  left: -12vmax;
  animation: driftA 26s ease-in-out infinite alternate;
}

.login::after {
  background: radial-gradient(circle at 70% 60%, #D9922A, transparent 62%);
  bottom: -18vmax;
  right: -14vmax;
  animation: driftB 32s ease-in-out infinite alternate;
}

@keyframes driftA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(14vmax, 10vmax) scale(1.18); }
}

@keyframes driftB {
  from { transform: translate(0, 0) scale(1.1); }
  to { transform: translate(-12vmax, -9vmax) scale(.92); }
}

.login-card { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .login::before, .login::after { animation: none; }
}

.avatar-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.avatar-btn.big { width: 62px; height: 62px; }

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line);
}

.avatar-btn.big .avatar { font-size: 24px; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }

.who-sub { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }

.fab-wrap { position: fixed; right: calc(20px + var(--safe-right)); bottom: calc(52px + var(--safe-bottom)); z-index: 10; }
.fab-wrap .fab { position: static; }

.ed-view {
  flex: 1;
  min-width: 0;
  min-height: 34dvh;
  padding: 8px 6px;
  overflow-y: auto;
  cursor: text;
  font-size: 16px;
  line-height: 1.6;
}

.ed-view p { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ed-view ul { margin: 0 0 10px; padding-left: 20px; }
.ed-view .md-h1 { font-size: 21px; }
.ed-view .md-h2 { font-size: 18px; }
.ed-view .md-h3 { font-size: 16px; }
.ed-view .md-h { margin: 2px 0 8px; }
.ed-view code { padding: 2px 6px; background: var(--shade); border-radius: 5px; font-family: var(--mono); font-size: .92em; }
.ed-view .big { font-size: 1.4em; font-weight: 600; }
.ghost-text { color: var(--muted); font-style: italic; }

.c-red { color: #D93A2B; }
.c-amber { color: #B0700B; }
.c-green { color: #1E8A4C; }
.c-blue { color: #1A62D6; }
.c-violet { color: #7A45C9; }

@media (prefers-color-scheme: dark) {
  .c-red { color: #FF8A7A; }
  .c-amber { color: #F0B95B; }
  .c-green { color: #6FD98F; }
  .c-blue { color: #7FB0FF; }
  .c-violet { color: #C39BFF; }
}

.colour-pop {
  position: absolute;
  bottom: 52px;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-3);
}

.cdot { width: 22px; height: 22px; border: 0; border-radius: 50%; cursor: pointer; }
.cdot.c-red { background: #D93A2B; }
.cdot.c-amber { background: #D39400; }
.cdot.c-green { background: #1E8A4C; }
.cdot.c-blue { background: #1A62D6; }
.cdot.c-violet { background: #7A45C9; }

.ed-list { flex: 1; min-height: 30dvh; overflow-y: auto; padding: 6px 2px; }

.list-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }

.list-row input {
  flex: 1;
  min-width: 0;
  padding: 7px 2px;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: none;
  font-size: 15.5px;
}

.list-row input:focus { border-bottom-color: var(--line); }
.list-row.done input { text-decoration: line-through; opacity: .55; }

.tick, .check-row { background: none; border: 0; padding: 0; cursor: pointer; }
.check { width: 21px; height: 21px; flex: 0 0 auto; }
.check rect { fill: none; stroke: var(--muted); stroke-width: 1.7; }
.check path { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tick:hover .check rect { stroke: var(--accent); }

.row-x {
  width: 26px;
  height: 26px;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.row-x:hover { background: var(--shade); color: var(--danger); }
.additem { align-self: flex-start; margin: 2px 0 6px; }

.checklist { display: flex; flex-direction: column; gap: 3px; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  font-size: inherit;
  color: inherit;
  width: 100%;
}

.check-row span { overflow-wrap: anywhere; }
.check-row.done span { text-decoration: line-through; opacity: .55; }

.ed-view .checklist { gap: 6px; font-size: 16px; }
.ed-view .check { width: 23px; height: 23px; }

.sheet-inner.reading .tool-md { display: none !important; }
.sheet.lights-off .ed-view { color: #E9EAEC; }

.drawer { position: fixed; inset: 0; z-index: 25; }

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 18, .5);
  opacity: 0;
  transition: opacity .15s ease;
}

.drawer.open .drawer-scrim { opacity: 1; }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(296px, 82vw);
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: color-mix(in srgb, var(--bg) 88%, transparent);
  background-image: var(--pixels);
  background-size: 112px 192px;
  backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  transform: translateX(102%);
  transition: transform .17s cubic-bezier(.32, .72, .35, 1);
  padding: 0 0 calc(24px + var(--safe-bottom));
  padding-top: var(--safe-top);
}

.drawer.open .drawer-panel { transform: translateX(0); }

.drawer-top { display: flex; justify-content: flex-start; padding: 6px 8px 0; background: color-mix(in srgb, var(--accent) 9%, var(--raised)); }

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-profile .who { display: flex; flex-direction: column; min-width: 0; }

.drawer-profile strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.avatar-btn.big { width: 44px; height: 44px; }
.avatar-btn.big .avatar { font-size: 17px; }

.rows { display: flex; flex-direction: column; padding: 4px 10px; }

.rows-label {
  margin: 12px 0 0;
  padding: 0 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.nav-row:hover { background: var(--shade); }
.nav-row[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav-row[aria-pressed="true"] .nav-label { color: var(--accent); font-weight: 600; }
.nav-label { flex: 1 1 auto; min-width: 0; }

.ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.ico svg { width: 19px; height: 19px; fill: none; stroke-width: 1.7; stroke: var(--muted); }
.nav-row:hover .ico svg { stroke: var(--ink); }
.nav-row[aria-pressed="true"] .ico svg { stroke: var(--accent); }

@media (prefers-color-scheme: dark) {
          }

.chev { width: 15px; height: 15px; flex: 0 0 auto; stroke: var(--muted); fill: none; }

.pane { padding: 6px 12px 14px; }
.pane input {
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pane input:focus { border-color: var(--accent); outline: none; }
.pane .row-add input { margin-bottom: 0; }

.row-add.pad { padding: 8px 22px 4px; }
.users { padding: 4px 12px; }

.nav-row input.toggle {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background .12s ease;
}

.nav-row input.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--raised);
  box-shadow: var(--shadow-1);
  transition: transform .13s cubic-bezier(.34, 1.4, .64, 1);
}

.nav-row input.toggle:checked { background: var(--accent); }
.nav-row input.toggle:checked::after { transform: translateX(18px); }

.drawer .user { background: var(--bg); }
.drawer .primary { margin-top: 4px; }

@media (max-width: 599px) {
  .sheet-inner { height: 100dvh; max-height: 100dvh; }
}

.new-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 14px 2px;
}

.new-user-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

.new-user-row input:focus { border-color: var(--accent); }
.new-user-row .chip { padding: 9px 16px; font-size: 13.5px; border-radius: 10px; }

.drawer .user {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 8px;
}

.drawer .user:last-child { border-bottom: 0; }
.drawer .user strong { font-size: 14px; }
.drawer .user span { font-size: 12px; }
.drawer .user-tools .chip { padding: 5px 11px; font-size: 12.5px; }

.note.selectable { cursor: pointer; }
.note.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.note.selected::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  pointer-events: none;
}

.selbar {
  position: fixed;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 7px 16px;
  background: color-mix(in srgb, var(--raised) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-3);
  max-width: calc(100% - 28px);
}

.sel-count { color: var(--muted); font-size: 13.5px; margin-right: 6px; white-space: nowrap; }

.selbtn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--shade);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.selbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.selbtn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.selbtn.danger { color: var(--danger); }
.selbtn.ghost { padding: 7px; background: none; color: var(--muted); }
.selbtn.ghost:hover { background: var(--shade); color: var(--ink); }

.tool-full { display: none; }
@media (max-width: 599px) { .tool-full { display: grid; } }

.sheet-inner.locked .tool-md,
.sheet-inner.locked #ed-bell,
.sheet-inner.locked #ed-archive,
.sheet-inner.locked #ed-save,
.sheet-inner.locked .palette,
.sheet-inner.locked .remind-row { display: none !important; }

.sheet.fullscreen { background: var(--bg); }
.sheet.fullscreen .sheet-inner {
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: calc(8px + var(--safe-top)) 18px calc(10px + var(--safe-bottom));
}

.sheet.fullscreen .ed-view { font-size: 17px; line-height: 1.7; }

.fmtbar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  margin: 0 -4px 4px;
  overflow-x: auto;
  background: color-mix(in srgb, var(--raised) 94%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-2);
}

.fmtbtn {
  flex: 0 0 auto;
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  font-size: 14px;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.fmtbtn:active { background: var(--shade); }
.fmtbtn sup { font-size: 9px; }
.fmt-sep { flex: 0 0 auto; width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.fmtdot { flex: 0 0 auto; width: 20px; height: 20px; border: 0; border-radius: 50%; cursor: pointer; }
.c-bg-red { background: #D93A2B; }
.c-bg-amber { background: #D39400; }
.c-bg-green { background: #1E8A4C; }
.c-bg-blue { background: #1A62D6; }
.c-bg-violet { background: #7A45C9; }

.ed-view mark {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.dialog {
  background-color: color-mix(in srgb, var(--raised) 94%, transparent);
  background-image:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    var(--pixels);
  background-size: auto, 56px 96px;
  backdrop-filter: blur(16px);
}

.lock-btn svg .shackle { transition: transform .26s cubic-bezier(.34, 1.5, .64, 1); transform-origin: 12px 11px; }
.lock-btn svg .keyhole { fill: none; stroke: none; transition: fill .2s ease; }
.lock-btn[aria-pressed="true"] { color: var(--accent); }
.lock-btn[aria-pressed="true"] svg .shackle { transform: translateY(2px) scaleX(.82); }
.lock-btn[aria-pressed="true"] svg .keyhole { fill: currentColor; }
.lock-btn[aria-pressed="false"] svg .shackle { transform: translate(3px, -2px) rotate(14deg); }
.lock-btn.bump svg { animation: lockbump .34s ease; }

@keyframes lockbump {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.drawer-profile {
  position: relative;
  background-color: color-mix(in srgb, var(--accent) 9%, var(--raised));
  background-image: var(--pixels);
  background-size: 56px 96px;
  animation: drift 45s linear infinite alternate;
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 56px 288px; }
}

#avatar-pop { z-index: 30; }
.avatar-dialog { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; }

.avatar-big {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  font-size: 46px;
  font-weight: 600;
  box-shadow: 0 0 0 3px var(--raised), 0 0 0 4px var(--line);
}

.avatar-dialog .dialog-tools { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .drawer-panel { animation: none; }
  .lock-btn svg .shackle { transition: none; }
}

.tool-amoled { display: none; }
.sheet.fullscreen .tool-amoled,
.sheet-inner.locked .tool-amoled { display: grid; }
@media (min-width: 600px) { .tool-amoled { display: none !important; } }

.sheet.amoled { background: #000000; }
.sheet.amoled .sheet-inner {
  background: #000000 !important;
  border-color: #000000;
  color: #F4F5F6;
}

.sheet.amoled .ed-view,
.sheet.amoled .ed-title,
.sheet.amoled #ed-text { color: #F4F5F6; }
.sheet.amoled .icon { color: #8C9097; }
.sheet.amoled .icon[aria-pressed="true"] { color: #7FB0FF; }
.sheet.amoled .when { color: #7E838A; }
.sheet.amoled .ed-view code, .sheet.amoled .code { background: rgba(255, 255, 255, .09); }
.sheet.amoled .check rect { stroke: #8C9097; }

.sheet.fullscreen .sheet-tools { gap: 10px; padding-bottom: 6px; }
.sheet.fullscreen .icon { width: 46px; height: 46px; border-radius: 14px; }
.sheet.fullscreen .icon svg { width: 23px; height: 23px; }
.sheet.fullscreen .icon:active { background: var(--shade); }

.ed-view > div, .ed-view p, .ed-view .code { max-width: 100%; }
.ed-view .code, .sheet-inner .code { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sheet-inner { overflow-x: hidden; }

.beefly {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  background-image: var(--bee);
  background-size: contain;
  background-repeat: no-repeat;
  opacity: .16;
  pointer-events: none;
  z-index: 0;
  animation: beepath 54s linear infinite;
}

@keyframes beepath {
  0% { transform: translate(4vw, 72vh) rotate(6deg); }
  18% { transform: translate(26vw, 34vh) rotate(-8deg); }
  36% { transform: translate(58vw, 62vh) rotate(5deg); }
  54% { transform: translate(78vw, 24vh) rotate(-6deg); }
  72% { transform: translate(52vw, 12vh) rotate(7deg); }
  88% { transform: translate(18vw, 52vh) rotate(-5deg); }
  100% { transform: translate(4vw, 72vh) rotate(6deg); }
}

@media (prefers-reduced-motion: reduce) { .beefly { animation: none; opacity: .1; } }

@media (max-width: 899px) {
  .icon { width: 42px; height: 42px; }
  .icon svg { width: 22px; height: 22px; }
  .icon.save { background: color-mix(in srgb, var(--accent) 16%, transparent); }
  .fab { width: 70px; height: 62px; }
  .fab svg { width: 28px; height: 28px; }
  .fab-ico { width: 40px; height: 40px; }
  .fmtbtn { min-width: 40px; height: 38px; font-size: 15px; }
  .fmtdot { width: 24px; height: 24px; }
  .swatch { flex-basis: 26px; width: 26px; height: 26px; }
  .chip { padding: 10px 18px; }
  .sheet-tools { gap: 6px; }
}

.tool-full { display: none; }
@media (max-width: 1023px) { .tool-full { display: grid; } }
@media (max-width: 1023px) and (orientation: landscape) {
  .sheet-inner { height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .notes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sheet.fullscreen .ed-view { max-width: 72ch; margin: 0 auto; }

@media (max-width: 899px) {
  #ed-text { padding-bottom: 18px; scroll-padding-bottom: 60px; }
}

.rows-end { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.danger-row .nav-label { color: var(--danger); }
.danger-row .ico svg { stroke: var(--danger); }
.danger-row:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.empty { max-width: 24ch; margin: 0 auto; line-height: 1.6; }

#lg-code { letter-spacing: .12em; text-align: center; font-size: 16px; font-family: var(--mono); }
#dlg-text { white-space: pre-line; }

.hexbtn:active { filter: brightness(1.08) drop-shadow(0 4px 10px rgba(50, 37, 14, .3)); }

.grip {
  flex: 0 0 auto;
  width: 26px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}

.grip svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.grip:active { cursor: grabbing; }
.list-row.row-dragging { opacity: .6; background: var(--shade); border-radius: 8px; }

.sheet.fullscreen .tool-lights { display: none !important; }
.sheet-inner.focus .tool-amoled { display: none !important; }

.beefly { opacity: .2; width: 38px; height: 38px; will-change: transform; }
@media (max-width: 899px) { .beefly { opacity: .22; width: 34px; height: 34px; } }

@media (max-width: 899px) {
  .fab-wrap { bottom: calc(96px + var(--safe-bottom)); right: calc(20px + var(--safe-right)); }
  .notes { padding-bottom: 170px; }
  .fab { width: 84px; height: 76px; }
  .fab svg { width: 32px; height: 32px; }

  .sheet-inner {
    width: calc(100% - 12px);
    height: calc(var(--vvh, 100dvh) - 12px);
    max-height: calc(var(--vvh, 100dvh) - 12px);
    border-radius: 20px;
    margin-bottom: 6px;
  }

  .sheet-tools {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: inherit;
    padding-top: 6px;
    padding-bottom: 2px;
  }

  .sheet.fullscreen .sheet-inner,
  .sheet-inner.focus {
    width: 100%;
    height: var(--vvh, 100dvh);
    max-height: var(--vvh, 100dvh);
    margin: 0;
    border-radius: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .sheet.fullscreen .ed-view, .sheet-inner.focus #ed-text, .sheet-inner.focus .ed-title { max-width: 100%; }
}

@media (max-width: 899px) {
  .sheet { height: var(--vvh, 100dvh); top: 0; bottom: auto; }
  .sheet .dialog { margin-bottom: 8vh; }
}

.tools-extra { display: contents; }
.tool-bar { display: none; }

.icon.save.pending {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
}

.icon.save { background: none; }

@media (max-width: 899px) {
  .sheet-tools {
    position: sticky;
    justify-content: space-around;
    padding: 8px 6px 4px;
  }
  .tool-bar { display: grid; }
  .icon.save { background: none; }

  .palette { display: none; }
  .tools-extra { display: none; }
  .palette.in-panel { display: flex; width: 100%; justify-content: center; gap: 8px; padding: 2px 0 6px; }
  .palette.in-panel .swatch { flex-basis: 26px; width: 26px; height: 26px; }

  .tools-extra.open {
    position: absolute;
    padding-top: 10px;
    left: 10px;
    right: 10px;
    bottom: calc(100% + 8px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background-color: color-mix(in srgb, var(--accent) 9%, var(--raised));
    background-image: var(--pixels);
    background-size: 56px 96px;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-3);
    z-index: 6;
    animation: popin .14s cubic-bezier(.32, 1.3, .6, 1);
    overflow: visible;
  }

  .sheet-inner { position: relative; }
  .tools-extra.open { gap: 6px; }
  .tools-extra.open .icon { width: 46px; height: 46px; }
}

.fab-menu {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 62px;
  height: 56px;
  pointer-events: none;
  z-index: 11;
}

.hexbtn {
  pointer-events: auto;
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 62px;
  height: 56px;
  padding: 0;
  background: color-mix(in srgb, var(--accent) 80%, var(--raised));
  color: #2B2620;
  border: 0;
  cursor: pointer;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  filter: drop-shadow(0 6px 14px rgba(50, 37, 14, .32));
  opacity: 0;
  transform: translate(0, 0) scale(.5);
  transition: transform .17s cubic-bezier(.32, 1.4, .6, 1), opacity .14s ease;
}

.hexbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.fab-label { display: none; }

.fab-menu.shown .hex-up { opacity: 1; transform: translate(0, -58.6px) scale(1); }
.fab-menu.shown .hex-left { opacity: 1; transform: translate(-51.7px, -29.3px) scale(1); }
.fab-menu.shown .hex-diag { opacity: 1; transform: translate(-51.7px, 29.3px) scale(1); transition-delay: .03s; }

@media (max-width: 899px) {
  .fab-menu { width: 84px; height: 76px; }
  .hexbtn { width: 84px; height: 76px; }
  .hexbtn svg { width: 27px; height: 27px; }
  .fab-menu.shown .hex-up { transform: translate(0, -78.4px) scale(1); }
  .fab-menu.shown .hex-left { transform: translate(-69.1px, -39.2px) scale(1); }
  .fab-menu.shown .hex-diag { transform: translate(-69.1px, 39.2px) scale(1); }

  #ed-more { order: 1; }
  #ed-save { order: 2; }
  #ed-full { order: 3; }
}

* { -webkit-tap-highlight-color: transparent; }

.sheet-inner.bg1 .tools-extra.open,
.sheet-inner.bg2 .tools-extra.open,
.sheet-inner.bg3 .tools-extra.open,
.sheet-inner.bg4 .tools-extra.open,
.sheet-inner.bg5 .tools-extra.open {
  background-color: rgba(255, 253, 246, .94);
  border-color: rgba(43, 38, 32, .16);
}

.sheet-inner.bg1 .tools-extra.open .icon,
.sheet-inner.bg2 .tools-extra.open .icon,
.sheet-inner.bg3 .tools-extra.open .icon,
.sheet-inner.bg4 .tools-extra.open .icon,
.sheet-inner.bg5 .tools-extra.open .icon { color: rgba(43, 38, 32, .78); }

.sheet-inner.bg1 .tools-extra.open .icon.danger,
.sheet-inner.bg2 .tools-extra.open .icon.danger,
.sheet-inner.bg3 .tools-extra.open .icon.danger,
.sheet-inner.bg4 .tools-extra.open .icon.danger,
.sheet-inner.bg5 .tools-extra.open .icon.danger { color: #B33B1E; }

.sheet-inner.bg6 .tools-extra.open {
  background-color: rgba(18, 16, 12, .96);
  border-color: rgba(255, 255, 255, .14);
}

.sheet-inner.bg6 .tools-extra.open .icon { color: #D9D3C6; }

.view-head {
  max-width: 1180px;
  margin: 16px auto -6px;
  padding: 0 calc(16px + var(--safe-left)) 0 calc(16px + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-head .view-label { margin: 0; padding: 0; }

.linkbtn {
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--danger);
  background: none;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: 999px;
  cursor: pointer;
}

.linkbtn:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

.sec-dialog { text-align: left; max-height: 88dvh; overflow-y: auto; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sec-head .dlg-title { margin: 0; }

.sec-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sec-dialog input {
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sec-dialog input:focus { border-color: var(--accent); outline: none; }
.sec-dialog .nav-row.flat { padding: 8px 0; }
.sec-dialog .nav-row.flat:hover { background: none; }
.sec-dialog input.toggle { margin-bottom: 0; }
#sec-codes { margin: 12px 0 14px; }
.sec-dialog .primary { margin-top: 4px; }
.sec-dialog .sec-group-label { margin-top: 26px; }
#new-codes { width: 100%; }

.totp-dialog { text-align: center; }
.totp-help { margin: 4px 0 16px; color: var(--muted); font-size: 13.5px; }

.totp-qr {
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.totp-qr svg { border-radius: 10px; box-shadow: var(--shadow-1); }

.secret-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--shade);
  border-radius: 10px;
}

.secret {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  overflow-wrap: anywhere;
  text-align: left;
  -webkit-user-select: text;
  user-select: text;
}

.secret-wrap .copy { position: static; }

#totp-code {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: .3em;
  font-size: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-user-select: text;
  user-select: text;
}

#totp-code:focus { border-color: var(--accent); outline: none; }
.totp-dialog .dialog-tools { justify-content: center; }

@media (max-width: 899px) {
  .login { align-items: flex-start; padding-top: 7vh; }
}

.logo:active { transform: scale(.94); }
.logo { transition: transform .12s ease; }

.sec-group-label svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; flex: 0 0 auto; }

.user-face {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--accent) 16%, transparent);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
}

.user-info { flex: 1 1 auto; min-width: 0; }
.drawer .user { gap: 12px; }

html, body { min-height: 100dvh; }

@media (orientation: landscape) and (max-width: 1023px) {
  .bar { padding-top: calc(4px + var(--safe-top)); }
  .notes { padding-top: 10px; padding-bottom: 110px; }
  .drawer-panel { padding-bottom: calc(16px + var(--safe-bottom)); }
  .sheet-inner { padding-bottom: calc(8px + var(--safe-bottom)); }
}

@media (display-mode: standalone) {
  .bar { padding-top: calc(10px + var(--safe-top)); }
  .notes { padding-bottom: calc(150px + var(--safe-bottom)); }
}

.draw {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--raised);
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.dtop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.dtitle {
  flex: 1;
  min-width: 0;
  padding: 7px 4px;
  font-size: 16px;
  font-weight: 600;
  background: none;
  border: 0;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.dz-level { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }

.dcanvas {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: block;
  touch-action: none;
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
}

.dsel { fill: none; stroke: var(--accent); stroke-dasharray: 5 4; }
.dhandle { fill: var(--raised); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }

.dzoom {
  position: absolute;
  right: calc(12px + var(--safe-right));
  top: calc(64px + var(--safe-top));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  background: color-mix(in srgb, var(--raised) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
}

.dshapes {
  position: absolute;
  left: 50%;
  bottom: calc(118px + var(--safe-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
  z-index: 2;
}

.dshapes .icon[aria-pressed="true"], .dbar .icon[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.dbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  background: var(--raised);
}

.dgroup { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.dcolours { display: flex; gap: 8px; }

.dcol {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  cursor: pointer;
}

.dcol[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--raised), 0 0 0 2px var(--accent); }

.dwidths { display: flex; gap: 4px; margin-left: 10px; }

.dw {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.dw span { display: block; width: 20px; border-radius: 99px; background: var(--ink); }
.dw[data-width="2"] span { height: 2px; }
.dw[data-width="5"] span { height: 5px; }
.dw[data-width="10"] span { height: 9px; }
.dw[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); }

.dpreview { width: 100%; height: 100%; max-height: 100%; display: block; }
.note .note-body:has(.dpreview) { height: calc(100% - 4px); mask-image: none; -webkit-mask-image: none; }
.note-body > div:has(> .dpreview) { height: 100%; }

.files { display: flex; flex-direction: column; gap: 6px; padding: 6px 2px; max-height: 30dvh; overflow-y: auto; }

.file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: var(--shade);
  border-radius: 10px;
}

.file img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }

.file-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.file-meta { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.file-meta strong { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta span { font-size: 12px; color: var(--muted); }

.note .clip {
  position: absolute;
  right: 28px;
  top: 8px;
  font-size: 11px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .dbar { flex-direction: row; justify-content: center; gap: 18px; }
}

.dlayer, .doverlay { pointer-events: none; }

#dialog { z-index: 70; }
#totp-pop { z-index: 65; }
#security { z-index: 45; }
#avatar-pop { z-index: 45; }

.dgrid-dot { fill: color-mix(in srgb, var(--ink) 22%, transparent); }
.dcanvas { background-image: none; }

.status:empty { visibility: hidden; border: 0; box-shadow: none; }
body.no-scroll .beefly { visibility: hidden; }
.draw { height: 100dvh; bottom: auto; }

@media (hover: hover) { .fab:hover { filter: brightness(1.06) drop-shadow(0 8px 18px rgba(50, 37, 14, .34)); } }
.fab:active { transform: none; }

.fab-wrap { transition: transform .22s ease, opacity .22s ease; }
body.scrolling .fab-wrap { transform: translateY(24px) scale(.9); opacity: 0; pointer-events: none; }

.notice {
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--accent) 12%, var(--raised));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 14px;
  font-size: 14px;
  width: calc(100% - 28px);
}

.notice > span { flex: 1 1 220px; min-width: 0; }
.notice-tools { display: flex; gap: 6px; }
.notice .chip { padding: 6px 14px; font-size: 13px; }
.notice.soft { background: var(--raised); border-color: var(--line); color: var(--muted); font-size: 13px; }
.notice .icon { width: 30px; height: 30px; }

.usage { margin-top: 2px; font-variant-numeric: tabular-nums; }

.sessions { display: flex; flex-direction: column; margin-bottom: 10px; }

.sess {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}

.sess:last-child { border-bottom: 0; }
.sess-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sess-info strong { font-size: 14px; font-weight: 500; }
.sess-info span { font-size: 12px; color: var(--muted); }
.sess .chip { padding: 5px 12px; font-size: 12.5px; }
#sess-others { width: 100%; }

.fails { color: var(--danger); opacity: .8; }

#inv-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
#inv-form input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-user-select: text;
  user-select: text;
}
#inv-form input:focus { border-color: var(--accent); outline: none; }
#link-pop { z-index: 66; }
.secret-wrap .secret { word-break: break-all; }
