@font-face {
  font-family: "Shilla";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2206-02@1.0/Shilla_CultureM-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Shilla";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2206-02@1.0/Shilla_CultureB-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #241b18;
  --muted: #73645d;
  --paper: #fff8e8;
  --paper-deep: #f4d88b;
  --red: #9f2f25;
  --red-dark: #6f1f1a;
  --lacquer: #2b1713;
  --brass: #b88745;
  --green: #315d4f;
  --shadow: 0 22px 70px rgba(49, 31, 24, 0.18);
  --radius: 8px;
  --content-width: 100%;
  --shell-padding-x: 0px;
  --region-gap: 14px;
  --app-font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font-family: "Shilla", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --rolling-banner-font-size: clamp(14px, 4.1667vw, 45px);
  --rolling-banner-height: calc(var(--rolling-banner-font-size) * 1.52);
  --rolling-banner-offset: calc(var(--rolling-banner-height) + env(safe-area-inset-top));
  --browser-color-sample-height: 1px;
  --screen-height: calc(100dvh - var(--rolling-banner-offset));
  --screen-min-height: calc(100vh - var(--rolling-banner-offset));
  --loading-bg: #aaff4d;
  --control-bg: #e9e9e9;
  --header-side-border: #8a3828;
  --header-font-size: clamp(30px, 9.7222vw, 105px);
  --header-side-border-width: clamp(8px, 2.7778vw, 30px);
  --ui-line-width: 2px;
  --header-inline-padding: clamp(6px, 1.2963vw, 14px);
  --bar-height: calc(var(--header-font-size) * 1.78);
  --decor-action-size: clamp(48px, 10.8333vw, 117px);
  --decor-complete-width: clamp(134px, 34.537vw, 373px);
  --decor-complete-font-size: clamp(16px, 4.1667vw, 45px);
  --stage-side-bg: var(--loading-bg);
  --stage-center-start: 20.8333%;
  --stage-center-end: 79.1667%;
  font-family: var(--app-font-family);
  background: #000;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell,
.screen {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--rolling-banner-offset);
  color: var(--ink);
  font-family: var(--app-font-family);
  overflow-x: hidden;
  background: #000;
}

body.is-loading-view {
  background: #000;
}

.rolling-banner {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  height: var(--rolling-banner-offset);
  padding-top: env(safe-area-inset-top);
  overflow: hidden;
  color: #fff;
  background: #000;
  user-select: none;
  pointer-events: none;
}

.rolling-banner-window {
  height: var(--rolling-banner-height);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.rolling-banner-track {
  display: flex;
  width: max-content;
  animation: rolling-banner-slide 34s linear infinite;
  will-change: transform;
}

.rolling-banner-group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(var(--rolling-banner-font-size) * 0.9);
  padding-right: calc(var(--rolling-banner-font-size) * 0.9);
  white-space: nowrap;
}

