@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/quicksand-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/quicksand-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #86598f; --bg: #ffffff; --text: #2f3337; --day: #3a3f45; --muted: #9aa0a6; --title: #4a4f55;
  --line: #ececef; --panel: #ffffff; --today: #86598f; --holiday: #d64545; --link: #277ea5; --soft: #86598f;
  --field: #f4f4f6; --shade: rgba(20, 16, 24, .38); --shadow: 0 -6px 24px rgba(0, 0, 0, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --text: #e9e9ec; --day: #6b6f76; --muted: #c9ccd1; --title: #5d6168;
    --line: #1d1d20; --panel: #000000; --today: #b48bbd; --holiday: #a35a5a; --link: #3b9fd1; --soft: #a07aa8;
    --field: #161618; --shade: rgba(0, 0, 0, .6); --shadow: 0 -1px 0 #1d1d20;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 500 16px/1.35 "Quicksand", -apple-system, system-ui, sans-serif; }
body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }

#app { display: flex; flex-direction: column; height: 100%; }

/* bara mov de sus */
.appbar { flex: none; display: flex; align-items: center; gap: 6px; background: var(--brand); color: #fff;
  padding: calc(env(safe-area-inset-top) + 6px) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
.appbar .grow { flex: 1; }
.ico { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.ico:active { background: rgba(255, 255, 255, .15); }
.ico svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* lunile, una sub alta */
#months { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 max(8px, env(safe-area-inset-right)) 24px max(8px, env(safe-area-inset-left)); }
.month { max-width: 560px; margin: 0 auto; padding: 26px 0 10px; }
.month h2 { margin: 0 0 18px; text-align: center; font-size: 22px; font-weight: 500; color: var(--title); letter-spacing: .01em; }
.wk, .days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.wk { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.days { row-gap: 6px; }
.d { height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; position: relative; }
.d .n { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--day); transition: transform .12s; }
.d:active .n { transform: scale(.88); }
.d.h .n { color: var(--holiday); }
.d.t .n { color: var(--today); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--today); }
.d .n.f { color: #fff; font-weight: 600; box-shadow: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.d .nt { position: absolute; top: 1px; right: calc(50% - 22px); width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); box-shadow: 0 0 0 2px var(--bg); }

/* jos: culorile */
.pick { flex: none; background: var(--panel); box-shadow: var(--shadow);
  padding: 10px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.pick-head { display: flex; justify-content: space-between; align-items: baseline; max-width: 560px; margin: 0 auto 10px; }
.pick-head span { color: var(--soft); font-size: 17px; }
.pick-head button { color: var(--link); font-weight: 700; font-size: 17px; }
#swatches { display: flex; gap: 12px; overflow-x: auto; max-width: 560px; margin: 0 auto; padding: 10px 4px 6px; scrollbar-width: none; }
#swatches::-webkit-scrollbar { display: none; }
.sq { flex: 0 0 calc((100% - 48px) / 5); min-width: 56px; aspect-ratio: 1; border-radius: 4px; position: relative; display: flex; align-items: flex-end;
  padding: 0 0 4px 6px; color: #fff; font-size: 12px; font-weight: 600; text-align: left; overflow: hidden;
  transition: transform .15s, box-shadow .15s; }
.sq span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.sq.on { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--soft); }
.sq.add { background: transparent; border: 2px dashed var(--muted); color: var(--muted); justify-content: center; align-items: center;
  padding: 0; font-size: 30px; font-weight: 400; }

/* foi de jos (zi, etichete, setări) */
.shade { position: fixed; inset: 0; background: var(--shade); z-index: 10; animation: fade .18s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-height: 92%; overflow-y: auto; max-width: 600px; margin: 0 auto;
  background: var(--bg); border-radius: 14px 14px 0 0; padding: 6px 22px max(22px, env(safe-area-inset-bottom));
  animation: up .24s cubic-bezier(.2, .9, .3, 1); -webkit-overflow-scrolling: touch; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet .top { display: flex; justify-content: space-between; align-items: center; height: 52px; margin-bottom: 6px; }
.sheet .top button { font-size: 18px; color: var(--muted); padding: 8px 2px; }
.sheet .top button.ok { color: var(--soft); font-weight: 700; }
.sheet .top b { font-size: 18px; font-weight: 600; }
.sheet h3 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 24px 0 10px; }
.sheet .sub { color: var(--muted); margin: -2px 0 14px; font-size: 15px; }
.sheet .sub.h { color: var(--holiday); }

/* editorul de culoare */
.preview { aspect-ratio: 16 / 9.5; border-radius: 4px; display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 14px 18px; color: #fff; font-size: 26px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.uline { width: 100%; border: 0; border-bottom: 2px solid var(--muted); background: transparent; padding: 14px 6px 8px;
  font-size: 24px; outline: none; border-radius: 0; }
.uline:focus { border-bottom-color: var(--soft); }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; margin: 22px 0; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: var(--thumb, #86598f);
  border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.slider::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: var(--thumb, #86598f); border: 0; }
.mine .sq { flex-basis: 64px; }
.mine { display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.mine::-webkit-scrollbar { display: none; }

/* liste și butoane */
.list > div { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .sw { width: 38px; height: 38px; border-radius: 4px; flex: none; }
.list .name { flex: 1; font-size: 18px; }
.list .mv { width: 34px; height: 34px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.list .mv:disabled { opacity: .25; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border-radius: 24px; border: 1.5px solid var(--line);
  font-size: 16px; font-weight: 600; }
.chip .dotc { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.chip.on { border-color: var(--c); }
textarea { width: 100%; min-height: 90px; resize: vertical; border: 0; border-radius: 10px; padding: 12px 14px; background: var(--field); font-size: 16px; }
.primary { background: var(--brand); color: #fff; font-weight: 700; padding: 13px 22px; border-radius: 10px; font-size: 17px; }
.link { color: var(--link); font-weight: 700; padding: 10px 0; }
.danger { color: var(--holiday); font-weight: 700; padding: 12px 0; }
.danger.sure { background: var(--holiday); color: #fff; padding: 12px 18px; border-radius: 10px; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.steps { margin: 0; padding-left: 22px; font-size: 16px; }
.steps li { margin: 6px 0; }
.note-s { font-size: 14px; color: var(--muted); }

.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(var(--brand) 0 34%, var(--bg) 34%); }
.login form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; text-align: center;
  background: var(--bg); border-radius: 18px; padding: 28px 22px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .12); }
.login h1 { margin: 4px 0 0; font-size: 32px; font-weight: 700; }
.login .sub { margin: 0 0 8px; color: var(--muted); }
.login input { border: 0; border-bottom: 2px solid var(--line); padding: 12px 6px; background: transparent; font-size: 18px; text-align: center; outline: none; border-radius: 0; }
.login input:focus { border-bottom-color: var(--soft); }
.login input.code { font-size: 34px; letter-spacing: 16px; font-weight: 700; padding-left: 22px; }
.login .logo { width: 76px; height: 76px; margin: 0 auto; border-radius: 18px; background: url(/static/icon-192.png) center/cover; }
.err { color: var(--holiday); min-height: 20px; margin: 2px 0 0; font-size: 15px; }

.toast { position: fixed; left: 50%; bottom: calc(130px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: #2f3337; color: #fff; padding: 11px 20px; border-radius: 22px; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 20; max-width: 90%; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
