@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600&family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #241831;
  --muted: #65586f;
  --plum: #5b3371;
  --purple: #46255e;
  --night: #160e22;
  --pink: #efd8ff;
  --sheet: #faf6fd;
  --line: #ded2e7;
  --sans: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --display: "Cormorant Garamond", Georgia, serif;
}

html:lang(ko) {
  --sans: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans CJK KR", sans-serif;
  --serif: Batang, "Noto Serif CJK KR", serif;
}
html:lang(zh-Hans) {
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
}
html:lang(zh-Hant) {
  --sans: "Microsoft JhengHei", "PingFang TC", "Noto Sans CJK TC", sans-serif;
  --serif: PMingLiU, "Songti TC", "Noto Serif CJK TC", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--sheet); font: 400 1rem/1.75 var(--sans); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #a866cc; outline-offset: 4px; }
.wrap { width: min(100% - 5rem, 69rem); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .5rem 1rem; color: var(--ink); background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header, .site-footer { color: #f8eafa; background: var(--night); }
.site-header { border-bottom: 1px solid #ffffff23; }
.header-inner { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.12rem/1 var(--display); letter-spacing: .13em; text-decoration: none; white-space: nowrap; }
.wordmark span { color: #dca7f0; font-size: 1.25rem; }
.site-header nav { display: flex; align-items: center; gap: clamp(.75rem, 3vw, 2.6rem); font-size: .875rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { color: #efc6ff; }
.nav-join { padding: .4rem .95rem; border: 1px solid #e9bafa75; border-radius: 99px; }

.birthday-page { --ink: #352342; --muted: #63516e; --plum: #723b80; --purple: #663777; --line: #ebd7eb; background: #fff9fd; }
.birthday-page .site-header, .birthday-page .site-footer { color: #512f60; background: #fff9fd; }
.birthday-page .site-header { border-color: #f0dfed; }
.birthday-page .header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: clamp(.8rem, 2.6vw, 2.2rem); }
.birthday-page .wordmark { font-size: 1.18rem; font-weight: 700; letter-spacing: .12em; }
.birthday-page :is(.brand-heart, .join-seal)::before {
  content: "";
  width: var(--heart-size);
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(
    50% 92%, 10% 54%, 5% 46%, 2% 37%, 2% 28%, 5% 20%, 10% 13%,
    16% 8%, 24% 6%, 32% 7%, 39% 10%, 45% 15%, 50% 22%,
    55% 15%, 61% 10%, 68% 7%, 76% 6%, 84% 8%, 90% 13%, 95% 20%,
    98% 28%, 98% 37%, 95% 46%, 90% 54%
  );
}
.birthday-page .brand-heart { --heart-size: .88rem; display: grid; place-items: center; width: 1.75rem; aspect-ratio: 1; border: 1px solid #edcbe6; border-radius: 50%; color: #9d588d; background: #fbe4f3; }
.birthday-page .site-header nav { justify-self: end; font-weight: 600; }
.birthday-page .site-header nav a { white-space: nowrap; }
.birthday-page .site-header nav a:hover { color: #88447b; }
.birthday-page .nav-join { border-color: #e7c8e3; background: #f9e9f7; padding-inline: 1.15rem; }
.language-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .57rem;
  min-height: 2.75rem;
  padding: .3rem .8rem;
  border: 1px solid #d9c0df;
  border-radius: 99px;
  color: #512f60;
  background-color: #fffafd;
  font: 600 .875rem/1.25 var(--sans);
  white-space: nowrap;
}
.language-control::after { content: ""; width: .4rem; height: .4rem; margin-top: -.2rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.language-control:hover { background-color: #f9eaf7; }
.language-control:focus-within { outline: 3px solid #a866cc; outline-offset: 3px; }
.language-control .language-picker { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 12% 15%, #fff9ed 0%, transparent 48%),
    radial-gradient(ellipse at 82% 73%, #e9d5ff 5%, transparent 56%),
    linear-gradient(110deg, #fff6fa, #f8e8f7 68%, #f4e5fa);
  border-bottom: 1px solid #e9d7f0;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle, #a865ad75 1px, transparent 1.7px) 0 0 / 23px 23px;
  mask-image: linear-gradient(110deg, transparent 12%, #0002 43%, #000 84%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.12fr 1fr; min-height: 39rem; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: 4.2rem 4.9rem; }
.hero-copy { position: relative; z-index: 1; }
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  padding: .3rem .85rem;
  border: 1px solid #eacde3;
  border-radius: 99px;
  color: #713d72;
  background: #fffafdce;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
}
.hero-date span { color: #a85d98; font-size: .82rem; }
.hero h1 { margin: 1.25rem 0 1rem; font: 700 clamp(5.3rem, 9vw, 8rem)/.76 var(--display); letter-spacing: -.064em; }
.hero h1 em { display: block; margin: 0 0 .04em .075em; color: #a45187; font: 400 .75em/.98 "Great Vibes", "Brush Script MT", cursive; letter-spacing: .002em; transform: rotate(-7deg); transform-origin: left 65%; }
.hero h1 strong { display: block; color: #532d68; white-space: nowrap; font-weight: inherit; }
.hero-korean { color: #85467c; margin-top: 1.6rem; font-weight: 700; letter-spacing: .045em; }
.hero-intro { margin-top: .53rem; color: #573e60; font-size: 1rem; line-height: 1.9; }
.hero-action { display: flex; align-items: flex-start; flex-direction: column; gap: .62rem; margin-top: 1.55rem; }
.hero-action p { color: #684d70; font-size: .875rem; font-weight: 600; }
.hero-visual { width: min(87%, 25rem); margin-inline: auto; position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -1.15rem -1.55rem -1.25rem -1.45rem;
  border: 1px solid #c999d388;
  border-radius: 7rem 8rem 6rem 8rem;
  transform: rotate(-14deg);
}
.portrait { position: relative; height: clamp(23rem, 39vw, 28.5rem); padding: .66rem .66rem 1.12rem; border: 1px solid #e9cfe7; border-radius: 2.3rem; background: #fffafd; box-shadow: 0 1.1rem 2.4rem #6d39872c; transform: rotate(3deg); }
.portrait img { width: 100%; height: 100%; border-radius: 1.72rem; object-fit: cover; object-position: center 54%; }
.ribbon {
  position: absolute;
  z-index: 2;
  top: -1.88rem;
  right: -.78rem;
  width: 8.15rem;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 .12rem .18rem #5d35733d);
}
.photo-date { position: absolute; right: -.75rem; bottom: -.8rem; display: inline-flex; align-items: center; gap: .38rem; padding: .36rem .78rem; border: 1px solid #e5b5d5; border-radius: .55rem; color: #6a396f; background: #ffe6f3; font: 700 1.42rem/1.1 var(--display); transform: rotate(-7deg); box-shadow: 0 .3rem .7rem #7e448529; }
.photo-date span { color: #aa578e; font: .7rem/1 Georgia, serif; }
.sparkle { position: absolute; color: #a56cb7; line-height: 1; pointer-events: none; }
.star-top { right: -2rem; top: 22%; font-size: 2.8rem; }
.star-bottom { left: -2.55rem; bottom: 13%; font-size: 3.7rem; }
.heart-side { left: -2rem; top: 27%; color: #ae639d; font: 700 2.05rem/1 Georgia, serif; transform: rotate(-19deg); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.9rem; border: 1px solid transparent; border-radius: 99px; padding: .68rem 1.45rem; font-size: .92rem; font-weight: 700; text-align: center; text-decoration: none; transition: background-color .18s, box-shadow .18s; }
.button-pink { gap: .53rem; color: #fff; background: linear-gradient(110deg, #90447f, #784085); box-shadow: 0 .4rem .85rem #8d4b7f36; }
.button-pink:hover { background: #71356e; box-shadow: 0 .5rem 1.15rem #8d4b7f55; }
.button-heart { font: 1.5rem/.8 Georgia, serif; }
.button-dark { color: #fff; background: var(--purple); }
.button-dark:hover { background: #5c3678; }
.button-outline { color: var(--purple); border-color: #b8a4c8; background: #fff; }
.button-outline:hover { background: #f6edfa; }

.about { padding-block: clamp(3.65rem, 8vw, 7rem); background: #fff9fd; }
.details-layout { display: grid; grid-template-columns: minmax(15rem, 19.7rem) 1fr; align-items: center; gap: clamp(2.7rem, 7vw, 6rem); width: min(100% - 5rem, 63rem); }
.poster { position: relative; padding: .65rem; border: 1px solid #ebd7eb; border-radius: 1.4rem; background: #fff; box-shadow: 0 .75rem 2rem #6d398723; transform: rotate(-2deg); }
.poster::before { content: ""; position: absolute; top: -.45rem; left: 36%; width: 28%; height: 1.4rem; background: repeating-linear-gradient(135deg, #ebc0e1b8 0 5px, #f6d8f0c9 5px 9px); transform: rotate(6deg); }
.poster img { width: 100%; height: auto; border-radius: .9rem; }
.about h2, .join h2 { color: #512e61; font: 700 clamp(1.85rem, 3.7vw, 2.8rem)/1.35 var(--serif); letter-spacing: .015em; }
.section-intro { max-width: 30rem; margin-top: 1rem; color: var(--muted); line-height: 1.9; }
.event-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-block: 1.53rem 1.25rem; }
.event-facts div { padding: .92rem 1rem; border: 1px solid #efd9eb; border-radius: 1.05rem; background: #fcf0fa; }
.event-facts div:nth-child(2), .event-facts div:nth-child(3) { border-color: #e7d9f2; background: #f6eefc; }
.event-facts dt { display: flex; align-items: center; gap: .44rem; color: var(--plum); font-size: .9rem; font-weight: 700; }
.event-facts dt span { display: grid; place-items: center; width: 1.65rem; aspect-ratio: 1; border-radius: .55rem; color: #884b8c; background: #fff9ff; font: 700 1rem/1 Georgia, serif; }
.event-facts dd { margin-top: .35rem; font-size: .91rem; overflow-wrap: anywhere; line-height: 1.62; }
.event-facts small { color: var(--muted); font-size: .78rem; }
.text-link { color: var(--plum); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: .27em; }
.text-link:hover { color: #815093; }

.join { border-block: 1px solid #f0dcee; background: radial-gradient(ellipse at 20% 0%, #f2e5fa, transparent 65%), #faedf6; padding-block: clamp(3.5rem, 7vw, 6.2rem); }
.join-layout { display: grid; grid-template-columns: minmax(13rem, 18rem) 1fr; align-items: start; gap: clamp(2rem, 6vw, 6rem); width: min(100% - 5rem, 65rem); }
.join-copy { padding-block: 1.1rem; }
.join-seal { --heart-size: 1.16rem; display: grid; place-items: center; width: 2.6rem; aspect-ratio: 1; border: 1px solid #d59bcf; border-radius: 50%; color: #84497e; background: #f4d8ec; box-shadow: 0 0 0 .22rem #fdf5fc; margin-bottom: .82rem; }
.join-copy p { margin-top: 1rem; }
.join-copy .join-note { margin-top: 1.4rem; color: var(--muted); font-size: .9rem; }
.form-card, .admin-card { min-width: 0; border: 1px solid #e1d6e9; border-radius: 1.25rem; background: #fff; padding: clamp(1.2rem, 4vw, 2.4rem); box-shadow: 0 .8rem 2rem #53297013; }
.form-card { border-color: #ecd3ea; border-radius: 1.7rem; background: linear-gradient(135deg, #f8e4f4, #eee0f8) top / 100% .37rem no-repeat, #fffafe; box-shadow: 0 .9rem 2.5rem #9247821a; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem 1.2rem; }
.wide { grid-column: 1 / -1; }
label { display: block; font-size: .89rem; font-weight: 700; }
label small { display: block; margin-top: .28rem; color: var(--muted); font-size: .8rem; font-weight: 400; }
.required { margin-inline-start: .5rem; padding: .1rem .35rem; color: #643b75; border-radius: .25rem; background: #f3e8f8; font-size: .73rem; font-weight: 700; white-space: nowrap; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; margin-top: .42rem; padding: .61rem .72rem; min-height: 2.8rem; color: var(--ink); background: #fcf9fd; border: 1px solid #d9cbe3; border-radius: .4rem; font-size: 1rem; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #786a81; }
select { appearance: none; padding-right: 2.1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%2365586f' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right .8rem center; background-repeat: no-repeat; }
textarea { resize: vertical; }
.form-card :is(input:not([type="checkbox"]), select, textarea) { border-color: #ddc3e0; border-radius: .7rem; background-color: #fffdff; }
.form-card .required { color: #793d70; background: #f8e2f1; border-radius: 99px; }
.form-card button[type="submit"] { min-height: 3rem; }
.counter { text-align: right; }
.checkbox { display: flex; align-items: center; gap: .65rem; margin-block: .95rem 1.13rem; }
.checkbox input { width: 1.2rem; height: 1.2rem; margin: 0; flex: 0 0 auto; accent-color: var(--purple); }
.feedback { color: var(--muted); margin-block: .4rem .8rem; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback.error { color: #9b2250; }
#complete h3 { font: 700 clamp(1.3rem, 3vw, 1.65rem)/1.5 var(--serif); }
#complete p { margin-top: .75rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 5rem; padding-block: 1rem; }
.site-footer p { color: #ecdbea; font-size: .8rem; }
.birthday-page .site-footer p { color: #6d5575; }

dialog { width: min(calc(100% - 2rem), 37rem); max-height: calc(100% - 2rem); padding: clamp(1.05rem, 4vw, 2rem); color: var(--ink); border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: 0 1rem 4rem #21102b60; overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #1a0c28bd; }
.birthday-page dialog { border-radius: 1.35rem; background: #fffafe; }
.birthday-page dialog::backdrop { background: #41264c96; backdrop-filter: blur(3px); }
dialog h2 { font: 700 1.5rem/1.4 var(--serif); margin-bottom: .5rem; }
.review { margin-block: 1rem; }
.review div { display: grid; grid-template-columns: minmax(7rem, 35%) 1fr; gap: .7rem; border-bottom: 1px solid var(--line); padding-block: .55rem; }
.review dt { color: var(--plum); font-size: .9rem; font-weight: 700; }
.review dd { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .6rem; margin-top: 1.05rem; }

@media (max-width: 900px) {
  .wrap, .details-layout, .join-layout { width: min(100% - 3.5rem, 69rem); }
  .hero-inner { gap: 2.1rem; min-height: 33rem; padding-block: 3.5rem 3.85rem; }
  .hero h1 { font-size: clamp(3.9rem, 9.3vw, 6.2rem); }
  .details-layout { gap: 2.7rem; }
  .join-layout { gap: 1.8rem; grid-template-columns: minmax(11rem, 15rem) 1fr; }
}
@media (max-width: 700px) {
  .wrap, .details-layout, .join-layout { width: calc(100% - 2.25rem); }
  .header-inner { min-height: 3.65rem; }
  .wordmark { font-size: 1rem; gap: .34rem; }
  .site-header nav { font-size: .8rem; }
  .nav-join, .birthday-page .nav-join { padding: .32rem .65rem; }
  .birthday-page .wordmark { font-size: 1rem; }
  .birthday-page .brand-heart { --heart-size: .72rem; width: 1.45rem; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 2.3rem 3rem; gap: 2.5rem; }
  .hero-copy { text-align: center; }
  .hero-date { display: flex; width: max-content; margin-inline: auto; }
  .hero h1 { display: inline-block; margin-block: .95rem .55rem; font-size: clamp(3.1rem, 13.25vw, 6rem); text-align: start; }
  .hero-korean { margin-top: .72rem; font-size: .95rem; }
  .hero-intro { font-size: .94rem; line-height: 1.75; text-wrap: pretty; }
  .hero-action { align-items: center; margin-top: 1.15rem; gap: .45rem; }
  .hero-visual { width: min(80%, 22.5rem); }
  .portrait { height: clamp(18.5rem, 86vw, 25rem); padding: .49rem .49rem .9rem; border-radius: 1.8rem; }
  .portrait img { border-radius: 1.35rem; }
  .ribbon { width: 6.6rem; top: -1.55rem; right: -.5rem; }
  .star-top { right: -1.45rem; font-size: 2.2rem; }
  .heart-side { left: -1.45rem; font-size: 1.75rem; }
  .star-bottom { left: -1.65rem; font-size: 2.65rem; }
  .details-layout, .join-layout { grid-template-columns: 1fr; gap: 1.45rem; }
  .poster { grid-row: 2; width: min(82%, 19rem); margin-inline: auto; }
  .join-copy { padding-block: 0; }
  .fields { grid-template-columns: 1fr; gap: .85rem; }
  .review div { grid-template-columns: 1fr; gap: .1rem; }
  .site-footer .wrap { align-items: flex-start; flex-direction: column; justify-content: center; gap: .55rem; }
}
@media (max-width: 365px) {
  .event-facts { gap: .48rem; }
  .event-facts div { padding: .65rem .55rem; }
}
@media (max-width: 520px) {
  .birthday-page .header-inner {
    width: calc(100% - 2.25rem);
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo language" "navigation navigation";
    gap: .48rem .8rem;
    padding-block: .65rem .5rem;
  }
  .birthday-page .header-inner > .wordmark { grid-area: logo; justify-self: start; font-size: .95rem; letter-spacing: .08em; }
  .birthday-page .header-inner > .language-control { grid-area: language; }
  .birthday-page .site-header nav { grid-area: navigation; justify-self: stretch; justify-content: flex-end; gap: .85rem; padding-top: .42rem; border-top: 1px solid #f0dfed; font-size: .875rem; }
  .birthday-page .site-header nav a { display: inline-flex; align-items: center; min-height: 2.2rem; }
  .birthday-page .nav-join { padding-inline: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
