@font-face{font-family:'Marck Script';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/marckscript-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Marck Script';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/marckscript-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}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/nunito-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/nunito-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}
@font-face{font-family:'Nunito';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/nunito-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Nunito';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/nunito-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}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/nunito-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/nunito-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}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/nunito-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/nunito-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}
@font-face{font-family:'Oswald';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/oswald-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Oswald';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/oswald-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}
@font-face{font-family:'Oswald';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/oswald-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Oswald';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/oswald-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}
@font-face{font-family:'Oswald';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/oswald-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Oswald';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/oswald-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}
/* Спейсик AI — мини-приложение. Тёмный фон, розовый акцент, сливовый градиент; Oswald / Nunito / Marck Script. */
:root {
  --bg: #120a15;
  --bg2: #1a0f1e;
  --card: #1f1324;
  --card2: #29182f;
  --line: rgba(255, 255, 255, .08);
  --text: #f7eef6;
  --muted: #b8a3b7;
  --dim: #7d687c;
  --pink: #ff4f9e;
  --pink2: #ff86bd;
  --pink-soft: rgba(255, 79, 158, .14);
  --plum: linear-gradient(140deg, #742664 0%, #45164c 48%, #22102a 100%);
  --pinkgrad: linear-gradient(135deg, #ff6fae 0%, #ff3d8f 55%, #d42a7b 100%);
  --radius: 20px;
  --st: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --sb: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --nav-h: 68px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(116, 38, 100, .35) 0%, transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(255, 79, 158, .08) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; }
.view {
  padding: calc(var(--st) + 16px) 16px calc(var(--nav-h) + var(--sb) + 28px);
  animation: fade .22s ease;
}
.app.no-nav .view { padding-bottom: calc(var(--sb) + 24px); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* типографика */
.h1 { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: .01em; margin: 0; }
.h2 {
  font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 15px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin: 28px 4px 12px;
}
.script { font-family: 'Marck Script', cursive; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* шапка */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ava {
  width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--pinkgrad); display: grid; place-items: center;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 20px; color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 79, 158, .45);
}
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hello { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 22px; line-height: 1.2; margin: 0; }

/* герой */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; background: var(--plum);
  padding: 22px 20px 22px; border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 79, 158, .35) 0%, transparent 70%); pointer-events: none;
}
.hero-row { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.corgi {
  width: 104px; height: 104px; border-radius: 50%; flex: none; object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); background: #fdeedd;
}
.hero-title { font-size: 34px; line-height: 1.05; color: #fff; margin: 0 0 6px; }
.hero-sub { font-weight: 700; font-size: 16px; line-height: 1.3; margin: 0; color: #fff; }
.hero-text { position: relative; z-index: 1; margin: 16px 0 0; color: rgba(255, 255, 255, .86); font-size: 15px; }

/* карточки */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
}
.card-title { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 18px; margin: 0 0 6px; letter-spacing: .01em; }
.today { background: linear-gradient(180deg, var(--card2), var(--card)); }
.today-topic { font-size: 16px; margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .12s ease, border-color .12s ease;
}
.skill:active { transform: scale(.97); border-color: rgba(255, 79, 158, .5); }
.skill-ico {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--pink-soft); color: var(--pink2);
}
.skill-name { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 17px; line-height: 1.2; margin-top: 14px; }
.soon { position: relative; opacity: .78; }
.soon .skill-ico { background: rgba(255, 255, 255, .06); color: var(--muted); }
.badge {
  position: absolute; top: 12px; right: 12px; font-family: 'Oswald', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; padding: 3px 8px; border-radius: 999px; background: rgba(255, 79, 158, .16); color: var(--pink2);
}
.how p { margin: 0 0 10px; }
.how p:last-child { margin: 0; }

/* кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 50px; padding: 12px 18px; border-radius: 16px; background: var(--pinkgrad); color: #fff;
  font-weight: 800; font-size: 16px; box-shadow: 0 10px 24px rgba(255, 61, 143, .28);
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; }
.btn-ghost { background: rgba(255, 255, 255, .06); box-shadow: none; border: 1px solid var(--line); color: var(--text); }
.btn svg { width: 20px; height: 20px; }

/* нижнее меню */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 8px 8px calc(var(--sb) + 8px); height: calc(var(--nav-h) + var(--sb));
  background: rgba(18, 10, 21, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.nav[hidden] { display: none; }
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--dim);
  font-size: 11px; font-weight: 700; padding: 4px 0; transition: color .15s ease;
}
.nav-btn svg { width: 24px; height: 24px; }
.nav-btn.on { color: var(--pink); }
.nav-new {
  justify-self: center; width: 62px; height: 62px; border-radius: 50%; margin-top: -26px; margin-bottom: 2px;
  background: var(--pinkgrad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(255, 61, 143, .45), 0 0 0 5px var(--bg);
  transition: transform .12s ease;
}
.nav-new:active { transform: scale(.94); }
.nav-new svg { width: 30px; height: 30px; stroke-width: 2.4; }

/* календарь */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 19px; text-transform: capitalize; }
.cal-arrow { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text); background: rgba(255, 255, 255, .05); }
.cal-arrow[disabled] { opacity: .25; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--dim); padding: 2px 0 4px; }
.cal-day {
  aspect-ratio: 1 / 1; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  color: var(--muted); position: relative;
}
.cal-day.off { color: rgba(255, 255, 255, .16); }
.cal-day.has { background: var(--pinkgrad); color: #fff; box-shadow: 0 6px 14px rgba(255, 61, 143, .3); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--pink2); color: var(--text); }
.cal-day.has.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--pink2); }
.cal-day .dot { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.legend { display: flex; gap: 16px; margin: 12px 4px 0; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 6px; }
.legend .l-has { background: var(--pinkgrad); }
.legend .l-today { box-shadow: inset 0 0 0 2px var(--pink2); }

/* день */
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.chips { display: flex; gap: 8px; margin: 14px 0 4px; overflow-x: auto; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.chip.on { background: var(--pink-soft); border-color: rgba(255, 79, 158, .5); color: var(--pink2); }
.topic { margin: 14px 0 6px; font-weight: 700; font-size: 17px; line-height: 1.35; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 8px; display: flex; gap: 6px; align-items: center; }
.note svg { width: 16px; height: 16px; color: var(--pink2); }
.frame { padding: 16px 16px 14px; }
.frame-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.frame-n {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .1em; color: var(--pink2);
  background: var(--pink-soft); border-radius: 8px; padding: 4px 8px; flex: none; margin-top: 2px;
}
.frame-title { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 17px; line-height: 1.25; }
.label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 10px 0 4px; }
.shoot { color: var(--muted); font-size: 15px; white-space: pre-line; }
.text {
  white-space: pre-line; font-size: 16px; background: rgba(255, 255, 255, .035); border-left: 3px solid var(--pink);
  border-radius: 4px 12px 12px 4px; padding: 10px 12px; margin-top: 4px;
}
.head-badge { font-size: 11px; font-weight: 800; color: var(--pink2); letter-spacing: .06em; text-transform: uppercase; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--text);
}
.copy svg { width: 17px; height: 17px; }
.copy.done { color: var(--pink2); border-color: rgba(255, 79, 158, .5); }
.actions { display: grid; gap: 10px; margin-top: 18px; }

