.birth-page {
  --entry-ink: #34293c;
  --entry-plum: #503a60;
  --entry-muted: #6b5e6b;
  --entry-rule: #ded4df;
  --entry-red: #a03b48;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 2rem) 0 clamp(2rem, 5vw, 4.2rem);
  color: var(--entry-ink);
}
.birth-page [hidden] { display: none !important; }
.birth-layout {
  display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(0, .86fr);
  grid-template-areas: "cover cover" "form aside"; gap: clamp(1rem, 2vw, 1.6rem) clamp(1.1rem, 2.5vw, 2.2rem); align-items: start;
}
.birth-cover {
  grid-area: cover; position: relative; isolation: isolate; display: grid; align-items: center;
  min-height: clamp(185px, 18vw, 238px); overflow: hidden;
  border-radius: 22px; background: #34283e; color: #fff8f4;
}
.birth-cover-art { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 75%; height: 100%; object-fit: cover; object-position: 65% center; }
.birth-cover::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #34283e 18%, #34283ef2 31%, #34283e93 55%, transparent 78%); }
.birth-cover-copy { width: min(72%, 42rem); padding: clamp(1.3rem, 3vw, 2.4rem) clamp(1.5rem, 4vw, 3.6rem); }
.birth-cover-label, .birth-cover-copy > p:last-child { margin: 0; }
.birth-cover-label { display: flex; align-items: center; gap: .55rem; color: #f6c5aa; font-size: .84rem; font-weight: 650; letter-spacing: .01em; }
.birth-cover-label::before { content: ""; width: 1.35rem; height: 1px; background: currentColor; }
.birth-cover h1 {
  color: #fff9f3; margin: .4rem 0; font: 590 clamp(2.35rem, 4.4vw, 3.8rem)/1.2 var(--font-ui);
  letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere;
}
.birth-cover-copy > p:last-child { color: #f0e7ef; font-size: clamp(.9rem, 1.4vw, 1.02rem); line-height: 1.65; }
.birth-form { grid-area: form; min-width: 0; }
.birth-side { grid-area: aside; min-width: 0; }
.birth-entry, .birth-submit-row { padding-inline: clamp(1.25rem, 3vw, 2.3rem); }
.birth-entry {
  display: flow-root; min-width: 0; padding-top: clamp(1.25rem, 2.6vw, 2rem);
  border: 1px solid var(--entry-rule); border-bottom: 0; border-radius: 20px 20px 0 0; background: #fffdfc;
}
.birth-entry h2 { margin: 0; color: var(--entry-ink); font: 630 clamp(1.28rem, 2.15vw, 1.75rem)/1.4 var(--font-ui); letter-spacing: -.04em; }
.birth-intro { margin: .3rem 0 1.35rem; color: var(--entry-muted); font-size: .89rem; line-height: 1.65; }
.birth-entry fieldset { min-width: 0; margin: 0 0 .95rem; padding: 0; border: none; }
.birth-entry legend { margin-bottom: .42rem; padding: 0; font-size: .91rem; font-weight: 700; color: var(--entry-ink); }
.birth-cal-layout, .birth-time-fields { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .85rem; }
.birth-segment { display: inline-flex; padding: 3px; border-radius: 28px; background: #eee8ee; }
.birth-segment label { position: relative; cursor: pointer; }
.birth-segment input, .birth-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.birth-segment span { display: grid; place-items: center; min-width: 5.4rem; min-height: 42px; padding: .2rem .9rem; border-radius: 24px; color: #635764; font-size: .92rem; }
.birth-segment input:checked + span { color: #fffaf7; background: var(--entry-plum); font-weight: 650; }
.birth-page :is(input, a, summary, button):focus-visible, .birth-segment input:focus-visible + span { outline: 2px solid #7e538a; outline-offset: 3px; }
.birth-check { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-size: .89rem; cursor: pointer; }
.birth-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--entry-plum); }
.birth-date-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: .5rem; }
.birth-date-fields label { position: relative; min-width: 0; }
.birth-date-fields label > span:last-child { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); font-size: .86rem; color: var(--entry-muted); pointer-events: none; }
.birth-date-fields input, .birth-time-fields input[type=time] {
  min-width: 0; height: 48px; padding: .45rem .8rem; border: 1px solid #bcb2bf; border-radius: 10px;
  background: #fffdfd; color: var(--entry-ink); font-family: inherit; font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums;
}
.birth-date-fields input { width: 100%; padding-right: 1.85rem; }
.birth-date-fields input::placeholder { color: #857b85; }
.birth-time-fields input[type=time] { width: min(100%, 10rem); }
.birth-time-fields input:disabled { color: #817682; border-color: #d8d0da; background: #f1edef; }
.birth-form [aria-invalid=true] { border-color: var(--entry-red); }
.birth-help, .birth-error { margin: .38rem 0 0; color: var(--entry-muted); font-size: .8rem; line-height: 1.65; }
.birth-error { color: var(--entry-red); font-weight: 650; }
.birth-submit-row {
  display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center;
  padding-block: .1rem clamp(1.2rem, 2.5vw, 2rem); border: 1px solid var(--entry-rule); border-top: 0;
  border-radius: 0 0 20px 20px; background: #fffdfc;
}
.birth-primary {
  display: flex; flex: 1; align-items: center; justify-content: space-between; gap: .6rem; min-height: 51px; padding: .65rem 1.15rem;
  border: 0; border-radius: 12px; color: #fffaf7; background: var(--entry-plum); font: inherit; font-size: .98rem; font-weight: 650;
}
.birth-primary:hover { background: #62476d; }
.birth-primary::after { content: "→"; color: #ffd7bc; font-size: 1.3rem; line-height: 1; }
.birth-text-button { min-height: 44px; padding: .2rem; color: var(--entry-ink); border: 0; background: transparent; font: inherit; text-decoration: underline; text-underline-offset: .25em; }
.birth-register {
  min-width: 0; overflow: hidden;
  border: 1px solid #d5c6d9; border-radius: 20px; color: var(--entry-ink); background: #eee7ef;
}
.birth-register-heading {
  display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .6rem; min-height: 60px;
  list-style: none; cursor: pointer; padding: clamp(1.1rem, 2.8vw, 1.8rem);
}
.birth-register-heading::-webkit-details-marker { display: none; }
.birth-register-heading::after { content: ""; width: 8px; height: 8px; border: solid #68596d; border-width: 0 1.5px 1.5px 0; margin-left: auto; transform: translateY(-2px) rotate(45deg); }
.birth-register[open] .birth-register-heading::after { transform: translateY(2px) rotate(225deg); }
.birth-register summary:focus-visible { outline-offset: -4px; }
.birth-register-heading h2 { margin: 0; font: 620 clamp(1.2rem, 2vw, 1.55rem)/1.4 var(--font-ui); letter-spacing: -.045em; }
.birth-chart-day { color: #634f6b; font-size: .79rem; font-weight: 650; }
.birth-chart-day:empty { display: none; }
.birth-register-body { padding: 0 clamp(1rem, 2.6vw, 1.8rem) clamp(1.1rem, 2.4vw, 1.65rem); }
.birth-register dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(3px,.6vw,8px); margin: 0; }
.birth-register dl > div { min-width: 0; text-align: center; padding: .85rem .15rem; background: #faf6f9; border-radius: 9px; }
.birth-register dt { color: #68596d; font-size: .78rem; font-weight: 650; }
.birth-register dd { display: flex; flex-direction: column; align-items: center; justify-content: space-between; margin: .7rem 0 0; gap: .4rem; font-size: .86rem; }
.birth-glyph { display: grid; place-items: center; width: 100%; min-height: 3em; max-width: 1.15em; font: 500 clamp(1.65rem, 2.7vw, 2.2rem)/1.2 var(--font-ui); color: #4c3c55; overflow-wrap: anywhere; }
.birth-glyph.alternate { max-width: 3.1em; font-size: clamp(.95rem, 1.65vw, 1.25rem); line-height: 1.45; }
.birth-register .unfilled .birth-glyph { color: #887b8c; }
.birth-register .birth-day-column { background: var(--entry-plum); color: #fff4ee; }
.birth-day-column dt, .birth-day-column .birth-glyph, .birth-day-column .unfilled .birth-glyph { color: #ffdbc6; }
.birth-register [data-preview-note] { margin: 1rem 0 0; color: #65566a; font-size: .83rem; line-height: 1.7; }
.birth-profile {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem;
  padding: 1.05rem clamp(.4rem, 1.5vw, 1.3rem); margin-top: .85rem; border-top: 1px solid var(--entry-rule);
}
.birth-profile h2 { margin: 0; color: var(--entry-ink); font-size: 1.02rem; line-height: 1.45; }
.birth-profile-copy p, .birth-confirm p, .birth-status { margin: .2rem 0 0; color: var(--entry-muted); font-size: .84rem; line-height: 1.65; }
.birth-profile-actions, .birth-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.birth-profile button { min-height: 44px; padding: .4rem .85rem; border: 1px solid #c8bacb; border-radius: 20px; color: var(--entry-ink); background: #fbf8fa; font-size: .86rem; }
.birth-profile button:hover { background: #ede5ef; }
.birth-confirm, .birth-status { flex-basis: 100%; }
.birth-confirm [data-confirm-delete] { border-color: #c98d94; color: var(--entry-red); }
.birth-status:empty { display: none; }
@media (max-width: 760px) {
  .birth-page { padding-top: .85rem; }
  .birth-layout { grid-template-columns: minmax(0,1fr); grid-template-areas: "cover" "form" "aside"; gap: .75rem; }
  .birth-cover { min-height: clamp(150px, 34vw, 210px); border-radius: 16px; }
  .birth-cover-copy { width: min(79%, 28rem); padding: 1.1rem 1.2rem; }
  .birth-cover-art { width: 83%; object-position: 65% center; }
  .birth-cover::before { background: linear-gradient(90deg, #34283e 5%, #34283ee8 30%, #34283e8a 60%, transparent 87%); }
  .birth-cover-label { font-size: .77rem; }
  .birth-cover h1 { margin: .38rem 0; font-size: clamp(1.95rem, 7vw, 2.9rem); }
  .birth-cover-copy > p:last-child { font-size: .84rem; line-height: 1.65; }
  .birth-entry { padding: 1.1rem 1rem 0; border-radius: 16px 16px 0 0; }
  .birth-intro { margin-bottom: 1rem; font-size: .83rem; }
  .birth-entry fieldset { margin-bottom: .9rem; }
  .birth-entry legend { margin-bottom: .3rem; }
  .birth-submit-row { padding: .2rem 1rem 1.1rem; border-radius: 0 0 16px 16px; }
  .birth-register { border-radius: 16px; }
  .birth-register-heading { min-height: 54px; padding: .9rem 1rem; }
  .birth-register-body { padding: 0 1rem 1rem; }
  .birth-register dl > div { padding-block: .5rem; }
  .birth-register dd { margin-top: .2rem; gap: .12rem; }
  .birth-glyph { display: inline-block; max-width: none; min-height: 1.65em; font-size: clamp(1.25rem, 5vw, 1.65rem); line-height: 1.65; }
  .birth-glyph.alternate { max-width: none; }
  .birth-register [data-preview-note] { margin-top: .55rem; }
  .birth-profile { margin-top: .8rem; }
}
@media (max-width: 370px) {
  .birth-cover-copy { width: 84%; padding: 1rem; }
  .birth-date-fields { gap: .32rem; }
  .birth-date-fields input { padding-inline: .5rem 1.35rem; }
  .birth-date-fields label > span:last-child { right: .45rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .birth-primary, .birth-segment span { transition: background-color .18s, color .18s; }
}
