/* TiadaKesan theme floral (Floral pastel), DESIGN.md section 4. Tokens per contract C3,
   styles only the .inv tree. Ornament is one inline data-URI SVG sprig placed at two cover
   corners, no repeat. Contrast, WCAG 2.1 relative luminance:
   ink/bg 12.74, muted/bg 6.00, accent/bg 4.79, ink/surface 13.15, muted/surface 6.19,
   accent/surface 4.94, white/accent 5.08, white/press 6.49, ink/notice 11.97.
   Leaf #7C8F72 is ornament only, 3.29 on bg, never a text colour. */

:root {
  --inv-bg: #FDF7F7;
  --inv-ink: #3A2A31;
  --inv-muted: #6E5A62;
  --inv-accent: #A4566E;
  --inv-line: #E7D3D9;
  --inv-surface: #FFFBFB;
  --inv-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --inv-font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --inv-radius: 14px;
}

.inv {
  --inv-leaf: #7C8F72;
  --inv-press: #8F4760;
  --inv-notice: #FBEEF2;
  --inv-sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%237C8F72' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 5C29 9 51 27 67 59'/%3E%3Cpath d='M22 11C17 21 19 31 27 37'/%3E%3Cpath d='M39 21C35 33 39 43 49 47'/%3E%3C/g%3E%3Cg fill='%237C8F72' opacity='.55'%3E%3Cellipse rx='10' ry='4.2' transform='translate(19 4) rotate(-24)'/%3E%3Cellipse rx='9' ry='4' transform='translate(27 20) rotate(46)'/%3E%3Cellipse rx='10' ry='4.2' transform='translate(41 15) rotate(-16)'/%3E%3Cellipse rx='9' ry='4' transform='translate(47 34) rotate(54)'/%3E%3Cellipse rx='10' ry='4.2' transform='translate(58 33) rotate(-6)'/%3E%3Cellipse rx='9' ry='4' transform='translate(62 53) rotate(62)'/%3E%3C/g%3E%3Cg fill='%23A4566E' opacity='.5'%3E%3Ccircle cx='8' cy='5' r='5'/%3E%3Ccircle cx='33' cy='7' r='3.4'/%3E%3Ccircle cx='67' cy='59' r='4.6'/%3E%3C/g%3E%3C/svg%3E");
  background: var(--inv-bg);
  color: var(--inv-ink);
  font-family: var(--inv-font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Focus ring, never removed. */
.inv :focus {
  outline: 2px solid var(--inv-accent);
  outline-offset: 2px;
}

/* Card surface */
.inv-cover,
.inv-cd-unit,
.inv-event,
.inv-gift,
.inv-gift-warning,
.inv-gallery-item,
.inv-field input,
.inv-field select,
.inv-field textarea,
input.inv-field,
select.inv-field,
textarea.inv-field {
  background: var(--inv-surface);
  border: 1px solid var(--inv-line);
  border-radius: var(--inv-radius);
}

/* Display type */
.inv-names,
.inv-to-name,
.inv-section-title,
.inv-person-name,
.inv-event-name,
.inv-cd-num {
  font-family: var(--inv-font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--inv-ink);
}

/* List resets */
.inv-countdown,
.inv-people,
.inv-events,
.inv-gallery {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Cover */
.inv-cover {
  position: relative;
  overflow: hidden;
  margin: 16px;
  padding: 64px 20px 76px;
  text-align: center;
}
.inv-cover::before,
.inv-cover::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 104px;
  height: 104px;
  background: var(--inv-sprig) no-repeat center / contain;
  pointer-events: none;
}
.inv-cover::before {
  top: 8px;
  left: 8px;
}
.inv-cover::after {
  right: 8px;
  bottom: 8px;
  transform: rotate(180deg);
}
.inv-cover > * {
  position: relative;
  z-index: 1;
}
.inv-cover-kicker {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--inv-muted);
}
.inv-names {
  margin: 14px 0 0;
  font-size: 40px;
  line-height: 1.15;
}
.inv-names::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 18px auto 0;
  border-radius: 2px;
  background: var(--inv-leaf);
}
.inv-date {
  margin: 18px 0 0;
  font-size: 17px;
  color: var(--inv-muted);
}
.inv-to {
  margin: 28px 0 0;
  padding-top: 0;
  border-top: 0;
  font-size: 16px;
  color: var(--inv-muted);
}
.inv-to-name {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.3;
}

