/* Keep the first room view focused on the scene. Extra controls remain available in Menu. */
.stage:not(.editing):not(.room-controls-open) .hud-bot>.bar,.stage:not(.editing):not(.room-controls-open) .hud-bot .camctl{display:none}
.stage:not(.room-controls-open) #closeRoomControls{display:none}
.stage.room-controls-open #closeRoomControls{display:inline-flex;width:44px;min-width:44px;min-height:44px;flex:none;padding:0;font-size:24px;align-items:center;justify-content:center}
.stage:not(.editing):not(.room-controls-open) .hud-bot{bottom:100px}
.stage:not(.editing):not(.room-controls-open) .mc{max-width:min(460px,calc(100vw - 56px))}
.avatar-sheet.avatar-quick .avatar-controls>.avs,.avatar-sheet.avatar-quick .avatar-preset:nth-child(n+7){display:none}
.avatar-sheet.avatar-quick .avatar-layout{grid-template-columns:200px minmax(0,1fr)}
.avatar-sheet.avatar-quick .avatar-preview{align-self:start;min-height:0;padding:16px}
.avatar-sheet.avatar-quick .avatar-preview>canvas{max-height:210px;object-fit:contain}
.avatar-sheet.avatar-quick .avatar-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.avatar-sheet.avatar-quick .avatar-preset{min-height:150px}
.avatar-sheet.avatar-quick .avatar-preset canvas{max-height:100px}
.avatar-more{margin-top:16px;width:100%}
@media(max-width:700px){
 .stage:not(.editing) .hud-top .hudcol{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;width:100%;min-width:0;max-width:none}
 .stage:not(.editing) .hud-top .evtag{grid-column:1;grid-row:1;min-width:0;max-width:none;margin:0;padding:10px 12px}
 .stage:not(.editing) .hud-top .hudpills{grid-column:2;grid-row:1;display:flex;align-items:center;gap:4px;margin:0;min-width:0;flex-wrap:nowrap}
 .stage:not(.editing) .hud-top #hudSub{display:none}
 .stage:not(.editing) .hud-top .evtag b{white-space:normal;overflow-wrap:normal;font-size:14px;line-height:1.3}
 .stage:not(.editing) .hud-top .rooms{grid-column:1/-1;grid-row:2;margin:0;max-width:100%;width:max-content}
 .stage:not(.editing) .hud-top .rightcol{display:none}
 .stage:not(.editing):not(.room-controls-open) .hud-bot{bottom:94px;left:14px;right:14px}
 .stage:not(.editing):not(.room-controls-open) .world-utility{margin:0}
 .stage:not(.editing):not(.room-controls-open) .mc{display:none}
 .stage.room-controls-open .hud-bot{bottom:94px}
 .avatar-sheet.avatar-quick .avatar-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
 .avatar-sheet.avatar-quick .avatar-preview{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;align-items:center;padding:12px}
 .avatar-sheet.avatar-quick .avatar-preview>canvas{width:100px;height:116px;max-height:116px}
 .avatar-sheet.avatar-quick .avatar-preview .avatar-turn{margin-top:10px}
 .avatar-sheet.avatar-quick .avatar-preview .avatar-turn .btn{min-width:44px;min-height:44px;padding:8px}
 .avatar-sheet.avatar-quick .avatar-preview h3{margin:6px 0;font-size:17px}
 .avatar-sheet.avatar-quick .avatar-preview p{margin:4px 0;font-size:12px}
 .avatar-sheet.avatar-quick .avatar-preview .avatar-eyebrow{font-size:9px}
 .avatar-sheet.avatar-quick .avatar-controls{overflow:visible}
 .avatar-sheet.avatar-quick .avatar-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .avatar-sheet.avatar-quick .avatar-preset{min-height:124px;padding:8px 4px}
 .avatar-sheet.avatar-quick .avatar-preset canvas{height:82px;max-height:82px}
 .avatar-sheet.avatar-quick .avatar-preset span{font-size:10px;line-height:1.4}
 .avatar-sheet.avatar-quick .avatar-controls>h3{font-size:15px;margin:0 0 8px}
 .avatar-sheet.avatar-quick .avatar-controls>.avatar-hint{display:none}
 .avatar-sheet.avatar-quick .avatar-layout{overflow:auto;max-height:calc(100dvh - 260px)}
}
@media(max-width:360px){.stage:not(.editing) .hud-top .evtag{padding:8px}.stage:not(.editing) .hud-top .evtag b{font-size:12px}.stage:not(.editing) .hud-top .evtag small{font-size:10px}.stage:not(.editing) .hud-top .hudpills .pill{padding-inline:10px}.avatar-sheet.avatar-quick .avatar-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.stage.room-controls-open .world-utility{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}
.stage.room-controls-open .world-utility .world-save{position:static;flex:1 1 140px;min-width:0;max-width:100%;overflow:hidden;overflow-wrap:anywhere}
.stage.room-controls-open .world-utility .camctl{position:static;display:flex;flex:0 0 auto}

.room-sync-status{display:inline-flex;align-items:center;gap:5px;max-width:100%;font-size:11px;line-height:1.4;color:var(--muted,#62556d);padding:4px 2px}
.room-sync-status:empty{display:none}
.room-sync-status[data-state="connected"]{color:var(--ink,#235844)}
.room-sync-status[data-state="connected"]:before{content:"";width:6px;height:6px;border-radius:50%;background:#38976b;flex:none}
@media(max-width:760px){.room-sync-status{font-size:10px;padding-inline:3px}}

.guest-cast{max-width:100%;min-width:0;flex-wrap:wrap}
.experience-camera{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.experience-camera>.btn{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:14px;text-align:left;min-height:116px;padding:18px}
.experience-camera small{font-size:12px;line-height:1.6;font-weight:400;opacity:.8}
.experience-zoom{grid-column:1/-1;display:flex;gap:12px}.experience-zoom>.btn{flex:1}
.experience-reactions,.experience-result-actions{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}
.experience-reactions>.btn{min-height:44px;flex:1 1 110px}
.together-person{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}
.together-person>span{min-width:0;overflow-wrap:anywhere}.together-person>.btn{min-height:44px;flex:none}
.together-identity{border-top:1px solid var(--line);padding-top:18px;margin-top:24px}.together-identity summary{cursor:pointer;padding:12px 0;font-weight:700}
.together-identity input[type=text]{display:block;width:100%;font-size:16px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);margin:8px 0}
.experience-consent{display:flex;align-items:flex-start;gap:10px;margin:14px 0;font-size:13px}.experience-consent input{width:22px;height:22px;flex:none;accent-color:var(--experience-accent,#A12D58)}
.together-result{width:100%;border-radius:16px;border:1px solid var(--line)}
.together-banner{position:absolute;z-index:5;bottom:101px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:calc(100% - 32px);width:max-content;padding:10px 12px 10px 18px;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--ink);box-shadow:0 6px 24px #0002;font-size:12px;line-height:1.5}
.together-banner[hidden]{display:none}.together-banner>.btn{min-height:44px;flex:none}.together-banner>span{min-width:0;overflow-wrap:anywhere}
.stage:has(.together-banner:not([hidden])) .world-save{visibility:hidden}
body[data-event-type=kenang] .meter,body[data-event-type=bayi] .meter{display:none}
@media(max-width:600px){.experience-camera{grid-template-columns:1fr}.experience-camera>.btn{min-height:80px;padding:16px;gap:8px}.together-banner{bottom:98px;padding:8px 10px;gap:8px;max-width:calc(100% - 24px)}.together-banner>.btn{padding:10px;font-size:11px}.together-person{align-items:flex-start}}
@media(max-width:360px){.guest-cast{border-radius:18px}.guest-cast .room-sync-status{flex-basis:100%;justify-content:center}}

.memorial-preview-link { display: block; text-align: center; text-decoration: none; }
body.memorial-preview { background: #17111c; }
.memorial-preview .top { display: none; }
.memorial-preview .layout { padding: 0; }
.memorial-preview .stage {
  border-radius: 0;
  padding: 0;
  background: #17111c;
  box-shadow: none;
}
.memorial-preview .stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, #130e19 0%, transparent 28%, transparent 67%, #130e19d9 100%),
    radial-gradient(ellipse at 50% 48%, transparent 37%, #150d1952 72%, #110b17ae 100%);
}
.memorial-preview #worldDock,
.memorial-preview .stage:not(.room-controls-open) .hud-top,
.memorial-preview .stage:not(.room-controls-open) .hud-bot > :not(.ctx),
.memorial-preview .stage.editing .memorial-view { display: none; }
.memorial-preview .stage:not(.room-controls-open) .hud-bot {
  position: absolute;
  inset: auto 12px 127px;
  width: auto;
  min-height: 0;
}
.memorial-preview .stage.room-controls-open .hud-top { margin: 72px 16px auto; width: auto; }
.memorial-preview .stage.room-controls-open .hud-bot { margin: 0 16px 114px; width: auto; }
.memorial-preview .ov { z-index: 1; }
.memorial-preview .ov .name,
.memorial-preview .ov .bub:not(.me) { visibility: hidden; }
.memorial-preview .memorial-toolbar,
.memorial-preview .memorial-heading,
.memorial-preview .memorial-actions { position: absolute; z-index: 4; color: #fff3e4; }
.memorial-preview .memorial-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  inset: clamp(14px, 2.5vh, 26px) clamp(14px, 3.2vw, 48px) auto;
  pointer-events: none;
}
.memorial-toolbar > * { pointer-events: auto; }
.memorial-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-right: auto;
  color: inherit;
  font: 21px/1 var(--display, Georgia);
  text-decoration: none;
}
.memorial-brand img { width: 18px; height: 24px; }
.memorial-toolbar button,
.memorial-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border: 1px solid #e9c89142;
  border-radius: 100px;
  padding: 8px 14px;
  background: #251c29ed;
  color: #fff3e4;
  font: inherit;
  font-weight: 700;
}
.memorial-toolbar button:hover,
.memorial-actions button:hover { background: #3e2d35; }
.memorial-toolbar button:focus-visible,
.memorial-actions button:focus-visible,
.memorial-brand:focus-visible { outline: 2px solid #ffd88e; outline-offset: 3px; }
.memorial-toolbar .rr-icon,
.memorial-actions .rr-icon { flex-shrink: 0; width: 18px; height: 18px; color: #ffda9d; }
.memorial-heading {
  top: clamp(75px, 12vh, 120px);
  left: 50%;
  width: min(740px, calc(100% - 32px));
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 22px #120d18, 0 2px 5px #120d18;
}
.memorial-heading p {
  margin: 0;
  color: #f5c989;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.memorial-heading h1 {
  margin: 10px 0 8px;
  color: inherit;
  font: 400 clamp(31px, 4.2vw, 58px)/1.05 var(--display, Georgia);
  text-wrap: balance;
}
.memorial-heading > span { color: #e7d4c9; font-size: 14px; }
.memorial-actions {
  bottom: clamp(16px, 4vh, 44px);
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  text-align: center;
}
.memorial-actions p { margin: 0 0 10px; font-size: 12px; color: #f2e2d8; text-shadow: 0 1px 8px #110b17; }
.memorial-actions > div {
  display: grid;
  grid-template-columns: max-content max-content max-content;
  justify-content: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid #e9c89135;
  border-radius: 100px;
  background: #160f1bd9;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 36px #100a17a6;
}
.memorial-actions button { border-color: transparent; background: #ffffff10; }
.memorial-actions #memorialCandle {
  background: linear-gradient(135deg, #fff2ce, #efbb77);
  color: #342011;
  box-shadow: 0 0 24px #ecac5150;
}
.memorial-actions #memorialCandle:hover { background: #fff2cf; }
.memorial-actions #memorialCandle .rr-icon { color: #8c4621; }
@media (max-width: 520px) {
  .memorial-brand { font-size: 18px; gap: 7px; }
  .memorial-toolbar button { padding-inline: 10px; font-size: 12px; }
  .memorial-actions button { gap: 5px; padding-inline: 9px; font-size: 11px; }
  .memorial-actions .rr-icon { width: 16px; height: 16px; }
  .memorial-heading { top: clamp(77px, 15vh, 135px); }
}
@media (max-width: 360px) {
  .memorial-actions > div { gap: 3px; }
  .memorial-actions button { padding-inline: 7px; }
}
@media (max-height: 540px) {
  .memorial-heading { top: 65px; }
  .memorial-heading h1 { margin-block: 5px; font-size: clamp(25px, 5vh, 35px); }
  .memorial-actions { bottom: 9px; }
  .memorial-actions p { margin-bottom: 4px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .memorial-heading {
    left: 18px;
    width: min(34vw, 260px);
    transform: none;
    text-align: left;
  }
  .memorial-heading h1 { text-wrap: initial; }
}

.room-3d-surface {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.room-perspective.room-experience { background: #171322; }
.room-perspective.room-experience .layout { padding: 0; }
.room-perspective.room-experience .stage { border-radius: 0; }
.room-perspective.room-experience > .top {
  color: #fff1e6;
  background: #201827;
  border-color: #ffe0b52e;
}
.room-perspective.room-experience > .top .brand { color: #fff1e6; }
.room-perspective .evtag,
.room-perspective .world-dock { box-shadow: 0 8px 30px #160f2445; }
.room-perspective.room-experience > .top .evbtn,
.room-perspective.room-experience > .top .explore-trigger {
  color: #fff0e5;
  background: #322638;
  border-color: #d8b58a48;
}
.room-perspective.room-experience > .top .evbtn:hover,
.room-perspective.room-experience > .top .explore-trigger:hover { background: #473349; }
.room-perspective .rightcol { display: none; }
.room-3d-help {
  position: absolute;
  left: 50%;
  bottom: 99px;
  z-index: 3;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  width: max-content;
  padding: 6px 10px;
  margin: 0;
  color: #fff2e5;
  background: #181320b8;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 18px;
  pointer-events: none;
  text-align: center;
}
.room-perspective .stage.editing .room-3d-help,
.room-perspective .stage.room-controls-open .room-3d-help,
.room-perspective .stage:has(.ctx.on) .room-3d-help { display: none; }
.room-perspective #cv:focus-visible { outline: 2px solid #f4d795; outline-offset: -3px; }
@media (max-height: 500px) { .room-3d-help { display: none; } }
.room-perspective:has(#toast.show) .room-3d-help,
.room-perspective .stage:has(.mc:not([hidden])) .room-3d-help { visibility: hidden; }
@media (max-width: 700px) {
  .room-3d-help { bottom: 145px; }
  .room-perspective .stage:has(.mc:not([hidden])) .room-3d-help { visibility: visible; }
}
@media (max-width: 700px) and (max-height: 650px) { .room-3d-help { display: none; } }

/* The arrival remains navigable with the Canvas fallback and keyboard. */
.room-arrival.room-experience { background: #1c1720; }
.room-arrival.room-experience > .top,
.room-arrival #worldDock,
.room-arrival .hud-top,
.room-arrival .hud-bot,
.room-arrival .room-3d-help,
.room-arrival .ov .name,
.room-arrival .ov .bub,
.room-arrival .ov .spot:not(.arrival-object) { display: none !important; }
.room-arrival.room-experience .layout { padding: 0; }
.room-arrival.room-experience .stage { min-height: 100svh; border-radius: 0; }
#roomArrival { position: absolute; inset: 0; pointer-events: none; z-index: 5; color: #fff6e9; }
#roomArrival::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,#1b1028c7,transparent 35%,transparent 60%,#1b1028d9); }
.arrival-top,.arrival-heading,.arrival-actions { position: absolute; }
.arrival-top { inset: max(16px, env(safe-area-inset-top)) clamp(16px,4vw,56px) auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.arrival-top a { color: inherit; font: 23px/1 var(--display,Georgia); text-decoration: none; padding-block: 12px; pointer-events: auto; }
.arrival-heading { top: clamp(80px,13vh,135px); inset-inline: clamp(18px,4vw,56px); text-align: left; text-shadow: 0 2px 16px #160d1b; }
.arrival-heading p { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .10em; }
.arrival-heading h1 { margin: 0; font: 400 clamp(30px,5vw,66px)/1.02 var(--display,Georgia); text-wrap: balance; }
.arrival-actions { inset: auto clamp(16px,4vw,56px) max(19px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: flex-start; gap: 9px; flex-wrap: wrap; }
.arrival-top button,.arrival-actions button,#roomReturn { min-height: 44px; border-radius: 99px; border: 1px solid #fff3; padding: 9px 17px; background: #2d2236f0; color: #fff6e9; font: 700 13px/1.25 var(--sans,system-ui); pointer-events: auto; }
.arrival-top button:hover,.arrival-actions button:hover,#roomReturn:hover { background: #493554; }
.arrival-actions #arrivalPrimary { background: #fae7c5; color: #311e26; border-color: #fae7c5; }
.arrival-actions #arrivalPrimary:hover { background: #fff3d9; }
.arrival-actions #arrivalRsvp { color:#ffe8bf; border-color:#e0ba7d; }
.arrival-actions small { flex-basis: 100%; font-size: 12px; color: #fff0dc; margin-top: 4px; }
.arrival-top :focus-visible,.arrival-actions :focus-visible,#roomReturn:focus-visible { outline: 2px solid #ffdb98; outline-offset: 4px; }
.room-arrival .ov .arrival-object { border: 1px solid #ffe3ad; background: #2d2236f2; color: #fff6e9; min-height: 44px; }
.room-arrival .ov .arrival-object .rr-icon { color: #ffd992; }
#roomReturn { position: absolute; z-index: 5; right: 12px; bottom: var(--rr-dock-occupied,92px); }
@media (max-width: 580px) {
  .arrival-heading { top: max(72px,13vh); }
  .arrival-actions { justify-content: center; text-align: center; }
  .arrival-actions button { flex: 1 1 auto; }
}
@media (max-height: 480px) {
  .arrival-heading { top: 68px; }
  .arrival-heading h1 { font-size: 32px; }
}
.room-perspective .stage::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 50% 43%,transparent 42%,#140c1d63 100%)}
.arrival-top .arrival-details{font:700 12px/1.35 system-ui,sans-serif;padding:8px 0;text-decoration:underline;text-underline-offset:3px}
.arrival-top>a:first-child{margin-right:auto}
@media(max-width:390px){.arrival-top{gap:8px}.arrival-top .arrival-details{font-size:11px}.arrival-top button{padding-inline:10px}}

.arrival-actions .arrival-memorial,
.arrival-actions .arrival-activities {
  background: #47372a;
  border-color: #ecd3a870;
}
.theme-activities { display: grid; gap: 8px; margin: 15px 0; }
.theme-activity { display: grid; grid-template-columns: 42px minmax(0,1fr) 18px; align-items: center; gap: 12px; min-height: 74px; color: #2d2529; background: #fcf8f3; border: 1px solid #ded2c7; border-radius: 12px; padding: 10px 13px; text-align: left; }
.theme-activity:hover { background: #f6ede4; border-color: #977a64; }
.theme-activity-icon { display: grid; place-items: center; width: 39px; height: 39px; color: #725341; background: #ecdfd2; border-radius: 10px; }
.theme-activity-icon .rr-icon { width: 21px; height: 21px; }
.theme-activity strong,.theme-activity small { display: block; }
.theme-activity small { color: #60534e; font-weight: 400; line-height: 1.4; margin-top: 3px; }
.theme-activity-next { color: #7a5948; }
.theme-guide { display: grid; gap: 9px; margin-top: 16px; }
.theme-guide label { color: inherit; font-weight: 650; }
.theme-guide textarea { width: 100%; margin-bottom: 7px; }
.theme-guide div { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-guide [role=status]:empty { display: none; }
.theme-featured { border-color: #ba8a71; }
.reunion-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-block: 15px; }
.reunion-pair section { min-width: 0; padding: 10px; border: 1px solid #cdd7c9; border-radius: 10px; background: #f0f3eb; }
.reunion-pair h3 { margin: 0 0 8px; color: #365947; font-size: 16px; }
.reunion-pair img { display: block; width: 100%; border-radius: 6px; }
.reunion-photo { width: 100%; text-align: left; margin-bottom: 8px; padding: 5px; border: 1px solid #d0d9cd; border-radius: 7px; background: #fff; color: #2d4738; }
.reunion-photo span { display: block; padding: 5px; overflow-wrap: anywhere; }
.memorial-wing { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.memorial-wing select { width: min(100%,270px); }
.memorial-niche-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-block: 16px;
}
.memorial-niche {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 12px 6px;
  min-height: 98px;
  border: 1px solid #cdbda8;
  border-radius: 9px;
  background: #f4ede2;
  color: #42382e;
  text-align: center;
  overflow-wrap: anywhere;
}
.memorial-niche[data-occupied=true] { color: #fff3e1; background: #443931; border-color: #8a6b49; }
button.memorial-niche:hover { border-color: #74553b; box-shadow: inset 0 0 0 1px #bd9467; }
.memorial-card-text { display: grid; justify-items: center; align-content: center; gap: 2px; }
.memorial-card-text small { color: #6d5945; font-variant-numeric: tabular-nums; }
.memorial-niche[data-occupied=true] small { color: #eed8b6; }
.memorial-card-mark { font-size: 20px; line-height: 1; color: #765a43; }
.memorial-niche img { width: 49px; height: 53px; border-radius: 4px; object-fit: cover; }
.memorial-plaque { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 16px; align-items: center; background: #f3ebdf; color: #342a24; border: 1px solid #d6c5af; border-radius: 12px; padding: 12px; margin-block: 13px; }
.memorial-plaque h3 { font: 400 clamp(22px,5vw,32px)/1.15 var(--display,Georgia); margin: 0; overflow-wrap: anywhere; }
.memorial-plaque p { margin: 8px 0 0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.memorial-portrait {
  display: block;
  width: clamp(67px,20vw,126px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}
.memorial-niche-form { display: grid; gap: 9px; margin-block: 12px; }
.memorial-niche-form :is(input,textarea) { width: 100%; }
.memorial-niche-form button { justify-self: start; }
.memorial-niche-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.memorial-tribute { margin-block: 16px; padding-bottom: 12px; border-bottom: 1px solid #d8c9b8; }
.memorial-tribute h3 { margin: 0 0 4px; font-size: 16px; }
.memorial-tribute .memorial-niche-actions { margin-top: 8px; }
.memorial-tribute-action { display: inline-flex; align-items: center; gap: 5px; }
.memorial-tribute-action .rr-icon { width: 16px; height: 16px; }
.memorial-tribute-action[aria-pressed=true] { color: #533919; background: #f2ddaf; border-color: #aa8451; }
.memorial-tribute-status { margin-top: 8px; }
.memorial-tribute-status:empty { display: none; }
.memorial-tribute-status input { width: 100%; }
.memorial-reflection { text-align: center; color: #fff4dd; background: #332b2a; border-radius: 14px; padding: 24px 18px; margin: 13px 0 4px; }
.memorial-reflection p { margin-block: 12px; }
.memorial-reflection [role=timer] { font-variant-numeric: tabular-nums; }
.memorial-reflection-light { width: 15px; height: 28px; border-radius: 65% 35% 55% 50%; margin: 12px auto 25px; background: #fff2c0; box-shadow: 0 0 26px 8px #ebb064a0; animation: memorial-glow 3.2s ease-in-out infinite alternate; }
@keyframes memorial-glow { to { opacity: .78; transform: scale(.91); } }
@media (prefers-reduced-motion: reduce) { .memorial-reflection-light { animation: none; } }
@media (max-width:400px) {
  .memorial-niche-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memorial-actions > div { flex-wrap: wrap; }
}

#onlineN:hover,#onlineN:focus-visible{text-decoration:underline;text-underline-offset:.22em}
.piano-keys{display:grid;grid-template-columns:repeat(8,minmax(44px,1fr));gap:4px;padding:6px;border-radius:11px;background:#332a35;margin:14px 0 8px}
.piano-keys button{display:flex;min-width:0;min-height:96px;flex-direction:column;align-items:center;justify-content:end;gap:3px;padding:9px 4px;border:1px solid #e7d7bc;border-radius:6px;background:#fffbec;color:#35252d;font:650 13px/1.2 system-ui,sans-serif}
.piano-keys button:active{background:#ead0a0}
.piano-keys kbd{font:12px/1.2 system-ui,sans-serif;color:#625044}
.piano-status{min-height:1.5em}
@media(max-width:515px){
 .piano-keys{grid-template-columns:repeat(4,minmax(44px,1fr))}
 .piano-keys button{min-height:60px}
 .piano-keys kbd{display:none}
}
.theme-shortcuts{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.theme-shortcuts .btn{min-height:44px}

.arrival-heading .arrival-event-detail { margin: 8px 0 0; max-width: 34rem; font-size: 14px; line-height: 1.35; font-weight: 650; letter-spacing: normal; overflow-wrap: anywhere; }
.arrival-heading .arrival-event-detail + .arrival-event-detail { margin-top: 4px; }
.arrival-actions #arrivalRsvp { background: #fae7c5; color: #311e26; border-color: #fae7c5; }
.arrival-actions #arrivalRsvp:hover { background: #fff3d9; }
.arrival-actions #arrivalRsvp:not([hidden]) ~ #arrivalPrimary { background: #2d2236f0; color: #fff6e9; border-color: #fff3; }
@media (max-height: 480px) {
  .arrival-heading .arrival-event-detail { margin-top: 4px; font-size: 12px; }
  .arrival-heading .arrival-event-detail + .arrival-event-detail { margin-top: 2px; }
}
