/* Approved 945×2048 home: 25/50/25 of the measured usable area.
   Content minima win over the fractions; document scrolling remains available. */
.app-shell:has([data-screen="home"]:not([hidden])) { background:#f4f8fe; box-shadow:none; }
.app-shell:has([data-screen="home"]:not([hidden])) .app-main { padding:14px 16px calc(14px + 69px + env(safe-area-inset-bottom)); }
[data-screen="home"] { display:flex; flex-direction:column; --home-gap:16px; gap:var(--home-gap); min-height:var(--home-workspace-height,calc(100dvh - 165px)); color:#183e68; }
.home-intro-zone,.home-owned-section { flex-shrink:0; min-height:max(0px,calc((var(--home-workspace-height,calc(100dvh - 165px)) - var(--home-gap) - var(--home-gap))/4)); }
.home-upcoming-section { flex-shrink:0; min-height:max(0px,calc((var(--home-workspace-height,calc(100dvh - 165px)) - var(--home-gap) - var(--home-gap))/2)); }
.home-intro-zone { display:flex; flex-direction:column; gap:8px; min-width:0; }
[data-screen="home"] .home-greeting { margin:0; font-size:clamp(1.25rem,5.1vw,1.5rem); font-weight:730; line-height:1.2; letter-spacing:-.025em; overflow-wrap:anywhere; }
.home-hero { display:flex; flex-direction:column; justify-content:center; flex:1; min-width:0; gap:8px; padding:12px; border:1px solid #c8dcf6; border-radius:13px; background:#e8f2fe; }
/* Approved growth steps and smooth arrow: decorative, behind existing content. */
.home-hero { position:relative; isolation:isolate; }
.home-hero::before { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:0; background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgMzYwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48cGF0aCBkPSJNMjQwIDM2MFYzMTVIMzk1VjI2NUg1NDVWMjA5SDY4NVYxNTFIODE1Vjk0SDkwMFYzNjBaIiBmaWxsPSIjOWNjMWU4IiBvcGFjaXR5PSIuMjAiLz48cGF0aCBkPSJNLTE1IDM0NUgxMzVWMzEySDI4OFYyNjBINDQwVjIwN0g1ODhWMTUxSDczNlY5NEg4OTJWMzkiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzc4YThkOCIgc3Ryb2tlLXdpZHRoPSI0IiBvcGFjaXR5PSIuMTkiLz48cGF0aCBkPSJNMzk1IDM2MFYzMTRINTQ1VjI2NUg2ODVWMjA5SDgxNVYxNTFIOTAwIiBmaWxsPSJub25lIiBzdHJva2U9IiM4OWIyZGUiIHN0cm9rZS13aWR0aD0iMyIgb3BhY2l0eT0iLjE1Ii8+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNzhhOGQ4IiBzdHJva2Utd2lkdGg9IjQuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMTkiPjxwYXRoIGQ9Ik04MiAxOTBDMjk4IDE4NSA0ODEgMTUxIDY0OSAxMDVDNzQ4IDc4IDgwNiA1OCA4NTIgMzIiLz48cGF0aCBkPSJNODE4IDM1TDg1MiAzMkw4MzMgNjIiLz48L2c+PC9zdmc+"); background-size:100% 100%; background-repeat:no-repeat; }
.home-hero > h1,.home-hero > .home-benefits-button { position:relative; z-index:1; }
[data-screen="home"] .home-hero h1 { margin:0; font-size:clamp(1.1875rem,4.9vw,1.5rem); font-weight:730; line-height:1.22; letter-spacing:-.02em; overflow-wrap:anywhere; }
.home-benefits-button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:44px; padding:8px 11px; border:0; border-radius:10px; background:#dcecff; color:#21689f; font-size:.9375rem; font-weight:700; line-height:1.2; text-align:left; }
.home-benefits-button span { flex:none; }
.home-benefits-icon { display:inline-flex; align-items:center; justify-content:center; width:1em; height:1em; }
.home-benefits-icon svg { display:block; width:100%; height:100%; }
.home-upcoming-section,.home-owned-section { display:flex; flex-direction:column; min-width:0; gap:8px; }
[data-screen="home"] .home-section-heading { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; margin:0; min-height:32px; }
[data-screen="home"] .home-section-heading h2 { margin:0; font-size:clamp(1.25rem,5.1vw,1.5rem); font-weight:730; line-height:1.2; letter-spacing:-.025em; }
[data-screen="home"] .home-section-heading > button,.home-more-link { min-height:44px; padding:5px 0; border:0; background:transparent; color:#226a9f; font-size:.875rem; font-weight:650; }
[data-screen="home"] .home-event-grid { display:flex; flex:1; min-height:0; margin:0; }
[data-screen="home"] .home-event-card { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; gap:8px; padding:10px; border:1px solid #c8dcf6; border-radius:13px; background:#fff; }
.home-event-art { display:block; flex:1 1 6rem; align-self:center; width:auto; max-width:100%; height:6rem; min-height:6rem; object-fit:contain; border-radius:9px; background:#edf4fc; }
.home-poster-empty { align-self:stretch; width:100%; }
.home-poster-empty { display:grid; place-items:center; color:#537391; font-size:.875rem; }
.home-event-copy { min-width:0; padding:0 2px; }
[data-screen="home"] .home-event-card h3 { margin:0 0 8px; font-size:1.125rem; font-weight:710; line-height:1.2; overflow-wrap:anywhere; }
.home-event-facts { display:grid; gap:4px; }
[data-screen="home"] .home-event-facts p { display:flex; align-items:flex-start; gap:8px; margin:0; color:#537391; font-size:.9375rem; line-height:1.25; overflow-wrap:anywhere; }
.home-event-facts svg { flex:none; width:20px; height:20px; color:#226a9f; }
[data-screen="home"] .home-event-card .coin-secondary { display:flex; align-items:center; justify-content:center; gap:10px; min-height:44px; margin:0; padding:8px 12px; background:#e4f1ff; color:#21689f; font-size:1rem; line-height:1.2; }
.home-ticket-list { display:flex; flex:1; min-width:0; }
.home-ticket-empty { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:6.5rem; padding:12px; border:1px solid #c8dcf6; border-radius:13px; background:#fff; color:#537391; text-align:center; }
.home-ticket-empty-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:10px; background:#edf4fc; }
.home-ticket-empty-icon svg { width:25px; height:25px; }
.home-ticket-empty p { margin:0; font-size:1rem; line-height:1.25; }
/* The ticket is a dark card «Ваш билет: тариф» with the way to its QR (owner 21.10.2026, package 3 sketch). */
.home-ticket-strip { display:flex; flex:1; flex-direction:column; justify-content:center; gap:12px; min-width:0; padding:14px 16px; border-radius:14px; background:#17324b; color:#fff; }
.home-ticket-copy { min-width:0; }
.home-ticket-copy small { display:block; margin-bottom:4px; color:#f2c76b; font-size:.875rem; font-weight:650; line-height:1.25; }
.home-ticket-copy h3 { margin:0; color:#fff; font-size:1.125rem; line-height:1.25; font-weight:700; overflow-wrap:anywhere; }
.home-ticket-copy p { margin:4px 0 0; font-size:.9375rem; line-height:1.35; color:#d2deea; overflow-wrap:anywhere; }
.home-ticket-copy .home-ticket-number { display:none; }
.home-ticket-actions { display:flex; gap:8px; }
.home-ticket-actions button { flex:1; min-height:44px; padding:8px 12px; border:0; border-radius:10px; background:#fff; color:#17324b; font-size:1rem; font-weight:650; line-height:1.2; }
.home-ticket-actions .home-ticket-save { display:none; background:transparent; color:#fff; box-shadow:inset 0 0 0 1px #6f8aa5; }
/* The kind sits at the end of the date line, so the card is no taller on a small iPhone. */
.home-event-kind { flex:none; margin-left:auto; padding:0 8px; border-radius:999px; background:#e4f1ff; color:#15598f; font-size:.8125rem; font-weight:650; line-height:1.45; }
.home-event-card.no-poster .home-event-copy { flex:1; }
.home-later-section { display:none; }
.home-ticket-controls { display:flex; align-items:center; gap:2px; }
.home-ticket-controls button { min-height:44px; min-width:44px; padding:4px; border:0; border-radius:8px; background:#e4f1ff; color:#21689f; font-size:1.125rem; }
.home-ticket-controls button:disabled { opacity:.4; cursor:default; }
.home-ticket-controls span { min-width:3rem; color:#537391; font-size:.75rem; text-align:center; }
.home-more-link { align-self:flex-end; margin:0; }
.home-empty { display:grid; place-items:center; flex:1; margin:0; min-height:6.5rem; padding:14px; border:1px solid #c8dcf6; border-radius:13px; background:#fff; color:#537391; font-size:1rem; text-align:center; }
/* With a ticket it comes first, under the greeting, and the banner shrinks to its one button (owner 20.10.2026, cabinet audit item 7). */
[data-screen="home"].has-tickets .home-intro-zone { display:contents; }
[data-screen="home"].has-tickets .home-greeting { order:0; }
[data-screen="home"].has-tickets .attendance-banner { order:1; }
[data-screen="home"].has-tickets .home-owned-section { order:2; min-height:0; }
[data-screen="home"].has-tickets .home-hero { order:3; flex:none; padding:0; border:0; background:none; }
[data-screen="home"].has-tickets .home-hero::before,[data-screen="home"].has-tickets .home-hero > h1 { display:none; }
[data-screen="home"].has-tickets .home-upcoming-section { order:4; }
.home-benefits-dialog { padding: 23px; }
.home-benefits-intro { margin: 14px 0; color: #58728d; font-size: 14px; line-height: 1.5; }
.home-benefits-list { display: grid; gap: 16px; padding-left: 22px; margin: 20px 0; }
.home-benefits-list li::marker { color: #3f73a1; font-weight: 700; }
.home-benefits-list h3 { margin: 0 0 5px; color: #153e64; font-size: 17px; }
.home-benefits-list p, .home-benefits-tools p, .home-membership-note { margin: 0; color: #58728d; font-size: 14px; line-height: 1.5; }
.home-benefits-tools { display: grid; gap: 10px; padding: 15px; border-radius: 10px; background: #eef6ff; }
.home-membership-note { margin: 15px 0; font-size: 12px; }
.home-benefits-dialog > .save-profile { width: 100%; }

@media (max-width:429px) {
  .home-hero { padding-block:10px; }
  .home-ticket-actions button { min-width:0; overflow-wrap:anywhere; }
}

@media (max-width:360px) {
  .app-shell:has([data-screen="home"]:not([hidden])) .app-main { padding-inline:12px; }
  [data-screen="home"] .home-section-heading h2 { font-size:1.1875rem; }
  [data-screen="home"] .home-section-heading > button { font-size:.8125rem; }
}
@media (min-width:900px) {
  .app-shell:has([data-screen="home"]:not([hidden])) { width:100%; }
  .app-shell:has([data-screen="home"]:not([hidden])) .app-header { min-height:76px; padding-inline:max(28px,calc((100% - 1100px)/2)); }
  .app-shell:has([data-screen="home"]:not([hidden])) .app-main { max-width:1156px; margin:0 auto; padding:24px 28px; }
  .app-shell:has([data-screen="home"]:not([hidden])) .bottom-nav { top:0; bottom:auto; width:440px; min-height:76px; padding:0; border:0; background:transparent; box-shadow:none; }
  .app-shell:has([data-screen="home"]:not([hidden])) .bottom-nav button { position:relative; flex-direction:row; gap:8px; min-height:76px; color:#537391; font-size:1rem; }
  .app-shell:has([data-screen="home"]:not([hidden])) .bottom-nav button[aria-current="page"] { color:#21689f; }
  .app-shell:has([data-screen="home"]:not([hidden])) .bottom-nav button[aria-current="page"]::after { content:''; position:absolute; bottom:12px; left:12px; right:12px; height:3px; border-radius:3px; background:#21689f; }
  [data-screen="home"] { --home-gap:20px; }
  [data-screen="home"] .home-greeting { font-size:1.875rem; }
  .home-hero { padding:18px 24px; }
  [data-screen="home"] .home-hero h1 { font-size:1.75rem; }
  .home-benefits-button { max-width:35rem; font-size:1.125rem; }
  [data-screen="home"] .home-section-heading h2 { font-size:1.75rem; }
  [data-screen="home"] .home-event-card { display:grid; grid-template-columns:fit-content(45%) minmax(0,1fr); grid-template-rows:1fr auto; align-items:center; column-gap:24px; padding:14px; }
  .home-event-art { grid-row:1/-1; justify-self:center; width:auto; max-width:100%; height:clamp(8rem,30dvh,22rem); min-height:6rem; }
  .home-poster-empty { width:clamp(12rem,30vw,24rem); }
  [data-screen="home"] .home-event-card h3 { font-size:1.625rem; }
  [data-screen="home"] .home-event-facts p { font-size:1.125rem; }
  .home-event-kind { align-self:center; margin-left:4px; }
  .home-ticket-strip { gap:16px; padding:22px 24px; }
  .home-ticket-copy h3 { font-size:1.375rem; }
  .home-ticket-copy p { font-size:1rem; }
  .home-ticket-copy .home-ticket-number { display:block; margin-top:8px; }
  .home-ticket-actions { flex-wrap:wrap; }
  .home-ticket-actions button { flex:0 1 auto; padding-inline:18px; }
  .home-ticket-actions .home-ticket-save { display:block; }
  /* On a computer the ticket and the nearest event stand side by side, the banner button and the next events follow
     (owner 21.10.2026, package 3 sketch, items 22–25). */
  [data-screen="home"].has-tickets { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-content:start; column-gap:24px; }
  [data-screen="home"].has-tickets > *,[data-screen="home"].has-tickets .home-intro-zone > * { grid-column:1/-1; }
  [data-screen="home"].has-tickets .home-owned-section { grid-column:1; }
  [data-screen="home"].has-tickets .home-upcoming-section { grid-column:2; order:4; min-height:0; }
  [data-screen="home"].has-tickets .home-hero { order:5; }
  [data-screen="home"].has-tickets .home-event-card { display:flex; flex-direction:column; align-items:stretch; }
  [data-screen="home"].has-tickets .home-section-heading { min-height:44px; }
  [data-screen="home"].has-tickets .home-event-art { height:8rem; min-height:6rem; }
  [data-screen="home"].has-tickets .home-event-card h3 { font-size:1.375rem; }
  [data-screen="home"].has-tickets .home-event-facts p { font-size:1rem; }
  [data-screen="home"].has-tickets .home-later-section:not([hidden]) { display:flex; flex-direction:column; gap:12px; order:6; }
  .home-later-section h2 { margin:0; font-size:1.375rem; font-weight:730; }
  .home-later-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
  .home-later-card { display:grid; align-content:start; gap:4px; padding:16px; border:1px solid #c8dcf6; border-radius:13px; background:#fff; color:#183e68; font:inherit; text-align:left; cursor:pointer; }
  .home-later-card small { color:#15598f; font-size:.875rem; font-weight:650; }
  .home-later-card strong { font-size:1.0625rem; line-height:1.3; overflow-wrap:anywhere; }
  .home-later-card span { color:#537391; font-size:.9375rem; }
}
@media (min-width:900px) and (max-width:1100px) {
  .app-shell:has([data-screen="home"]:not([hidden])) .bottom-nav { left:57%; width:400px; }
  .app-shell:has([data-screen="home"]:not([hidden])) .bottom-nav button { font-size:.875rem; gap:6px; }
}
/* Owner 22.10.2026: a forum ticket leads back to the forum landing, beside «Показать QR». */
.home-ticket-actions .home-ticket-landing { display:flex; flex:1; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:8px 12px; border-radius:10px; color:#fff; font-size:1rem; font-weight:650; line-height:1.2; text-align:center; text-decoration:none; white-space:nowrap; box-shadow:inset 0 0 0 1px #6f8aa5; }
/* On a computer, beside «Показать QR» and «Скачать билет картинкой», the landing is a plain link. */
@media (min-width: 900px) { .home-ticket-actions .home-ticket-landing { flex:0 1 auto; padding-inline:2px; color:#d2deea; box-shadow:none; text-decoration:underline; text-underline-offset:3px; } }