/* Sections */
.inv-section {
  margin: 0 16px;
  padding: 40px 20px;
  border-top: 0;
  text-align: center;
}
.inv-section-title {
  margin: 0 0 20px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--inv-accent);
}

/* Countdown */
.inv-countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.inv-cd-unit {
  min-width: 76px;
  padding: 14px 10px;
}
.inv-cd-num {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  color: var(--inv-accent);
}
.inv-cd-label {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--inv-muted);
}

/* People */
.inv-people {
  display: grid;
  gap: 24px;
  justify-items: center;
}
.inv-person {
  max-width: 24em;
}
.inv-person-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}
.inv-person-parents {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--inv-muted);
}

/* Events */
.inv-events {
  display: grid;
  gap: 16px;
}
.inv-event {
  padding: 20px;
}
.inv-event-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}
.inv-event-time {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  color: var(--inv-accent);
}
.inv-event-venue {
  margin: 8px 0 16px;
  font-size: 16px;
  color: var(--inv-muted);
}

/* Buttons */
.inv-btn,
.inv-event-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 48px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.inv-btn {
  color: #FFFFFF;
  background: var(--inv-accent);
  border: 1px solid var(--inv-accent);
}
.inv-btn:hover,
.inv-btn:active {
  background: var(--inv-press);
  border-color: var(--inv-press);
}
.inv-event-map {
  color: var(--inv-accent);
  background: var(--inv-surface);
  border: 1px solid var(--inv-accent);
}
.inv-event-map:hover,
.inv-event-map:active {
  color: #FFFFFF;
  background: var(--inv-accent);
}

/* Gallery */
.inv-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.inv-gallery-item,
.inv-gallery-item img {
  display: block;
  overflow: hidden;
  width: 100%;
  height: auto;
}

/* RSVP */
.inv-rsvp {
  display: grid;
  gap: 16px;
  max-width: 26em;
  margin: 0 auto;
  text-align: left;
}
.inv-field {
  font-size: 14px;
  color: var(--inv-muted);
}
label.inv-field {
  display: grid;
  gap: 6px;
}
.inv-field input,
.inv-field select,
.inv-field textarea,
input.inv-field,
select.inv-field,
textarea.inv-field {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--inv-ink);
}
.inv-field textarea,
textarea.inv-field {
  min-height: 96px;
  resize: vertical;
}

/* Gift */
.inv-gift {
  max-width: 28em;
  margin: 0 auto;
  padding: 20px;
  text-align: left;
}
.inv-gift-warning {
  margin: 16px 0 0;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--inv-ink);
  background: var(--inv-notice);
}

/* Share, watermark, footer */
.inv-share {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.inv-wm,
.inv-footer {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--inv-muted);
}
.inv-wm {
  padding: 24px 16px 0;
}
.inv-wm a {
  color: var(--inv-accent);
}
.inv-footer {
  padding: 28px 16px 40px;
}

/* Wider screens */
@media (min-width: 720px) {
  .inv-cover {
    max-width: 760px;
    margin: 16px auto;
    padding: 104px 40px 88px;
  }
  .inv-cover::before,
  .inv-cover::after {
    width: 168px;
    height: 168px;
  }
  .inv-names {
    font-size: 54px;
  }
  .inv-section {
    max-width: 760px;
    margin: 0 auto;
  }
  .inv-events {
    grid-template-columns: repeat(2, 1fr);
  }
  .inv-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .inv,
  .inv *,
  .inv *::before,
  .inv *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
