/* indra.css — заставка «В реальности счастье», записи и управление людьми (дневник Индры) */

/* ---------- заставка ---------- */
html.has-splash { overflow: hidden; }
#splash { position: fixed; inset: 0; z-index: 9999; overflow: hidden; background: #0b1020; color: #fff; cursor: pointer; animation: splash-in 1.2s ease both; }
#splash.is-leaving { animation: splash-out 0.9s ease forwards; pointer-events: none; }
@keyframes splash-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-out { to { opacity: 0; transform: scale(1.03); } }
.splash__bg, .splash__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.splash__bg img { animation: splash-zoom 40s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes splash-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
/* видео берега: поверх кадра‑постера, проявляется, когда готово к воспроизведению */
.splash__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; opacity: 0; transition: opacity 1.6s ease; pointer-events: none; }
#splash.has-video .splash__video { opacity: 1; }
#splash.has-video .splash__bg img { animation: none; }
/* тонировка по времени суток: читаемость надписи сверху, мягкая вуаль снизу */
.splash__tint { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8,10,30,0.55) 0%, rgba(8,10,30,0.15) 35%, rgba(8,10,30,0) 55%, rgba(8,10,30,0.35) 100%); animation: dawn 7s ease-out forwards; }
#splash[data-phase="night"] .splash__tint { background: linear-gradient(180deg, rgba(5,8,25,0.6) 0%, rgba(5,8,25,0.25) 40%, rgba(5,8,25,0.45) 100%); }
#splash[data-phase="day"] .splash__tint { background: linear-gradient(180deg, rgba(10,20,40,0.5) 0%, rgba(10,20,40,0.1) 40%, rgba(10,20,40,0.25) 100%); }
/* рассвет: тёплая золотистая вуаль над горизонтом (ролик Туламбена снят при ярком утреннем свете) */
#splash[data-phase="dawn"] .splash__tint { background: linear-gradient(180deg, rgba(30,14,50,0.5) 0%, rgba(255,140,70,0.22) 30%, rgba(255,190,110,0.18) 45%, rgba(255,160,90,0.06) 65%, rgba(10,8,30,0.35) 100%); }
#splash[data-phase="dawn"] .splash__sun { top: 38%; }
@keyframes dawn { 0% { opacity: 1; filter: brightness(0.3); } 100% { opacity: 1; filter: none; } }
/* тёплое свечение восходящего солнца */
.splash__sun { position: absolute; left: 50%; top: 58%; width: 70vmin; height: 70vmin; margin: -35vmin 0 0 -35vmin; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,236,170,0.95) 0%, rgba(255,190,110,0.55) 18%, rgba(255,150,90,0.22) 40%, rgba(255,120,80,0) 70%);
  mix-blend-mode: screen; opacity: 0.55; animation: sunrise 9s ease-out forwards, sun-pulse 6s ease-in-out 9s infinite alternate; }
