:root {
  color: #f8f5ff;
  background: #080c1e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100dvh; margin: 0; background: #080c1e; }
button, input, select, textarea { font: inherit; }

.mini-app {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: #171134;
}
.video-background, .video-background::after { position: absolute; inset: 0; }
.video-background { z-index: 0; background: radial-gradient(circle at 20% 12%, #44318d 0, #16112f 46%, #080b1b 100%); }
.video-background::after { z-index: 1; content: ""; background: linear-gradient(180deg, rgba(6, 8, 24, .36), rgba(8, 9, 28, .82) 75%); }
.background-video { display: block; position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.background-video.is-active { opacity: 1; }
.app-header, .view { position: relative; z-index: 2; }
.app-header { display: flex; align-items: center; gap: 10px; margin-bottom: 42px; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid rgba(255,255,255,.45); border-radius: 13px; color: #fff; background: rgba(126, 93, 213, .76); box-shadow: 0 5px 20px rgba(6, 5, 35, .3); font-size: 20px; }
.brand-name { margin: 0; color: #fff; font-weight: 760; letter-spacing: -.015em; }
.brand-note { margin: 2px 0 0; color: rgba(240, 236, 255, .72); font-size: .78rem; }
.header-actions { display: flex; gap: 6px; margin-left: auto; }
.about-link, .profile-link { padding: 8px 9px; border: 1px solid rgba(238, 232, 255, .36); border-radius: 10px; color: #f5f1ff; background: rgba(18, 15, 50, .45); cursor: pointer; font-size: .72rem; font-weight: 700; }
.about-link:hover, .about-link:focus-visible, .profile-link:hover, .profile-link:focus-visible { border-color: #d9ccff; background: rgba(69, 52, 126, .65); outline: none; }
.view { animation: appear .22s ease-out; }
.is-hidden { display: none !important; }
.eyebrow { margin: 0 0 9px; color: #d5c7ff; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; max-width: 12ch; color: #fff; font-size: clamp(1.84rem, 9vw, 2.45rem); line-height: 1.08; letter-spacing: -.046em; text-shadow: 0 2px 16px rgba(0, 0, 0, .3); }
.lead { margin: 18px 0 27px; color: rgba(247,244,255,.88); font-size: .98rem; line-height: 1.52; text-shadow: 0 1px 9px rgba(0,0,0,.35); }
.choice-list { display: grid; gap: 10px; }
.choice-button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; padding: 16px 15px 16px 18px; border: 1px solid rgba(233, 225, 255, .32); border-radius: 16px; color: #fff; background: rgba(18, 15, 50, .67); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); text-align: left; cursor: pointer; box-shadow: 0 5px 18px rgba(0, 0, 0, .16); transition: border-color .16s, transform .16s, background .16s; }
.choice-button:not(:disabled):hover, .choice-button:not(:disabled):focus-visible { border-color: #d3c5ff; transform: translateY(-1px); background: rgba(52, 39, 103, .82); outline: none; }
.choice-title { font-size: .98rem; font-weight: 720; line-height: 1.25; }
.choice-description { display: block; margin-top: 5px; color: rgba(234,229,248,.77); font-size: .77rem; font-weight: 500; line-height: 1.35; }
.choice-meta { flex: 0 0 auto; color: #d5c9f7; font-size: .75rem; text-align: right; }
.choice-button:not(:disabled) .choice-meta { color: #e5dcff; font-weight: 700; }
.choice-button:disabled { opacity: .67; cursor: not-allowed; }
.disclaimer { margin: 25px 2px 0; color: rgba(234,230,245,.7); font-size: .76rem; line-height: 1.45; }
.back-button { margin: 0 0 27px; padding: 0; border: 0; color: #eee9ff; background: transparent; cursor: pointer; font-size: .91rem; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.back-button:hover, .back-button:focus-visible { text-decoration: underline; outline: none; }

.info-view h1 { max-width: 13ch; }
.info-card, .project-notice { margin-top: 15px; padding: 18px; border: 1px solid rgba(230,224,255,.3); border-radius: 17px; background: rgba(16, 13, 44, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.info-card h2, .project-notice h2 { margin: 0 0 10px; color: #fff; font-size: 1.04rem; letter-spacing: -.01em; }
.info-card p, .project-notice p { margin: 0 0 11px; color: rgba(245,241,255,.9); font-size: .91rem; line-height: 1.52; }
.info-card p:last-child, .project-notice p:last-child { margin-bottom: 0; }
.tradition-summary { display: grid; gap: 10px; margin: 13px 0 0; padding: 0; list-style: none; }
.tradition-summary li { padding-left: 15px; border-left: 2px solid #9d83f2; color: rgba(245,241,255,.9); font-size: .89rem; line-height: 1.45; }
.tradition-summary strong { color: #fff; }
.project-notice { border-color: rgba(206,188,255,.52); background: rgba(66, 43, 122, .64); }
.sources-details { margin: 17px 2px 5px; color: rgba(236,231,251,.86); font-size: .78rem; line-height: 1.45; }
.sources-details summary { cursor: pointer; color: #efe9ff; font-weight: 700; }
.sources-details p { margin: 9px 0 0; }
.info-tabs { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; margin: 20px 0 2px; padding: 4px; border: 1px solid rgba(230,224,255,.24); border-radius: 14px; background: rgba(14, 12, 39, .58); }
.info-tab { min-height: 42px; padding: 8px 10px; border: 0; border-radius: 10px; color: rgba(244,240,255,.82); background: transparent; font: inherit; font-size: .77rem; font-weight: 700; line-height: 1.2; cursor: pointer; }
.info-tab.is-active { color: #fff; background: rgba(119, 83, 220, .72); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.info-tab:focus-visible { outline: 2px solid #e1d7ff; outline-offset: 2px; }
.catalog-intro-card { margin-top: 15px; }
.method-catalog-content { margin-top: 15px; }
.catalog-policy { padding: 16px; border: 1px solid rgba(206,188,255,.42); border-radius: 16px; color: rgba(245,241,255,.89); background: rgba(51, 35, 100, .62); font-size: .86rem; line-height: 1.48; }
.catalog-policy p { margin: 0; }
.catalog-policy ul { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.catalog-policy li { display: grid; gap: 2px; padding-left: 11px; border-left: 2px solid #a88cff; }
.catalog-policy li span { color: rgba(239,233,255,.76); font-size: .78rem; }
.catalog-tradition { margin-top: 25px; }
.catalog-tradition h2 { margin: 0 2px 11px; color: #fff; font-size: 1.12rem; line-height: 1.25; }
.direction-catalog-card { margin-top: 11px; padding: 16px; border: 1px solid rgba(230,224,255,.3); border-radius: 17px; background: rgba(16, 13, 44, .73); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.direction-catalog-card.status-research_reserve { border-color: rgba(214, 189, 255, .38); background: rgba(26, 20, 51, .72); }
.direction-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.catalog-kicker { margin: 0 0 4px; color: #cfc2fa; font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.direction-card-heading h3 { margin: 0; color: #fff; font-size: 1rem; line-height: 1.22; }
.catalog-status { max-width: 120px; padding: 5px 7px; border-radius: 9px; color: #e8e0ff; background: rgba(104, 72, 184, .48); font-size: .67rem; font-weight: 700; line-height: 1.2; text-align: right; }
.catalog-source-label { margin: 10px 0; color: rgba(244,240,255,.8); font-size: .81rem; line-height: 1.42; }
.catalog-sources { color: #ded5ff; font-size: .78rem; line-height: 1.42; }
.catalog-sources summary { cursor: pointer; font-weight: 700; }
.catalog-sources ul { display: grid; gap: 7px; margin: 10px 0 0; padding-left: 17px; }
.catalog-sources a { color: #ddd0ff; }
.catalog-source-note { display: block; margin-top: 3px; color: rgba(229,220,255,.69); font-size: .72rem; line-height: 1.35; }
.catalog-scenarios-title { margin: 16px 0 8px; color: #fff; font-size: .81rem; font-weight: 800; }
.method-scenarios { display: grid; gap: 7px; }
.method-card { border: 1px solid rgba(230,224,255,.19); border-radius: 12px; background: rgba(65, 46, 119, .32); overflow: hidden; }
.method-card summary { padding: 12px; color: #f9f6ff; font-size: .86rem; font-weight: 750; cursor: pointer; }
.method-card > p { margin: 0; padding: 0 12px 13px; color: rgba(246,242,255,.86); font-size: .79rem; line-height: 1.45; }
.method-card > .catalog-method-status { padding-bottom: 6px; color: #d9cbff; font-weight: 750; }
.method-card dl { display: grid; gap: 9px; margin: 0; padding: 0 12px 13px; }
.method-card dl div { display: grid; gap: 2px; }
.method-card dt { color: #cfc2fa; font-size: .67rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.method-card dd { margin: 0; color: rgba(246,242,255,.86); font-size: .79rem; line-height: 1.4; }
.catalog-reserve, .catalog-loading { margin: 11px 0 0; color: rgba(238,230,255,.76); font-size: .82rem; line-height: 1.45; }

.profile-card { padding: 18px; border: 1px solid rgba(230,224,255,.36); border-radius: 18px; background: rgba(18, 15, 48, .77); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.profile-card h2 { margin: 0 0 10px; color: #fff; font-size: 1.05rem; }
.profile-card p { margin: 8px 0; color: rgba(240,236,251,.9); font-size: .9rem; line-height: 1.45; }
.profile-card strong { color: #fff; }
.profile-actions { display: grid; gap: 9px; margin-top: 16px; }
.secondary-button, .danger-button { min-height: 42px; border: 1px solid rgba(226,217,248,.38); border-radius: 11px; color: #f7f3ff; background: rgba(77, 59, 138, .58); cursor: pointer; font-weight: 700; }
.danger-button { color: #ffd3de; border-color: rgba(255,173,198,.42); background: rgba(128, 45, 77, .42); }
.profile-privacy { margin: 15px 2px 0; color: rgba(230,223,246,.7); font-size: .75rem; line-height: 1.45; }

.forecast-form { display: grid; gap: 16px; padding: 19px; border: 1px solid rgba(230,224,255,.36); border-radius: 18px; background: rgba(18, 15, 48, .77); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.forecast-form label { display: grid; gap: 7px; color: #f1edff; font-size: .85rem; font-weight: 700; }
.forecast-form input:not([type="checkbox"]), .forecast-form select, .forecast-form textarea { width: 100%; height: 44px; padding: 0 11px; border: 1px solid rgba(221,213,247,.53); border-radius: 10px; color: #272131; background: rgba(255,255,255,.95); }
.forecast-form textarea { height: auto; min-height: 96px; padding-top: 10px; resize: vertical; }
.forecast-form input:focus, .forecast-form select:focus, .forecast-form textarea:focus { border-color: #9e83fb; outline: 3px solid rgba(184,164,255,.33); }
.birth-picker-field { display: grid; gap: 7px; color: #f1edff; font-size: .85rem; font-weight: 700; }
.birth-picker { display: grid; }
.birth-picker-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 44px; padding: 0 13px; border: 1px solid rgba(221,213,247,.53); border-radius: 10px; color: #272131; background: rgba(255,255,255,.95); cursor: pointer; font-weight: 700; text-align: left; }
.birth-picker-trigger:focus-visible { border-color: #9e83fb; outline: 3px solid rgba(184,164,255,.33); }
.birth-picker-panel { overflow: hidden; margin-top: 4px; border-radius: 12px; color: #1c1930; background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.3); }
.birth-picker-header { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(52px, .65fr) minmax(52px, .65fr); align-items: center; min-height: 43px; border-bottom: 1px solid #dfdbe8; background: #f7f6fa; }
.month-navigation { display: grid; grid-template-columns: minmax(0, 1fr) 67px; gap: 4px; padding: 0 7px; }
.month-navigation select { width: 100%; min-width: 0; height: 30px; padding: 0 3px; border: 1px solid #ded9e8; border-radius: 7px; color: #302b42; background: #fff; font: inherit; font-size: .72rem; font-weight: 700; }
.time-headings { display: contents; }
.time-headings span { padding: 0 4px; color: #554f68; font-size: .7rem; font-weight: 800; text-align: center; }
.birth-picker-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(52px, .65fr) minmax(52px, .65fr); height: 270px; min-height: 0; }
.calendar-section { padding: 8px 7px; border-right: 1px solid #dfdbe8; }
.weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.weekdays { margin-bottom: 4px; color: #6b6579; font-size: .66rem; font-weight: 700; }
.calendar-days { gap: 2px; }
.calendar-days button { aspect-ratio: 1; min-width: 0; min-height: 34px; padding: 0; border: 1px solid transparent; border-radius: 6px; color: #242033; background: transparent; cursor: pointer; font-size: .75rem; }
.calendar-days button:hover, .calendar-days button:focus-visible { border-color: #7a5adb; outline: none; }
.calendar-days button.is-selected, .time-list button.is-selected { color: #fff; border-color: #176ee5; background: #176ee5; }
.calendar-days button.is-empty { cursor: default; pointer-events: none; }
.time-list { display: grid; min-height: 0; grid-auto-rows: 42px; overflow-y: auto; overscroll-behavior: contain; padding: 5px 4px; border-right: 1px solid #dfdbe8; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.time-list:last-child { border-right: 0; }
.time-list button { border: 1px solid transparent; border-radius: 6px; color: #242033; background: transparent; cursor: pointer; font-size: .78rem; }
.time-list button:hover, .time-list button:focus-visible { border-color: #7a5adb; outline: none; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { color: rgba(228,221,249,.76); font-size: .74rem; font-weight: 500; line-height: 1.35; }
.place-suggestions { overflow: hidden; margin-top: -8px; border: 1px solid rgba(224,216,251,.46); border-radius: 12px; background: rgba(10, 8, 34, .94); box-shadow: 0 12px 28px rgba(0,0,0,.26); }
.place-option { display: grid; width: 100%; gap: 3px; padding: 11px 13px; border: 0; border-bottom: 1px solid rgba(232,225,250,.15); color: #fff; background: transparent; cursor: pointer; text-align: left; }
.place-option:last-child { border-bottom: 0; }
.place-option:hover, .place-option:focus-visible { background: rgba(113,83,206,.36); outline: none; }
.place-option span { font-size: .9rem; font-weight: 700; }
.place-option small { color: rgba(230,223,248,.75); font-size: .75rem; }
.place-status { margin: 0; padding: 12px 13px; color: rgba(235,228,250,.82); font-size: .8rem; line-height: 1.4; }
.selected-place { margin: -6px 0 0; color: #d9ccff; font-size: .78rem; line-height: 1.4; }
.manual-place { color: rgba(237,232,250,.84); font-size: .8rem; line-height: 1.45; }
.manual-place summary { cursor: pointer; color: #e6ddff; font-weight: 700; }
.manual-place p { margin: 9px 0 12px; }
.manual-place[open] { padding: 12px; border: 1px solid rgba(222,213,247,.3); border-radius: 12px; background: rgba(8, 7, 28, .28); }
.manual-place[open] > label, .manual-place[open] .two-fields { margin-top: 12px; }
.geo-attribution { margin: -7px 0 0; color: rgba(225,218,244,.68); font-size: .68rem; }
.geo-attribution a { color: #d9ccff; }
.forecast-form .check-label { grid-template-columns: 18px 1fr; align-items: center; gap: 8px; color: #e7e1fa; font-weight: 500; }
.check-label input { width: 17px; height: 17px; accent-color: #9b7af0; }
.form-step { display: grid; gap: 14px; }
.form-step.is-hidden { display: none; }
.profile-save-note { margin: 2px 0 -2px; color: rgba(226,219,247,.81); font-size: .77rem; font-weight: 500; line-height: 1.4; }
.step-title { margin: 0 0 -2px; color: #f5f1ff; font-size: 1rem; font-weight: 750; }
.text-button { justify-self: start; padding: 3px 0; border: 0; color: #d9ccff; background: transparent; cursor: pointer; font: inherit; font-size: .79rem; font-weight: 700; }
.text-button:hover, .text-button:focus-visible { color: #fff; text-decoration: underline; outline: none; }
.primary-button { min-height: 48px; border: 1px solid rgba(255,255,255,.34); border-radius: 12px; color: #fff; background: #7454d3; cursor: pointer; box-shadow: 0 5px 18px rgba(41,21,105,.35); font-weight: 750; }
.primary-button:hover, .primary-button:focus-visible { background: #6441c6; outline: none; }
.primary-button:disabled { opacity: .65; cursor: wait; }
.result { margin-top: 18px; padding: 18px; border: 1px solid rgba(224,216,251,.36); border-radius: 18px; background: rgba(14, 11, 38, .84); backdrop-filter: blur(13px); -webkit-backdrop-filter: blur(13px); }
.result h2 { margin: 0 0 12px; color: #fff; font-size: 1.15rem; }
.result p { color: #e7e2f4; line-height: 1.5; }
.provenance-card { display: grid; gap: 4px; margin-bottom: 16px; padding: 12px; border: 1px solid rgba(224,216,251,.32); border-radius: 12px; font-size: .8rem; line-height: 1.45; }
.provenance-card strong { color: #fff; font-size: .86rem; }
.provenance-card span { color: rgba(236,232,248,.84); }
.source-core { border-color: rgba(133,220,191,.5); background: rgba(40,119,90,.22); }
.algorithmic-module { border-color: rgba(177,154,247,.48); background: rgba(79,57,144,.25); }
.forecast-summary > p { margin: 0; color: rgba(231,226,244,.82); font-size: .87rem; }
.summary-list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.summary-list li { padding: 12px; border-radius: 11px; color: #f5f1ff; background: rgba(122,90,219,.18); font-size: .92rem; line-height: 1.48; }
.summary-list li span { color: #d9ccff; font-weight: 800; }
.annual-summary-intro { color: rgba(231,226,244,.72) !important; }
.forecast-details { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(231,225,251,.24); }
.forecast-details > summary { cursor: pointer; color: #d8ccff; font-size: .92rem; font-weight: 800; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; padding: 18px 24px 28px; color: rgba(231,226,244,.72); font-size: .82rem; text-align: center; }
.site-footer a { color: #d8ccff; font-weight: 800; }
.detail-notice { margin: 12px 0 0; color: rgba(231,226,244,.71) !important; font-size: .77rem; }
.forecast-item { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(231,225,251,.2); }
.forecast-item h3 { margin: 0 0 5px; color: #fff; font-size: 1rem; }
.forecast-item p { margin: 0; font-size: .91rem; }
.rule-id { display: inline-block; margin-top: 7px; color: #c9bfe4; font-size: .75rem; }
.rule-explanation { margin-top: 12px; color: rgba(234,229,248,.82); font-size: .9rem; }
.rule-explanation summary { cursor: pointer; color: #d8ccff; font-weight: 700; }
.rule-explanation p { margin: 10px 0 0; }
.source-basis-list { margin: 10px 0 0; padding-left: 18px; color: rgba(234,229,248,.78); font-size: .83rem; line-height: 1.5; }
.source-basis-list li + li { margin-top: 8px; }
.source-basis-list a { color: inherit; text-decoration: underline; }
.error { color: #ffb5cc !important; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 620px) {
  body { display: grid; place-items: center; padding: 18px; }
  .mini-app { min-height: min(900px, calc(100dvh - 36px)); border: 1px solid rgba(214,204,255,.25); border-radius: 32px; box-shadow: 0 24px 75px rgba(0,0,0,.5); }
}
@media (prefers-reduced-motion: reduce) {
  .background-video { display: none; }
  .view { animation: none; }
}
.calendar-period-list { list-style: none; margin: 1rem 0; padding: 0; }
.calendar-period-list > li { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.calendar-period-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.calendar-period-dates dt { font-size: .8rem; font-weight: 600; margin-bottom: .5rem; }
.calendar-period-dates dd { margin: 0; overflow-wrap: anywhere; }
.forecast-item pre { white-space: pre-wrap; overflow-wrap: anywhere; }