.rolling-banner-group span {
  color: #fff;
  font-size: var(--rolling-banner-font-size);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

@keyframes rolling-banner-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

input,
textarea,
label,
[role="button"],
[role="tab"] {
  touch-action: manipulation;
}

.app-shell {
  width: 100%;
  max-width: 100%;
  height: var(--screen-height);
  min-height: var(--screen-min-height);
  margin: 0;
  padding: 0 var(--shell-padding-x);
  overflow: hidden;
}

.screen {
  width: 100%;
  max-width: 100%;
  min-height: var(--screen-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.loading-screen {
  position: relative;
  min-height: var(--screen-height);
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  padding:
    clamp(28px, 8dvh, 76px)
    16px
    max(22px, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(
      to bottom,
      var(--loading-bg) 0 calc(100% - var(--browser-color-sample-height)),
      #000 calc(100% - var(--browser-color-sample-height)) 100%
    );
}

.setup-screen {
  justify-content: flex-start;
  gap: 0;
}

.main-screen {
  position: relative;
  height: var(--screen-height);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: center;
  align-items: stretch;
  gap: 0;
}

.table-stage {
  position: relative;
  width: var(--content-width);
  min-width: 0;
  aspect-ratio: 10 / 8;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    var(--stage-side-bg) 0 var(--stage-center-start),
    var(--stage-bg, #f4d88b) var(--stage-center-start) var(--stage-center-end),
    var(--stage-side-bg) var(--stage-center-end) 100%
  );
  box-shadow: none;
  overflow: visible;
  padding: 0;
  border-bottom: var(--ui-line-width) solid #000;
  z-index: 2;
  touch-action: none;
}

.setup-table {
  margin-top: 0;
  margin-bottom: 0;
}

.empty-altar {
  width: var(--content-width);
  border-radius: 0;
}

.setup-review-table {
  width: var(--content-width);
}

.primary-action:focus-visible,
.prev-setup-button:focus-visible,
.reset-decor-button:focus-visible,
.setup-complete-button:focus-visible {
  outline: var(--ui-line-width) solid rgba(49, 93, 79, 0.45);
  outline-offset: 4px;
}

.setup-form {
  width: 100%;
  justify-items: center;
}

.setup-step {
  position: relative;
  width: var(--content-width);
  min-width: 0;
  display: none;
  gap: 0;
  justify-items: center;
}

.setup-step.is-active {
  display: grid;
  height: var(--screen-height);
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
}

.setup-header {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  min-width: 0;
  align-self: start;
  display: grid;
  min-height: var(--bar-height);
  gap: 0;
  padding: 0 var(--header-inline-padding);
  border-right: var(--header-side-border-width) solid var(--header-side-border);
  border-left: var(--header-side-border-width) solid var(--header-side-border);
  border-bottom: var(--ui-line-width) solid #000;
  align-content: center;
  text-align: center;
  background: #fff;
  /* A too-long title scrolls horizontally within the white area, clipped at the
     brown side bars (the left/right borders). */
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.setup-header::-webkit-scrollbar {
  display: none;
}

.setup-header h1 {
  margin: 0;
}

.setup-header h1 {
  color: #000;
  font-family: var(--display-font-family);
  font-size: var(--header-font-size);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  word-break: keep-all;
  /* Fill (and center) when it fits; grow past the header and scroll when it doesn't. */
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
}

.main-header h1 {
  font-size: var(--header-font-size);
}

.setup-content {
  width: var(--content-width);
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: visible;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  justify-items: center;
  align-content: stretch;
}

.main-content {
  position: relative;
  align-content: stretch;
}

.screen-footer {
  width: var(--content-width);
  min-width: 0;
  align-self: end;
  min-height: var(--bar-height);
  padding: 0;
  background: var(--control-bg);
}

.setup-next {
  min-width: 0;
}

.setup-decor-actions,
.setup-confirm-actions {
  width: var(--content-width);
  min-width: 0;
  min-height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 4vw, 56px);
  padding: 0 var(--header-side-border-width);
}

.setup-confirm-actions {
  gap: clamp(10px, 3.2vw, 34px);
}

.setup-confirm-actions > button {
  min-width: 0;
}

.setup-confirm-left-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--header-side-border-width);
  min-width: 0;
}

.asset-decor {
  width: var(--content-width);
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: var(--control-bg);
}

.asset-decor-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
}

.asset-decor-tab {
  min-width: 0;
  min-height: 36px;
  border: 0;
  border-right: var(--ui-line-width) solid #000;
  border-bottom: var(--ui-line-width) solid #000;
  border-radius: 0;
  color: #000;
  background: var(--control-bg);
  font-weight: 500;
  font-size: clamp(0.98rem, 4vw, 1.2rem);
}

.asset-decor-tab:last-child {
  border-right: 0;
}

.asset-decor-tab.is-active {
  color: #fff;
  background: #000;
}

.asset-decor-panel {
  display: none;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  container-type: size;
  border-radius: 0;
  background: var(--control-bg);
  border: 0;
}

.asset-decor-panel::-webkit-scrollbar {
  display: none;
}

.asset-decor-panel.is-active {
  display: grid;
}

.decor-scrollbar,
.screen-scrollbar {
  position: absolute;
  top: var(--scrollbar-top, var(--decor-scrollbar-top, 0));
  right: 0;
  height: var(--scrollbar-height, var(--decor-scrollbar-height, 100%));
  z-index: 30;
  display: none;
  width: var(--header-side-border-width);
  min-width: 8px;
  border-right: var(--ui-line-width) solid #000;
  border-left: var(--ui-line-width) solid #000;
  pointer-events: none;
}

.decor-scrollbar.is-visible,
.screen-scrollbar.is-visible {
  display: block;
}

.decor-scrollbar-thumb,
.screen-scrollbar-thumb {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: var(--scrollbar-thumb-height, var(--decor-scrollbar-thumb-height, 42px));
  background: #000;
  transform: translateY(var(--scrollbar-thumb-top, var(--decor-scrollbar-thumb-top, 0)));
}

.setup-step.has-visible-scrollbar .asset-decor-panel,
.setup-step.has-visible-scrollbar .setup-ritual-panel,
.main-screen.has-visible-scrollbar .message-feed-panel,
.main-screen.has-visible-scrollbar .owner-access-copy,
.main-screen.has-visible-scrollbar .guest-message-panel {
  padding-right: calc(var(--header-side-border-width) * 2);
}

.wish-decor-panel.is-active {
  place-items: center;
  align-content: center;
  justify-content: center;
  overflow: hidden;
}

.bg-palette {
  height: 100%;
  padding: 12px 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  place-items: center;
}

.bg-swatch {
  position: relative;
  width: min(42px, 76%);
  aspect-ratio: 1;
  border-radius: 0;
  border: var(--ui-line-width) solid #000;
  background: var(--swatch-color);
}

.bg-swatch.is-selected {
  transform: none;
}

.bg-swatch[data-bg-marker]::after {
  content: attr(data-bg-marker);
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48%;
  min-width: 22px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #000;
  font-size: clamp(0.84rem, 3.6vw, 1.18rem);
  font-weight: 500;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.bg-swatch.is-active-bg-target[data-bg-marker]::after {
  outline: var(--ui-line-width) solid #fff;
  outline-offset: -5px;
}

.asset-dock {
  --asset-dock-columns: 5;
  --asset-token-base-size: min(82.8%, 95.9px);
  --asset-token-group-size: min(91.4%, 98px);
  --asset-token-large-size: min(100.2%, 116px);
  --asset-token-medium-size: min(91.1%, 105.5px);
  --asset-token-chicken-size: min(109.3%, 126.5px);
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--asset-dock-columns), minmax(0, 1fr));
  grid-auto-rows: minmax(58px, 1fr);
  align-content: start;
  column-gap: clamp(12px, 3vw, 28px);
  row-gap: clamp(16px, 3.6vw, 32px);
  padding: clamp(12px, 3.2vw, 28px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.asset-dock::-webkit-scrollbar {
  display: none;
}

@container (max-width: 520px) {
  .asset-dock {
    --asset-dock-columns: 4;
  }
}

@container (max-width: 360px) {
  .asset-dock {
    --asset-dock-columns: 3;
    --asset-token-base-size: min(82.8%, 62px);
    --asset-token-group-size: min(91.4%, 68px);
    --asset-token-large-size: min(100.2%, 75px);
    --asset-token-medium-size: min(91.1%, 68px);
    --asset-token-chicken-size: min(109.3%, 82px);
  }
}

@media (max-width: 520px) {
  .asset-dock {
    --asset-dock-columns: 4;
  }
}

@media (max-width: 360px) {
  .asset-dock {
    --asset-dock-columns: 3;
    --asset-token-base-size: min(82.8%, 62px);
    --asset-token-group-size: min(91.4%, 68px);
    --asset-token-large-size: min(100.2%, 75px);
    --asset-token-medium-size: min(91.1%, 68px);
    --asset-token-chicken-size: min(109.3%, 82px);
  }
}

.wish-input-row {
  --wish-input-padding: 0px;
  position: relative;
  box-sizing: border-box;
  width: min(240px, calc(100cqw - 16px), calc(100cqh - 16px));
  height: min(240px, calc(100cqw - 16px), calc(100cqh - 16px));
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  min-width: 0;
  min-height: 0;
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(4px, 2cqh, 8px);
  padding: var(--wish-input-padding);
  align-content: center;
  justify-content: center;
  cursor: text;
  touch-action: auto;
}

.wish-text-input {
  position: absolute;
  inset: var(--wish-input-padding);
  z-index: 2;
  width: calc(100% - var(--wish-input-padding) * 2);
  height: calc(100% - var(--wish-input-padding) * 2);
  border: 0;
  padding: 0;
  opacity: 1;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: transparent;
  caret-color: transparent;
  cursor: text;
  outline: 0;
  appearance: none;
  touch-action: auto;
  pointer-events: auto;
}

.wish-char-input {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: var(--ui-line-width) solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: var(--display-font-family);
  font-size: clamp(1.24rem, 11.4cqh, 2.12rem);
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.wish-input-row:focus-within .wish-char-input {
  background: #fff;
}

@container (max-height: 64px) {
  .wish-input-row {
    display: none;
  }
}

.setup-ritual-panel {
  width: var(--content-width);
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--header-side-border-width);
  overflow: hidden;
  background: var(--control-bg);
}

.setup-speech-bubble {
  --bubble-image: url("assets/bubble2.png");
  --bubble-ratio: 728 / 145;
  --bubble-padding-x: 8%;
  position: absolute;
  left: 50%;
  bottom: 2.4%;
  z-index: 7;
  box-sizing: border-box;
  width: clamp(230px, 67.4074%, 728px);
  aspect-ratio: var(--bubble-ratio);
  display: grid;
  place-items: center;
  padding: 0 var(--bubble-padding-x);
  border: 0;
  border-radius: 0;
  color: #000;
  background: transparent var(--bubble-image) center / 100% 100% no-repeat;
  font-size: clamp(12px, 2.7778vw, 30px);
  font-weight: 500;
  line-height: 1.22;
  text-align: center;
  word-break: keep-all;
  white-space: pre-line;
  transform: translateX(-50%);
  pointer-events: none;
}

.setup-speech-bubble.is-bg-prompt {
  --bubble-image: url("assets/bubble1.png");
  --bubble-ratio: 698 / 131;
  width: clamp(220px, 64.6296%, 698px);
}

.setup-speech-bubble.is-food-prompt {
  --bubble-image: url("assets/bubble3.png");
  --bubble-ratio: 918 / 145;
  --bubble-padding-x: 6%;
  width: clamp(310px, 85%, 918px);
}

.setup-speech-bubble.is-wish-prompt,
.setup-speech-bubble.setup-name-prompt,
.setup-speech-bubble.main-guest-prompt {
  --bubble-image: url("assets/bubble2.png");
  --bubble-ratio: 728 / 145;
  width: clamp(230px, 67.4074%, 728px);
}

.group-name-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--header-side-border-width) * 2);
  border: var(--ui-line-width) solid #000;
  background: #f4ff2d;
}