#splash[data-phase="sunset"] .splash__sun { top: 52%; }
@keyframes sunrise { 0% { transform: translateY(14vmin) scale(0.4); opacity: 0.1; } 100% { transform: translateY(0) scale(1); opacity: 0.55; } }
@keyframes sun-pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
/* чайки */
.splash__gulls { position: absolute; inset: 0; pointer-events: none; }
.gull { position: absolute; left: -12%; fill: none; stroke: rgba(40, 32, 48, 0.85); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: gull-fly linear infinite; filter: drop-shadow(0 0 2px rgba(255,255,255,0.25)); }
.gull__wings { transform-origin: 50px 24px; animation: flap 0.9s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleY(1) translateY(0); } to { transform: scaleY(0.35) translateY(6px); } }
@keyframes gull-fly { 0% { transform: translateX(0) translateY(0); } 25% { transform: translateX(28vw) translateY(-3vh); } 50% { transform: translateX(56vw) translateY(1vh); } 75% { transform: translateX(84vw) translateY(-2vh); } 100% { transform: translateX(124vw) translateY(0); } }
@keyframes gull-fly-back { 0% { transform: translateX(124vw) translateY(0) scaleX(-1); } 25% { transform: translateX(84vw) translateY(-2vh) scaleX(-1); } 50% { transform: translateX(56vw) translateY(2vh) scaleX(-1); } 75% { transform: translateX(28vw) translateY(-3vh) scaleX(-1); } 100% { transform: translateX(0) translateY(0) scaleX(-1); } }
/* прибой */
.splash__waves { position: absolute; left: 0; right: 0; bottom: 0; height: 18vh; pointer-events: none; }
.splash__waves svg { width: 100%; height: 100%; display: block; }
.wave { fill: rgba(255,255,255,0.22); animation: wave-move 9s ease-in-out infinite; }
.wave--2 { fill: rgba(200,230,255,0.18); animation-duration: 13s; animation-direction: reverse; }
@keyframes wave-move { 0% { transform: translateX(0) translateY(0); } 50% { transform: translateX(-300px) translateY(6px); } 100% { transform: translateX(-600px) translateY(0); } }
/* надпись */
.splash__text { position: absolute; left: 0; right: 0; top: 22%; text-align: center; padding: 0 24px; pointer-events: none; text-shadow: 0 2px 24px rgba(40, 20, 30, 0.55), 0 0 2px rgba(0,0,0,0.4); }
.splash__title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: clamp(34px, 9vw, 72px); line-height: 1.05; letter-spacing: 0.02em; margin: 0; color: #fff7ea; opacity: 0; animation: text-in 2.4s ease 1.6s forwards; }
.splash__sub { margin: 14px 0 0; font-size: clamp(13px, 3.4vw, 18px); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 244, 225, 0.85); opacity: 0; animation: text-in 2s ease 3s forwards; }
@keyframes text-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.splash__enter { position: absolute; left: 50%; bottom: calc(24vh + env(safe-area-inset-bottom)); transform: translateX(-50%); min-height: 48px; padding: 0 34px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.7); background: rgba(20, 16, 30, 0.35); color: #fff; font: 600 16px/1 Manrope, system-ui, sans-serif; letter-spacing: 0.08em; backdrop-filter: blur(6px); opacity: 0; animation: text-in 1.6s ease 4.2s forwards; cursor: pointer; }
.splash__hint { position: absolute; left: 0; right: 0; bottom: calc(20vh + env(safe-area-inset-bottom)); text-align: center; margin: 0; font-size: 12px; color: rgba(255,255,255,0.7); opacity: 0; animation: text-in 1.6s ease 5s forwards; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #splash * { animation-duration: 0.01s !important; animation-delay: 0s !important; } .splash__title, .splash__sub, .splash__enter, .splash__hint { opacity: 1; } }

/* ---------- Мои записи ---------- */
.notes-card { margin-top: var(--space-4, 16px); }
.notes-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.note { border: 1px solid var(--color-border); border-radius: var(--radius-md, 12px); padding: 12px; background: var(--color-surface-offset); }
.note.is-draft { border-style: dashed; border-color: color-mix(in oklab, var(--color-primary) 55%, var(--color-border)); }
.note__head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-bottom: 6px; }
.note__meta { margin-left: auto; font-size: var(--text-xs, 12px); color: var(--color-text-muted); }
.note__text { font-size: var(--text-sm, 14px); line-height: 1.55; white-space: normal; word-break: break-word; }
.note__actions, .notes-actions, .note-form__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.note-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; background: var(--color-primary-highlight); color: var(--color-primary); }
.note-badge--ai { background: color-mix(in oklab, #e39aa8 22%, transparent); color: #c0506a; }
.note-badge--fix { background: color-mix(in oklab, #f1c76b 28%, transparent); color: #8a6a10; }
.note-badge--auto { background: color-mix(in oklab, #7fcfb0 25%, transparent); color: #2a7a5c; }
.chip--danger { color: var(--color-danger, #c0392b); border-color: color-mix(in oklab, var(--color-danger, #c0392b) 40%, transparent); }
.notes-status { font-size: var(--text-xs, 12px); color: var(--color-text-muted); }
.notes-err { color: var(--color-danger, #c0392b); }
.note-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md, 12px); }

/* ---------- Люди ---------- */
.people-list { display: flex; flex-direction: column; gap: 10px; }
.person-card { border: 1px solid var(--color-border); border-left: 4px solid var(--pc, #9fd8ff); border-radius: var(--radius-md, 12px); padding: 12px; background: var(--color-surface-offset); }
.person-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: var(--text-base, 15px); }
.person-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc, #9fd8ff); box-shadow: 0 0 0 3px color-mix(in oklab, var(--pc, #9fd8ff) 25%, transparent); }
.person-card__body { margin-top: 6px; font-size: var(--text-sm, 14px); color: var(--color-text-muted); line-height: 1.5; }
.person-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius-lg, 16px); background: var(--color-surface); }
.person-form__more summary { cursor: pointer; font-size: var(--text-sm, 14px); color: var(--color-text-muted); margin-bottom: 8px; }
.geo-row { display: flex; gap: 8px; }
.geo-row input { flex: 1; min-width: 0; }
.geo-results { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; font-size: var(--text-xs, 12px); }
.geo-results .chip { white-space: normal; text-align: left; min-height: 36px; padding: 6px 12px; line-height: 1.3; }
.field--check { flex-direction: row; align-items: center; gap: 10px; }
.field--check input { min-height: 0; width: 20px; height: 20px; }
.rel-set { border: 1px solid var(--color-border); border-radius: var(--radius-md, 12px); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.rel-set legend { font-size: var(--text-xs, 12px); color: var(--color-text-muted); font-weight: 600; padding: 0 6px; }
.rel-row { grid-template-columns: 1fr 1fr 1fr; align-items: center; font-size: var(--text-sm, 14px); }
.rel-row select, .rel-row input { min-height: 40px; background: var(--color-surface-offset); border: 1px solid var(--color-border); border-radius: var(--radius-md, 10px); color: inherit; padding: 0 10px; font: inherit; }
.card--inset { margin-top: 12px; }
@media (max-width: 480px) { .rel-row { grid-template-columns: 1fr; } }

/* 13 вкладок: по семь в ряд */
.tabbar .tab { flex-basis: calc(100% / 7); font-size: 10.5px; min-height: 44px; }
.tabbar .tab__glyph { font-size: 1.1rem; }
/* бейджи на тёмной теме */
.note-badge { background: color-mix(in oklab, var(--color-primary) 22%, transparent); color: color-mix(in oklab, var(--color-primary) 80%, #fff); }
.note-badge--ai { background: color-mix(in oklab, #e39aa8 24%, transparent); color: #f0b7c3; }
.note-badge--fix { background: color-mix(in oklab, #f1c76b 24%, transparent); color: #f3d58a; }
.note-badge--auto { background: color-mix(in oklab, #7fcfb0 24%, transparent); color: #a6e6cf; }