/* профиль */
.sec-title { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 18px; margin: 0 0 10px; }
.items { margin: 0; padding: 0; list-style: none; }
.items li { position: relative; padding-left: 16px; margin: 0 0 8px; }
.items li:last-child { margin-bottom: 0; }
.items li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.items b { font-weight: 800; }
.items .date { color: var(--dim); font-size: 13px; }
.rows { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; text-align: left; font-weight: 700; }
.row + .row { border-top: 1px solid var(--line); }
.row .ri { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink2); }
.row .ri svg { width: 20px; height: 20px; }
.row .chev { margin-left: auto; color: var(--dim); width: 20px; height: 20px; }

/* пусто, загрузка, нет доступа */
.empty { text-align: center; padding: 26px 16px; }
.empty p { margin: 0 0 16px; color: var(--muted); }
.loading { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .1); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate { min-height: calc(100vh - var(--st) - var(--sb) - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }
.gate .corgi { width: 140px; height: 140px; }
.gate .h1 { max-width: 330px; }
.gate .btn { max-width: 320px; }

/* всплывашка */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--sb) + 18px); z-index: 50;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: #2e1b35; color: var(--text);
  border: 1px solid rgba(255, 79, 158, .35); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font-weight: 700; font-size: 15px;
  text-align: center; animation: fade .2s ease;
}
.app.no-nav .toast { bottom: calc(var(--sb) + 24px); }