.group-name-card.ritual-scroll {
  --ritual-scroll-font-size: clamp(13px, 3.1481vw, 34px);
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  place-items: stretch;
  padding: calc(var(--header-side-border-width) * 2.6);
  overflow: hidden;
  color: #000;
  font-family: var(--app-font-family);
}

.group-name-scroll-body {
  position: relative;
  z-index: 1;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.group-name-scroll-body::-webkit-scrollbar {
  display: none;
}

.group-name-card::before {
  content: "";
  position: absolute;
  --frame-corner: clamp(20px, calc(var(--header-side-border-width) * 1.9), 58px);
  --frame-line: var(--ui-line-width);
  inset: var(--header-side-border-width);
  background:
    linear-gradient(#000, #000) top center / calc(100% - var(--frame-corner) * 2) var(--frame-line) no-repeat,
    linear-gradient(#000, #000) bottom center / calc(100% - var(--frame-corner) * 2) var(--frame-line) no-repeat,
    linear-gradient(#000, #000) left center / var(--frame-line) calc(100% - var(--frame-corner) * 2) no-repeat,
    linear-gradient(#000, #000) right center / var(--frame-line) calc(100% - var(--frame-corner) * 2) no-repeat,
    radial-gradient(circle at 0 0, transparent calc(var(--frame-corner) - var(--frame-line)), #000 calc(var(--frame-corner) - var(--frame-line)) var(--frame-corner), transparent var(--frame-corner)) left top / var(--frame-corner) var(--frame-corner) no-repeat,
    radial-gradient(circle at 100% 0, transparent calc(var(--frame-corner) - var(--frame-line)), #000 calc(var(--frame-corner) - var(--frame-line)) var(--frame-corner), transparent var(--frame-corner)) right top / var(--frame-corner) var(--frame-corner) no-repeat,
    radial-gradient(circle at 0 100%, transparent calc(var(--frame-corner) - var(--frame-line)), #000 calc(var(--frame-corner) - var(--frame-line)) var(--frame-corner), transparent var(--frame-corner)) left bottom / var(--frame-corner) var(--frame-corner) no-repeat,
    radial-gradient(circle at 100% 100%, transparent calc(var(--frame-corner) - var(--frame-line)), #000 calc(var(--frame-corner) - var(--frame-line)) var(--frame-corner), transparent var(--frame-corner)) right bottom / var(--frame-corner) var(--frame-corner) no-repeat;
  pointer-events: none;
}

.group-name-input {
  position: relative;
  z-index: 1;
  width: min(78%, 640px);
  border: 0;
  padding: 0;
  color: #000;
  background: transparent;
  font-family: var(--app-font-family);
  font-size: clamp(1.24rem, 11.4cqh, 2.12rem);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  outline: 0;
  appearance: none;
}

.message-feed-panel {
  width: var(--content-width);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--header-side-border-width);
  overflow: hidden;
  padding: var(--header-side-border-width);
  border: 0;
  background: var(--control-bg);
  box-shadow: none;
}

.message-feed-count {
  margin: 0;
  color: #000;
  font-size: clamp(18px, 3.3333vw, 36px);
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  word-break: keep-all;
}

.owner-access-panel {
  width: var(--content-width);
  height: 100%;
  min-height: 0;
  display: block;
  overflow: hidden;
  background: var(--control-bg);
  color: #000;
  font-family: var(--app-font-family);
  text-align: center;
}

.owner-access-scroll {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.owner-access-scroll::-webkit-scrollbar {
  display: none;
}

.owner-access-copy {
  width: 100%;
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: var(--header-side-border-width);
  padding: calc(var(--header-side-border-width) * 1.5);
}

.owner-access-copy p {
  width: 100%;
  margin: 0;
  max-width: none;
  font-size: var(--rolling-banner-font-size);
  font-weight: 500;
  line-height: 1.22;
  word-break: keep-all;
}

.owner-access-copy .owner-access-alert {
  color: #e43b22;
}

.owner-access-copy .owner-access-emphasis {
  color: #e43b22;
}

.owner-access-copy .owner-access-footnote {
  font-size: clamp(12px, 2.7778vw, 30px);
}

.main-screen.is-owner-access-notice .owner-access-panel,
.main-screen.is-owner-access-notice .action-bar {
  background: #000;
}

.main-screen.is-owner-access-notice .owner-access-copy p {
  color: #fff;
}

.main-screen.is-owner-access-notice .screen-scrollbar {
  border-color: #fff;
}

.main-screen.is-owner-access-notice .screen-scrollbar-thumb {
  background: #fff;
}

.guest-message-panel {
  position: relative;
  isolation: isolate;
  width: var(--content-width);
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--header-side-border-width);
  border: 0;
  border-radius: 0;
  background: var(--control-bg);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  transform-origin: top center;
}

.guest-message-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  /* The message row keeps a usable minimum so the 축원 field never shrinks below
     the name field; when that no longer fits, the card scrolls (custom scrollbar). */
  grid-template-rows: auto minmax(120px, 1fr);
  align-content: stretch;
  justify-items: center;
  gap: var(--header-side-border-width);
  padding: var(--header-side-border-width);
  border: var(--ui-line-width) solid #000;
  background: var(--guest-message-card-bg, #f6ff48);
  color: #000;
  font-family: var(--app-font-family);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
}

.guest-message-card::-webkit-scrollbar {
  display: none;
}

.guest-message-panel[hidden],
.message-feed-panel[hidden],
.owner-access-panel[hidden] {
  display: none;
}

.guest-message-panel.is-offering {
  pointer-events: none;
}

.guest-message-panel.is-offering .guest-message-card {
  opacity: 0;
}

.guest-message-flight-card {
  --guest-message-roll-image: url("assets/roll-yellow.png");
  position: fixed;
  z-index: 70;
  left: var(--card-start-left);
  top: var(--card-start-top);
  width: var(--card-start-width);
  height: var(--card-start-height);
  min-height: 0;
  display: block;
  padding: 0;
  border: var(--ui-line-width) solid #000;
  background: var(--guest-message-card-bg, #f6ff48);
  color: #000;
  font-family: var(--app-font-family);
  filter: drop-shadow(0 7px 10px rgba(49, 31, 24, 0.18));
  box-sizing: border-box;
  overflow: visible;
  isolation: isolate;
  pointer-events: none;
  transform-origin: top center;
  animation:
    guest-message-card-fold 1500ms steps(6, end) forwards,
    guest-message-card-fly 700ms cubic-bezier(0.4, 0, 0.2, 1) 1700ms forwards;
  will-change: left, top, width, height, transform;
}

.guest-message-flight-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  justify-items: center;
  gap: var(--header-side-border-width);
  padding: var(--header-side-border-width);
  box-sizing: border-box;
  overflow: hidden;
  animation: guest-message-card-content-hide 700ms linear 1700ms forwards;
}

.guest-message-roll {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 108%;
  aspect-ratio: 4225 / 244;
  background: transparent var(--guest-message-roll-image) center / 100% 100% no-repeat;
  opacity: 0;
  transform: translate(-50%, 56%);
  pointer-events: none;
  animation: guest-message-roll-show 1500ms steps(6, end) forwards;
}

.guest-message-flight-card.is-landed::after {
  content: "";
  position: absolute;
  inset: -52% -18%;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 12% 50%, rgba(255, 255, 238, 0.98) 0 8%, rgba(255, 237, 104, 0.82) 18%, rgba(255, 197, 39, 0.48) 34%, transparent 56%),
    radial-gradient(ellipse at 88% 50%, rgba(255, 255, 238, 0.98) 0 8%, rgba(255, 237, 104, 0.82) 18%, rgba(255, 197, 39, 0.48) 34%, transparent 56%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 226, 90, 0.18) 0 46%, transparent 72%);
  filter: blur(4px);
  mix-blend-mode: screen;
  animation: pig-mouth-glow 1600ms ease-in-out infinite;
}

.guest-message-flight-card.is-landed .guest-message-flight-content {
  opacity: 0;
}

@keyframes pig-mouth-glow {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes guest-message-card-fold {
  0% {
    height: var(--card-start-height);
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    height: var(--card-folded-height);
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes guest-message-card-fly {
  0% {
    left: var(--card-start-left);
    top: var(--card-start-top);
    width: var(--card-start-width);
    height: var(--card-folded-height);
    border-width: 0;
    opacity: 1;
    transform: rotate(0deg);
  }
  100% {
    left: var(--card-target-left);
    top: var(--card-target-top);
    width: var(--card-target-width);
    height: var(--card-target-height);
    border-width: 0;
    opacity: 1;
    transform: rotate(-3deg);
  }
}

@keyframes guest-message-card-content-hide {
  0%,
  100% {
    opacity: 0;
  }
}

@keyframes guest-message-roll-show {
  0% {
    opacity: 0;
  }

  12%,
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guest-message-flight-card,
  .guest-message-flight-content,
  .guest-message-roll {
    animation-duration: 1ms;
    animation-delay: 0ms;
  }
}

.message-feed {
  height: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--header-side-border-width);
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.message-feed::-webkit-scrollbar {
  display: none;
}

.asset-token {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  user-select: none;
  touch-action: none;
}

.asset-token:active {
  transform: translateY(1px);
}

.asset-token-ghost {
  position: fixed;
  z-index: 9999;
  width: min(28vw, 132px);
  height: min(28vw, 132px);
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 16px 20px rgba(43, 23, 19, 0.24));
}

.asset-token-ghost-group {
  display: block;
  object-fit: initial;
}

.asset-token-candy-ghost {
  overflow: visible;
}

.asset-token-candy-ghost-image {
  position: absolute;
  width: 72%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.asset-token-candy-ghost-image-0 {
  left: 0;
  top: 5%;
}

.asset-token-candy-ghost-image-1 {
  right: 0;
  bottom: 5%;
}

.native-asset-token-ghost {
  transform: none;
}

.asset-token-image {
  width: var(--asset-token-base-size, min(82.8%, 95.9px));
  aspect-ratio: 1;
  object-fit: contain;
  pointer-events: none;
  filter: none;
}

.asset-token-image-group {
  display: block;
  position: relative;
  width: var(--asset-token-group-size, min(91.4%, 98px));
  aspect-ratio: 1;
  pointer-events: none;
  filter: none;
}

.asset-token-image-group .asset-token-image {
  position: absolute;
  width: 68%;
  height: 68%;
  filter: none;
}

.asset-token[data-asset-value="pineapple"] .asset-token-image,
.asset-token[data-asset-value="watermelon"] .asset-token-image,
.asset-token[data-asset-value="hamburger"] .asset-token-image,
.asset-token[data-asset-value="tteok"] .asset-token-image,
.asset-token[data-asset-value="mara"] .asset-token-image {
  width: var(--asset-token-large-size, min(100.2%, 116px));
}

.asset-token[data-asset-value="grape"] .asset-token-image,
.asset-token[data-asset-value="mandu"] .asset-token-image,
.asset-token[data-asset-value="pizza"] .asset-token-image,
.asset-token[data-asset-value="sushi"] .asset-token-image {
  width: var(--asset-token-medium-size, min(91.1%, 105.5px));
}

.asset-token[data-asset-value="chicken"] .asset-token-image {
  width: var(--asset-token-chicken-size, min(109.3%, 126.5px));
}

.asset-token-image-group .asset-token-image-0 {
  left: 0;
  top: 7%;
}

.asset-token-image-group .asset-token-image-1 {
  right: 0;
  bottom: 7%;
}

.asset-token-ghost-group .asset-token-image-group {
  width: 100%;
  height: 100%;
}

.loading-layout {
  width: min(100%, 320px);
  display: grid;
  justify-items: center;
  gap: clamp(20px, 4.1dvh, 32px);
  transform: translateY(clamp(-32px, -4dvh, -18px));
}

.loading-logo {
  width: min(30vw, 136px);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.16));
}

.loading-offering {
  position: relative;
  width: min(42vw, 176px);
  height: min(53vw, 218px);
}

.loading-bowl {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: 82%;
  height: auto;
  display: block;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 10px rgba(62, 24, 12, 0.22));
  pointer-events: none;
  user-select: none;
}

.loading-candy-stack {
  position: absolute;
  left: 50%;
  bottom: 27%;
  z-index: 2;
  width: 132px;
  height: 188px;
  overflow: visible;
  transform: translateX(-50%) scale(0.8);
  transform-origin: center bottom;
}

.loading-candy-layer {
  position: absolute;
  left: 50%;
  bottom: var(--layer-bottom);
  width: 132px;
  height: 104px;
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-candy {
  position: absolute;
  width: 54px;
  height: 54px;
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.loading-candy-0 {
  left: 39px;
  top: 0;
  z-index: 2;
}

.loading-candy-1 {
  left: 15px;
  top: 50px;
  z-index: 1;
}

.loading-candy-2 {
  right: 15px;
  top: 50px;
  z-index: 1;
}

.loading-caption {
  margin: 0;
  color: #15290b;
  font-size: clamp(0.98rem, 3.9vw, 1.18rem);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 2px rgba(21, 41, 11, 0.16);
  word-break: keep-all;
}

.loading-copyright {
  align-self: end;
  margin: 0;
  color: rgba(21, 41, 11, 0.58);
  font-family: var(--app-font-family);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.ritual-scroll {
  --ritual-scroll-font-size: clamp(0.78rem, 2.8vw, 0.88rem);
  min-height: auto;
  padding: 28px 24px;
  display: grid;
  gap: 12px;
  color: #4e3731;
  font-size: var(--ritual-scroll-font-size);
  text-align: left;
}

.ritual-scroll p {
  margin: 0;
  font-size: inherit;
  line-height: 1.78;
  word-break: keep-all;
}

.ritual-scroll strong {
  color: var(--red-dark);
  font-weight: 500;
}

.ritual-date,
.sanghyang {
  text-align: center;
  color: var(--red-dark);
  font-size: var(--ritual-scroll-font-size);
  font-weight: 500;
}

.sanghyang {
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.inline-name-input {
  width: min(42vw, 160px);
  min-width: 98px;
  border: 0;
  border-bottom: var(--ui-line-width) solid rgba(111, 31, 26, 0.38);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.34);
  color: var(--red-dark);
  padding: 2px 4px 1px;
  font-size: max(16px, var(--ritual-scroll-font-size));
  font-weight: 500;
  text-align: center;
  outline-offset: 3px;
}

.inline-name-input::placeholder {
  color: rgba(111, 31, 26, 0.48);
}

.guest-message-panel label,
.guest-message-flight-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.guest-message-panel label,
.guest-message-flight-card label {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: start;
  gap: var(--header-side-border-width);
  color: #000;
  font-family: inherit;
  font-size: var(--rolling-banner-font-size);
  font-weight: 500;
  text-align: center;
}

.guest-message-panel input,
.guest-message-panel textarea,
.guest-message-flight-card input,
.guest-message-flight-card textarea {
  width: 100%;
  border: var(--ui-line-width) solid rgba(36, 27, 24, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  padding: 12px 13px;
  font-size: 1rem;
}

.guest-message-panel input,
.guest-message-panel textarea,
.guest-message-flight-card input,
.guest-message-flight-card textarea {
  border-color: #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: max(16px, var(--rolling-banner-font-size));
  font-weight: 500;
  line-height: 1.2;
  padding: var(--header-side-border-width);
}

.guest-message-panel input::placeholder,
.guest-message-panel textarea::placeholder,
.guest-message-flight-card input::placeholder,
.guest-message-flight-card textarea::placeholder {
  color: #000;
  opacity: 1;
}

.guest-message-panel textarea,
.guest-message-flight-card textarea {
  resize: vertical;
  min-height: 112px;
}

.guest-message-body {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
}

.guest-message-panel textarea {
  height: 100%;
  min-height: 0;
  resize: none;
}

.guest-message-flight-card textarea {
  height: 100%;
  min-height: 0;
  resize: none;
}

.decor-layer {
  position: absolute;
}

.decor-layer {
  inset: 0;
  z-index: 1;
  transform: translateY(-3%);
  pointer-events: none;
}

.empty-altar .decor-layer {
  pointer-events: auto;
}

.decor-item {
  position: absolute;
  display: block;
  filter: drop-shadow(0 10px 10px rgba(20, 10, 8, 0.2));
}

.empty-altar .plate-slot.is-filled {
  cursor: grab;
  touch-action: none;
}

.empty-altar .plate-slot.is-filled:active {
  cursor: grabbing;
}

.decor-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.decor-pig-box {
  left: 50%;
  bottom: 6%;
  z-index: 2;
  width: 28%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  filter: drop-shadow(0 10px 10px rgba(20, 10, 8, 0.18));
}

.decor-pig {
  left: 50%;
  bottom: 11%;
  z-index: 4;
  width: 30%;
  aspect-ratio: 1234 / 1359;
  transform: translateX(-50%);
}

.decor-pig > .decor-image {
  position: relative;
  z-index: 0;
}

.pig-money-decor {
  position: absolute;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 4px 5px rgba(43, 23, 19, 0.24));
}

.pig-money-mouth {
  left: 50%;
  width: 45%;
  transform: translateX(-50%);
}

.pig-money-mouth-1 {
  top: 81%;
}

.pig-money-mouth-2 {
  top: 76.5%;
  width: 45%;
}

.pig-money-mouth-3 {
  top: 71%;
  width: 45%;
}

.pig-money-ear {
  width: 25%;
}

.pig-money-left-ear-1 {
  left: -10%;
  top: 30%;
}

.pig-money-right-ear-1 {
  right: -11%;
  top: 30%;
}

.pig-money-left-ear-2 {
  left: -12%;
  top: 20%;
}

.pig-money-right-ear-2 {
  right: -12%;
  top: 17%;
}

.pig-money-left-ear-3 {
  left: -10%;
  top: 5%;
  width: 24%;
}

.pig-money-right-ear-3 {
  right: -12%;
  top: 4%;
  width: 27%;
}

.decor-ricecake {
  left: 50%;
  bottom: 50%;
  z-index: 3;
  width: 30%;
  aspect-ratio: 1;
  transform: translateX(-50%);
}

.decor-gulbi {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1385 / 384;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 5px rgba(43, 23, 19, 0.2));
  pointer-events: none;
}

.wish-char-row {
  position: absolute;
  left: 0;
  right: 0;
  top: -6%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  place-items: center;
  padding: 12%;
}

.wish-char {
  color: #fff6d8;
  font-family: var(--display-font-family);
  font-weight: 700;
  font-size: clamp(1.36rem, 5.8vw, 1.95rem);
  line-height: 1;
  text-shadow: 0 1px 3px rgba(20, 8, 6, 0.75);
}

.plate-slot {
  z-index: 3;
  width: 17%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background-image: url("assets/asset-bowl.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.plate-slot .decor-image {
  padding: 8% 16% 34% 16%;
}

.plate-slot .plate-asset-chicken,
.plate-slot .plate-asset-grape,
.plate-slot .plate-asset-pineapple,
.plate-slot .plate-asset-watermelon,
.plate-slot .plate-asset-hamburger,
.plate-slot .plate-asset-tteok,
.plate-slot .plate-asset-mara {
  width: 144%;
  height: 144%;
  margin: -22%;
}

.plate-slot .plate-asset-chicken,
.plate-slot .plate-asset-hamburger {
  margin: -28% -22% -16%;
}

.plate-slot .plate-asset-chicken {
  margin: -34% -22% -10%;
}

.plate-slot .plate-asset-pineapple,
.plate-slot .plate-asset-watermelon {
  width: 158.4%;
  height: 158.4%;
  margin: -44% -29.2% -14.4%;
}

.plate-slot .plate-asset-pineapple {
  margin: -52% -29.2% -6.4%;
}

.plate-slot .plate-asset-tteok,
.plate-slot .plate-asset-mara {
  width: 158.4%;
  height: 158.4%;
  margin: -36% -29.2% -22.4%;
}

.plate-stack {
  position: absolute;
  left: 50%;
  bottom: 28%;
  width: 104%;
  height: 92%;
  transform: translateX(-50%);
  pointer-events: none;
}

.plate-stack .decor-image {
  padding: 0;
}

.plate-stack-item {
  position: absolute;
  width: 38%;
  height: 38%;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(43, 23, 19, 0.12));
}

.plate-stack-mandu,
.plate-stack-sushi {
  transform: translateX(-50%) scale(1.33);
  transform-origin: bottom center;
}

.plate-stack-item-0 {
  left: 12%;
  bottom: 0;
  z-index: 1;
}

.plate-stack-item-1 {
  right: 12%;
  bottom: 0;
  z-index: 1;
}

.plate-stack-item-2 {
  left: 20%;
  bottom: 22%;
  z-index: 2;
}

.plate-stack-item-3 {
  right: 20%;
  bottom: 22%;
  z-index: 2;
}

.plate-stack-item-4 {
  left: 50%;
  bottom: 42%;
  z-index: 3;
  transform: translateX(-50%);
}

.plate-stack-mandu .plate-stack-item,
.plate-stack-sushi .plate-stack-item {
  width: 42%;
  height: 42%;
}

.plate-stack-mandu .plate-stack-item-0,
.plate-stack-sushi .plate-stack-item-0 {
  left: 14%;
}

.plate-stack-mandu .plate-stack-item-1,
.plate-stack-sushi .plate-stack-item-1 {
  right: 14%;
}

.plate-stack-mandu .plate-stack-item-2,
.plate-stack-sushi .plate-stack-item-2 {
  left: 22%;
  bottom: 18%;
}

.plate-stack-mandu .plate-stack-item-3,
.plate-stack-sushi .plate-stack-item-3 {
  right: 22%;
  bottom: 18%;
}

.plate-stack-mandu .plate-stack-item-4,
.plate-stack-sushi .plate-stack-item-4 {
  bottom: 36%;
}

.plate-stack-count-3 .plate-stack-item-0 {
  left: 16%;
  bottom: 0;
  z-index: 1;
}

.plate-stack-count-3 .plate-stack-item-1 {
  right: 16%;
  bottom: 0;
  z-index: 1;
}

.plate-stack-count-3 .plate-stack-item-2 {
  left: 50%;
  bottom: 28%;
  z-index: 2;
  transform: translateX(-50%);
}

.plate-stack-pizza {
  width: 120%;
  height: 106%;
}

.plate-stack-pizza .plate-stack-item {
  left: 50%;
  right: auto;
  width: 100%;
  height: 100%;
  transform: translateX(-50%);
}

.plate-stack-pizza .plate-stack-item-0 {
  bottom: 0;
  z-index: 1;
}

.plate-stack-pizza .plate-stack-item-1 {
  bottom: 13%;
  z-index: 2;
}

.plate-stack-pizza .plate-stack-item-2 {
  bottom: 26%;
  z-index: 3;
}

.plate-stack.is-stacking .plate-stack-item {
  opacity: 0;
  animation: plate-stack-pop 180ms ease-out forwards;
}

.plate-stack.is-stacking .plate-stack-item-0 {
  animation-delay: 0ms;
}

.plate-stack.is-stacking .plate-stack-item-1 {
  animation-delay: 90ms;
}

.plate-stack.is-stacking .plate-stack-item-2 {
  animation-delay: 180ms;
}

.plate-stack.is-stacking .plate-stack-item-3 {
  animation-delay: 270ms;
}

.plate-stack.is-stacking .plate-stack-item-4 {
  animation-delay: 390ms;
}

@keyframes plate-stack-pop {
  0% {
    opacity: 0;
    scale: 0.72;
  }

  100% {
    opacity: 1;
    scale: 1;
  }
}

.plate-content-ghost {
  position: fixed;
  z-index: 20;
  display: block;
  width: min(23vw, 104px);
  height: min(23vw, 104px);
  aspect-ratio: 1;
  bottom: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 16px 20px rgba(43, 23, 19, 0.24));
}

.plate-content-ghost > .decor-image {
  width: 78%;
  height: 78%;
  margin: 11%;
  padding: 0;
}

.plate-content-ghost .plate-stack {
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.plate-slot-0 {
  left: 13%;
  bottom: 11%;
}

.plate-slot-1 {
  left: 24%;
  bottom: 38%;
}

.plate-slot-2 {
  left: 13%;
  bottom: 65%;
}

.plate-slot-3 {
  left: 87%;
  bottom: 11%;
}

.plate-slot-4 {
  left: 76%;
  bottom: 38%;
}

.plate-slot-5 {
  left: 87%;
  bottom: 65%;
}

.action-bar {
  width: var(--content-width);
  min-width: 0;
  min-height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 0;
  padding: 0 var(--header-side-border-width);
  background: var(--control-bg);
}

.prev-setup-button,
.reset-decor-button,
.setup-complete-button {
  appearance: none;
  border: 0;
  font-family: var(--app-font-family);
  cursor: pointer;
}

.prev-setup-button,
.reset-decor-button {
  flex: 0 0 auto;
  width: var(--decor-action-size);
  height: var(--decor-action-size);
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background: #000;
}

.prev-setup-icon {
  width: 68%;
  height: 68%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
  overflow: visible;
  transform: translateX(-7%);
}

.reset-decor-icon {
  width: 68%;
  height: 68%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
  overflow: visible;
  transform: translateY(6%);
}

.setup-complete-button {
  flex: 0 1 auto;
  width: var(--decor-complete-width);
  height: var(--decor-action-size);
  max-width: calc(100% - var(--decor-action-size) - clamp(56px, 16vw, 280px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--decor-action-size) * 0.12);
  padding: 0 calc(var(--decor-action-size) * 0.28);
  border: var(--ui-line-width) solid #000;
  border-radius: 999px;
  color: #000;
  background: transparent;
  font-size: var(--decor-complete-font-size);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.setup-confirm-actions .setup-complete-button {
  max-width: calc(100% - var(--decor-action-size) * 2 - var(--header-side-border-width) * 4);
}

.setup-complete-button.is-complete {
  color: #fff;
  background: #000;
}

.setup-complete-arrow {
  width: 0.43em;
  height: 0.76em;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: var(--radius);
  border: var(--ui-line-width) solid transparent;
  padding: 0 18px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
}

.primary-action {
  color: #fffaf0;
  background: linear-gradient(180deg, #b53d2f, #7d241d);
  box-shadow: 0 12px 22px rgba(125, 36, 29, 0.23);
}

.screen-footer .primary-action {
  width: 100%;
  min-width: 0;
  min-height: var(--bar-height);
  color: #000;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--app-font-family);
  font-size: calc(var(--header-font-size) * 0.42);
  font-weight: 500;
}

.screen-footer .main-invite-button {
  width: clamp(240px, calc(var(--content-width) * 0.558333), 603px);
  height: var(--decor-action-size);
  min-height: 0;
  border: var(--ui-line-width) solid #000;
  border-radius: 999px;
  color: #fff;
  background: #000;
  font-size: var(--decor-complete-font-size);
  line-height: 1;
}

.main-screen.is-owner-access-notice .screen-footer .main-invite-button {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.message-item p {
  margin: 0;
  max-width: 100%;
  color: #000;
  font-size: clamp(18px, 3.3333vw, 36px);
  font-weight: 500;
  line-height: 1.24;
  word-break: keep-all;
}

.message-item {
  position: relative;
  min-height: calc(var(--header-side-border-width) * 3 + clamp(18px, 3.3333vw, 36px) * 2.5);
  padding: var(--header-side-border-width);
  overflow: hidden;
  border: var(--ui-line-width) solid #000;
  border-radius: 0;
  background: var(--message-item-start, #fff);
}

.message-item::before {
  content: none;
}

.message-item-footer {
  position: static;
  margin-top: var(--header-side-border-width);
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: var(--header-side-border-width);
  color: #000;
  font-size: clamp(16px, 3.3333vw, 36px);
  font-weight: 500;
  line-height: 1.1;
}

.message-item-footer strong {
  font-weight: 500;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  width: min(calc(100% - 32px), 420px);
  padding: 13px 16px;
  border-radius: var(--radius);
  color: #fffaf0;
  background: rgba(36, 27, 24, 0.92);
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 15px 50px rgba(20, 10, 6, 0.24);
  z-index: 10;
}

.empty-screen {
  min-height: var(--screen-height);
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  padding:
    clamp(28px, 8dvh, 76px)
    var(--header-side-border-width)
    max(22px, env(safe-area-inset-bottom));
  background:
    linear-gradient(
      to bottom,
      var(--loading-bg) 0 calc(100% - var(--browser-color-sample-height)),
      #000 calc(100% - var(--browser-color-sample-height)) 100%
    );
}

.empty-state {
  width: 100%;
  max-width: min(720px, calc(100% - var(--header-side-border-width) * 2));
  display: grid;
  justify-items: center;
  gap: var(--header-side-border-width);
  padding: 0;
  color: #000;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.empty-visual {
  width: min(100%, 320px);
}

.empty-state strong {
  color: #000;
  font-size: clamp(0.98rem, 3.9vw, 1.18rem);
  font-weight: 900;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.empty-state span {
  margin: 0;
  color: rgba(0, 0, 0, 0.72);
  font-size: clamp(0.98rem, 3.9vw, 1.18rem);
  font-weight: 500;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.connection-retry-button {
  width: min(100%, 180px);
  margin-top: 4px;
}

@media (min-width: 680px) and (hover: hover) and (pointer: fine) {
  :root {
    --content-width: min(100%, 56.25dvh);
    --rolling-banner-font-size: clamp(14px, 2.34375dvh, 45px);
    --header-font-size: clamp(30px, 5.46875dvh, 105px);
    --header-side-border-width: clamp(8px, 1.5625dvh, 30px);
    --header-inline-padding: clamp(6px, 0.7292dvh, 14px);
    --decor-action-size: clamp(48px, 6.09375dvh, 117px);
    --decor-complete-width: clamp(134px, 19.4271dvh, 373px);
    --decor-complete-font-size: clamp(16px, 2.34375dvh, 45px);
  }

  .rolling-banner {
    right: auto;
    left: 50%;
    width: var(--content-width);
    transform: translateX(-50%);
  }

  .app-shell {
    width: var(--content-width);
    max-width: var(--content-width);
    margin: 0 auto;
    display: grid;
    place-items: center;
  }

  .screen {
    width: var(--content-width);
    max-width: var(--content-width);
  }

  .setup-speech-bubble,
  .owner-access-copy .owner-access-footnote {
    font-size: clamp(12px, 1.5625dvh, 30px);
  }

  .group-name-card.ritual-scroll {
    --ritual-scroll-font-size: clamp(13px, 2.05dvh, 22px);
  }

  .message-feed-count,
  .message-item p {
    font-size: clamp(16px, 2.05dvh, 22px);
  }

  .message-item {
    min-height: calc(var(--header-side-border-width) * 3 + clamp(16px, 2.05dvh, 22px) * 2.5);
  }

  .message-item-footer {
    font-size: clamp(14px, 1.82dvh, 20px);
  }

  .guest-message-panel label,
  .guest-message-flight-card label {
    font-size: clamp(15px, 1.95dvh, 21px);
  }

  .guest-message-panel input,
  .guest-message-panel textarea,
  .guest-message-flight-card input,
  .guest-message-flight-card textarea {
    font-size: clamp(16px, 1.95dvh, 21px);
  }

}

@media (max-width: 679px), (hover: none), (pointer: coarse) {
  :root {
    --content-width: 100%;
    --shell-padding-x: 0px;
    --rolling-banner-font-size: clamp(14px, 4.1667vw, 45px);
    --header-font-size: clamp(30px, 9.7222vw, 105px);
    --header-side-border-width: clamp(8px, 2.7778vw, 30px);
    --header-inline-padding: clamp(6px, 1.2963vw, 14px);
    --decor-action-size: clamp(48px, 10.8333vw, 117px);
    --decor-complete-width: clamp(134px, 34.537vw, 373px);
    --decor-complete-font-size: clamp(16px, 4.1667vw, 45px);
  }

  .rolling-banner {
    right: 0;
    left: 0;
    width: auto;
    transform: none;
  }

  .app-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: block;
  }

  .screen {
    width: 100%;
    max-width: 100%;
  }

  body.is-group-field-focused .setup-step[data-setup-step="blessing"].is-active,
  body.is-wish-field-focused .setup-step[data-setup-step="decorate"].is-active,
  body.is-guest-field-focused .main-screen.is-guest-entry {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body.is-guest-field-focused .guest-message-panel {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body.is-group-field-focused .group-name-scroll-body,
  body.is-wish-field-focused .asset-decor-panel.is-active {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body.is-wish-field-focused .wish-decor-panel.is-active {
    display: block;
    padding:
      max(12px, var(--header-side-border-width))
      0
      max(18px, var(--keyboard-viewport-inset, 0px));
  }

  body.is-wish-field-focused .wish-input-row {
    margin: 0 auto;
  }

  body.is-group-field-focused .group-name-scroll-body::after,
  body.is-wish-field-focused .asset-decor-panel.is-active::after {
    content: "";
    display: block;
    min-height: max(18px, var(--keyboard-viewport-inset, 0px));
  }

  body.is-guest-field-focused .guest-message-card {
    height: auto;
    min-height: calc(100% + max(18px, var(--keyboard-viewport-inset, 0px)));
  }
}

@media (max-width: 430px) {
  :root {
    --content-width: 100%;
    --shell-padding-x: 0px;
  }

  .setup-step,
  .setup-header,
  .table-stage,
  .asset-decor,
  .setup-ritual-panel,
  .message-feed-panel,
  .guest-message-panel,
  .setup-decor-actions,
  .setup-confirm-actions,
  .action-bar,
  .empty-state {
    width: var(--content-width);
  }
}

@media (min-height: 480px) {
  body.is-wide-table-layout {
    --content-width: min(100vw, calc((var(--screen-height) - var(--bar-height)) * 1.25));
    --rolling-banner-font-size: clamp(14px, 3.2dvh, 30px);
    --header-font-size: clamp(30px, 5.46875dvh, 64px);
    --header-side-border-width: clamp(8px, 1.5625dvh, 18px);
    --header-inline-padding: clamp(6px, 0.7292dvh, 12px);
    --decor-action-size: clamp(48px, 6.4dvh, 74px);
    --decor-complete-width: clamp(150px, 27dvh, 260px);
    --decor-complete-font-size: clamp(18px, 3.1dvh, 30px);
    --wide-third-area-height: clamp(168px, 23dvh, 264px);
    --wide-third-area-tall-height: clamp(260px, 34dvh, 430px);
    overflow-y: auto;
  }

  body.is-wide-table-layout .rolling-banner {
    right: auto;
    left: 50%;
    width: var(--content-width);
    transform: translateX(-50%);
  }

  body.is-wide-table-layout .app-shell {
    width: var(--content-width);
    max-width: var(--content-width);
    height: auto;
    min-height: var(--screen-height);
    margin: 0 auto;
    display: block;
    overflow: visible;
  }

  body.is-wide-table-layout .screen,
  body.is-wide-table-layout .setup-step,
  body.is-wide-table-layout .setup-header,
  body.is-wide-table-layout .table-stage,
  body.is-wide-table-layout .asset-decor,
  body.is-wide-table-layout .setup-ritual-panel,
  body.is-wide-table-layout .message-feed-panel,
  body.is-wide-table-layout .owner-access-panel,
  body.is-wide-table-layout .guest-message-panel,
  body.is-wide-table-layout .setup-decor-actions,
  body.is-wide-table-layout .setup-confirm-actions,
  body.is-wide-table-layout .action-bar {
    width: 100%;
    max-width: 100%;
  }

  body.is-wide-table-layout .setup-step.is-active,
  body.is-wide-table-layout .main-screen {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: start;
    justify-items: stretch;
    overflow: visible;
  }

  body.is-wide-table-layout .setup-step.is-active > .setup-content,
  body.is-wide-table-layout .main-screen > .main-content {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    justify-items: stretch;
    overflow: visible;
  }

  body.is-wide-table-layout .setup-step.is-active .table-stage,
  body.is-wide-table-layout .main-screen .table-stage {
    align-self: start;
    justify-self: stretch;
    overflow: visible;
    border-right: 0;
    border-bottom: var(--ui-line-width) solid #000;
  }

  body.is-wide-table-layout .asset-decor {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
  }

  body.is-wide-table-layout .asset-decor-panel.is-active {
    height: var(--wide-third-area-height);
    min-height: 0;
    max-height: var(--wide-third-area-height);
  }

  body.is-wide-table-layout .setup-ritual-panel,
  body.is-wide-table-layout .message-feed-panel,
  body.is-wide-table-layout .owner-access-panel,
  body.is-wide-table-layout .guest-message-panel {
    height: var(--wide-third-area-tall-height);
    min-height: var(--wide-third-area-tall-height);
    max-height: var(--wide-third-area-tall-height);
    align-self: start;
    justify-self: stretch;
  }

  body.is-wide-table-layout .screen-footer,
  body.is-wide-table-layout .setup-decor-actions,
  body.is-wide-table-layout .setup-confirm-actions,
  body.is-wide-table-layout .action-bar {
    min-height: clamp(64px, 8dvh, 88px);
  }

  body.is-wide-table-layout .setup-decor-actions,
  body.is-wide-table-layout .setup-confirm-actions,
  body.is-wide-table-layout .action-bar {
    padding: clamp(8px, 1.2dvh, 14px) var(--header-side-border-width);
  }

  body.is-wide-table-layout .asset-decor-tab,
  body.is-wide-table-layout .message-feed-count,
  body.is-wide-table-layout .message-item p,
  body.is-wide-table-layout .owner-access-copy .owner-access-footnote,
  body.is-wide-table-layout .guest-message-panel label,
  body.is-wide-table-layout .guest-message-flight-card label,
  body.is-wide-table-layout .guest-message-panel input,
  body.is-wide-table-layout .guest-message-panel textarea,
  body.is-wide-table-layout .guest-message-flight-card input,
  body.is-wide-table-layout .guest-message-flight-card textarea {
    font-size: clamp(14px, 2.25dvh, 22px);
  }

  body.is-wide-table-layout .setup-speech-bubble {
    font-size: clamp(14px, 2.7dvh, 24px);
  }

  body.is-wide-table-layout .owner-access-copy p {
    font-size: clamp(16px, 2.8dvh, 28px);
  }

  body.is-wide-table-layout .group-name-card.ritual-scroll {
    --ritual-scroll-font-size: clamp(14px, 2.25dvh, 22px);
  }

  body.is-wide-table-layout .bg-palette {
    grid-template-columns: repeat(5, minmax(54px, 92px));
    grid-template-rows: repeat(3, minmax(42px, 1fr));
    justify-content: center;
    padding: clamp(12px, 2dvh, 18px) clamp(20px, 4dvh, 44px);
    gap: clamp(10px, 2dvh, 20px) clamp(24px, 5dvh, 72px);
  }

  body.is-wide-table-layout .bg-swatch {
    width: clamp(42px, 5dvh, 58px);
  }

  body.is-wide-table-layout .asset-dock {
    --asset-dock-columns: 8;
    grid-auto-rows: minmax(72px, 1fr);
    padding: clamp(12px, 2dvh, 20px) clamp(18px, 4dvh, 40px);
    row-gap: clamp(12px, 2.4dvh, 22px);
    column-gap: clamp(14px, 3dvh, 28px);
  }

  body.is-wide-table-layout .screen-footer .main-invite-button {
    width: min(56%, 360px);
  }
}
