/* Ember: две темы из DESIGN.md. Днём «Бумага и графит», вечером «Вечер в студии». */
:root, [data-theme="light"] {
  --bg: #F7F4EF;
  --bg-image: none;
  --surface: #FFFFFF;
  --surface-line: rgba(28,28,26,.10);
  --text: #1C1C1A;
  --muted: #6B6762;
  --line: rgba(28,28,26,.12);
  --ember: #B5482A;
  --ember-glow: radial-gradient(circle at 50% 55%, #E0784F 0%, #B5482A 38%, rgba(181,72,42,.18) 62%, rgba(181,72,42,0) 72%);
  --ember-shadow: none;
  --card-bg: #FFFFFF;
  --card-text: #1C1C1A;
  --card-label: #B5482A;
  --btn-bg: #1C1C1A;
  --btn-text: #F7F4EF;
  --btn-line: rgba(28,28,26,.25);
  --card-btn-line: rgba(28,28,26,.25);
  --font-display: 'Literata', Georgia, serif;
  --display-style: normal;
  --font-body: 'Manrope', system-ui, sans-serif;
  --display-size: 30px;
  --thing-size: 21px;
}
[data-theme="dark"] {
  --bg: #34332F;
  --bg-image: radial-gradient(ellipse 120% 55% at 50% 0%, #4C4A46 0%, #34332F 70%);
  --surface: rgba(238,235,229,.07);
  --surface-line: transparent;
  --text: #EEEBE5;
  --muted: #B4AFA6;
  --line: rgba(238,235,229,.14);
  --ember: #E3946A;
  --ember-glow: #E3946A;
  --ember-shadow: 0 0 24px 10px rgba(227,148,106,.45), 0 0 70px 30px rgba(227,148,106,.15);
  --card-bg: #EEEBE5;
  --card-text: #2A2926;
  --card-label: #6B5A4E;
  --btn-bg: #2A2926;
  --btn-text: #EEEBE5;
  --btn-line: rgba(238,235,229,.3);
  --card-btn-line: rgba(42,41,38,.3);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --display-style: italic;
  --font-body: 'Inter', system-ui, sans-serif;
  --display-size: 36px;
  --thing-size: 25px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); background-image: var(--bg-image);
  background-repeat: no-repeat; color: var(--text); font-family: var(--font-body); font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
.screen {
  max-width: 480px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; gap: 26px;
  padding: calc(28px + env(safe-area-inset-top)) 24px 0 24px;
}
.top { display: flex; justify-content: space-between; align-items: baseline; }
.mark { font-family: var(--font-display); font-style: var(--display-style); font-size: 22px; font-weight: 500; }
.display { margin: 0; font-family: var(--font-display); font-style: var(--display-style); font-weight: 400; font-size: var(--display-size); line-height: 1.15; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; margin: 8px 0 0; }
.strong { font-weight: 600; }
.num { font-family: var(--font-display); }
.label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; display: block; }
.accent { color: var(--card-label); }
.accent-text { color: var(--ember); }
.stack-0 { display: flex; flex-direction: column; }
.stack-6 { display: flex; flex-direction: column; gap: 6px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }

.hero { display: flex; gap: 18px; align-items: center; }
.ember { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; background: var(--ember-glow); box-shadow: var(--ember-shadow); }
[data-theme="dark"] .hero { flex-direction: column; text-align: center; padding-top: 12px; }
[data-theme="dark"] .ember { width: 22px; height: 22px; margin-bottom: 8px; }

.row { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.row.last { border-bottom: 1px solid var(--line); }
.note { margin: 10px 0 0; line-height: 1.5; }

.card { display: flex; flex-direction: column; gap: 16px; background: var(--card-bg); color: var(--card-text);
  border: 1px solid var(--surface-line); border-radius: 20px; padding: 20px; }
.card .label { padding: 0; }
.thing { font-size: var(--thing-size); line-height: 1.3; color: var(--card-text); }
.card .muted { color: var(--card-label); }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { flex: 1; min-height: 48px; padding: 0 18px; border-radius: 24px; border: 1px solid var(--btn-line);
  background: transparent; color: var(--text); font: 500 15px var(--font-body); display: inline-flex;
  align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--btn-bg); color: var(--btn-text); border-color: transparent; font-weight: 600; }
.card .btn { color: var(--card-text); border-color: var(--card-btn-line); }
.card .btn.primary { color: var(--btn-text); }
.small-btn { flex: 0 0 auto; min-height: 44px; font-size: 14px; align-self: flex-start; }
.pip { margin: 0; }

.week-head { display: flex; align-items: center; gap: 8px; }
.week-head .display { flex: 1; }
.arrow { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; text-decoration: none; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.day { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dot-box { height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.dot { border-radius: 50%; background: var(--text); opacity: .3; }
.dot.l0 { width: 8px; height: 8px; opacity: .12; }
.dot.l1 { width: 16px; height: 16px; opacity: .3; }
.dot.l2 { width: 22px; height: 22px; opacity: .4; }
.dot.l3 { width: 28px; height: 28px; opacity: .5; }
.dot.l4 { width: 34px; height: 34px; opacity: .6; }
.dot.bright { background: var(--ember); opacity: 1; }
[data-theme="dark"] .dot { background: var(--ember); }
[data-theme="dark"] .dot-box { align-items: center; }
[data-theme="dark"] .dot.bright { box-shadow: 0 0 14px 4px rgba(227,148,106,.4); }
.obs { font-size: calc(var(--thing-size) - 3px); line-height: 1.4; }

.photo { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px dashed var(--btn-line); border-radius: 14px; }
.thumb { width: 56px; height: 70px; flex-shrink: 0; border-radius: 6px; object-fit: cover; }
.lined { background: repeating-linear-gradient(#FFFFFF 0 11px, #E6E1D8 11px 12px); }
[data-theme="dark"] .lined { background: repeating-linear-gradient(#4C4A46 0 11px, #5A5853 11px 12px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.login { display: flex; flex-direction: column; gap: 22px; padding-top: 40px; }
.field { min-height: 48px; border-radius: 14px; border: 1px solid var(--btn-line); background: var(--surface);
  color: var(--text); font: 16px var(--font-body); padding: 0 14px; }

.tabs { margin-top: auto; display: flex; justify-content: space-around; padding: 14px 0 calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: 13px; }
.tabs a { color: var(--muted); text-decoration: none; padding: 12px; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; }

.signal { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.signal p { margin: 0; line-height: 1.45; }
.sig-title { font-size: calc(var(--thing-size) - 3px); }
.basis summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.basis { display: flex; flex-direction: column; gap: 6px; }
.basis a { display: block; padding: 4px 0; }
