:root { color-scheme: dark; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #e6dce0; background: #000; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
main { position: relative; height: 100%; height: 100svh; min-height: 240px; isolation: isolate; }
#bouquet, #poster { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
#poster { object-fit: contain; opacity: .9; }
#bouquet { touch-action: none; outline-offset: -4px; cursor: grab; }
#bouquet:active { cursor: grabbing; }
#bouquet:focus-visible { outline: 1px solid #a77691; }
.identity { position: absolute; top: max(32px, env(safe-area-inset-top)); left: max(40px, env(safe-area-inset-left)); pointer-events: none; }
h1 { font: 400 48px/1 Georgia, "Times New Roman", serif; margin: 0; letter-spacing: -.045em; }
h1 span { color: #df91b4; }
.invitation { margin: 10px 0 0; color: #bfaeb8; font: 400 14px/1.5 Georgia, "Times New Roman", serif; letter-spacing: .015em; }
.invitation span { color: #efb2d0; padding-left: 3px; }
.bottom { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); left: max(40px, env(safe-area-inset-left)); right: max(40px, env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.caption p { font-size: 14px; color: #b3a2ac; margin: 0 0 8px; }
.caption p span { padding: 0 6px; color: #785c6d; }
button, select { font: inherit; font-size: 14px; border: 1px solid #49353f; border-radius: 99px; background: #0a0709; color: #ded0d7; min-height: 44px; padding: 10px 18px; cursor: pointer; }
button:hover, select:hover { color: #fff; border-color: #a66b88; background: #170e14; }
button:disabled { opacity: .4; cursor: wait; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid #f5b8d4; outline-offset: 4px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; background: rgba(239,178,208,.07); border: 1px solid #80516a; border-radius: 999px; padding: 0 14px; min-height: 40px; color: #efb2d0; font-size: 14px; text-align: left; text-decoration: none; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.text-button:hover { color: #ffe8f3; border-color: #d28eaf; background: rgba(239,178,208,.14); }
.controls { display: flex; gap: 8px; }
.loading { position: absolute; top: 50%; width: 100%; text-align: center; font: 16px Georgia, serif; letter-spacing: .04em; color: #d9a6be; pointer-events: none; }
body.ready .loading, body.ready #poster { display: none; }
[hidden] { display: none !important; }
body.immersed .identity, body.immersed .bottom { display: none; }
#return { position: absolute; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); opacity: .45; }
#return:hover, #return:focus-visible { opacity: 1; }
dialog { width: min(460px, calc(100% - 40px)); max-height: calc(100svh - 40px); background: #100b0e; color: #ddd0d7; border: 1px solid #523444; border-radius: 20px; padding: 32px; }
dialog::backdrop { background: #000b; backdrop-filter: blur(5px); }
dialog h2 { font: 400 30px/1.15 Georgia, serif; margin: 0 0 20px; }
dialog p { font-size: 16px; line-height: 1.65; color: #bfaeb8; }
.letter p { font: 400 19px/1.55 Georgia, "Times New Roman", serif; color: #e6d5de; }
.letter .signoff { color: #efb2d0; font-style: italic; margin: 18px 0 24px; }
.text-button span { color: #efb2d0; display: inline-block; }
.bouquet-details { margin-top: 24px; border-top: 1px solid #49353f; padding-top: 14px; }
.bouquet-details summary { color: #bfaeb8; font-size: 13px; cursor: pointer; }
.bouquet-details summary:focus-visible { outline: 2px solid #f5b8d4; outline-offset: 4px; }
dialog .keys { font-size: 13px; }
dialog label { display: block; font-size: 14px; margin-bottom: 8px; }
dialog select { width: 100%; border-radius: 8px; appearance: none; background: #1a1016 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c8a9bb'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 40px; }
.fallback-message { position: absolute; left: 20px; right: 20px; top: 45%; text-align: center; font-size: 16px; background: #000b; padding: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media(max-width: 600px) {
  .identity { top: max(24px, env(safe-area-inset-top)); left: 24px; }
  h1 { font-size: 40px; }
  .bottom { left: 24px; right: 24px; bottom: max(20px, env(safe-area-inset-bottom)); flex-direction: column; align-items: center; gap: 12px; }
  .caption { text-align: center; }
  .caption p { font-size: 13px; margin-bottom: 4px; }
  .text-button { text-align: center; }
  .controls { gap: 8px; }
  .controls button { padding: 10px 16px; }
  dialog { padding: 24px; }
}
@media(max-height: 450px) { .identity { top: 16px; left: 20px; } h1 { font-size: 32px; } .bottom { bottom: 12px; left: 20px; right: 20px; flex-direction: row; } .caption p { margin-bottom: 2px; } }
