:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #fbf5f4;
  --muted: #b9adb4;
  --line: rgb(255 255 255 / 10%);
  --panel: #1b171f;
  --rose: #ff9aac;
  --gold: #f2d3a5;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #141016; color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .42; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
[hidden] { display: none !important; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
button { border: 0; }
.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; }
.partner-room { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate; }
.partner-room:fullscreen { width: 100%; height: 100%; background: #141016; }
.room-content { display: grid; grid-template-columns: minmax(0, 1fr) 350px; height: 100%; min-height: 0; }
.host-stage { position: relative; min-width: 0; height: 100%; overflow: hidden; background: radial-gradient(ellipse at 55% 35%, #68504c, #211c2b 65%); }
.scene-image { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: center 27%; }
.scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 13 21 / 65%) 0, rgb(20 13 21 / 8%) 32%, transparent 48%, rgb(20 13 21 / 25%) 64%, rgb(20 13 21 / 91%) 100%); pointer-events: none; }
.room-header { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: max(24px, env(safe-area-inset-top)) 30px 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 25px; font-weight: 750; letter-spacing: -1.2px; }
.brand-symbol { display: grid; place-items: center; width: 33px; height: 33px; padding-bottom: 5px; background: linear-gradient(140deg, #ffb9bc, #ed6f92); border-radius: 12px 12px 12px 5px; font-family: Georgia, serif; font-size: 31px; font-weight: 700; color: #321625; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 30px; padding: 6px 9px; color: #fff3e7; font-size: 10px; line-height: 1.15; letter-spacing: .03em; white-space: nowrap; background: rgb(31 20 30 / 35%); }
.demo-badge > span:first-child { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.header-actions { display: flex; gap: 7px; margin-left: auto; }
.icon-button { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; background: rgb(36 25 35 / 38%); border: 1px solid rgb(255 255 255 / 12%); border-radius: 50%; font-size: 27px; line-height: 1; }
.icon-button:hover { background: rgb(78 49 64 / 78%); }
.host-profile { position: absolute; z-index: 1; display: flex; align-items: center; gap: 12px; top: calc(max(24px, env(safe-area-inset-top)) + 77px); left: 32px; right: 28px; text-shadow: 0 2px 12px rgb(0 0 0 / 28%); }
.host-avatar { display: grid; place-items: center; width: 49px; height: 49px; flex: 0 0 auto; border-radius: 50%; border: 2px solid rgb(255 240 216 / 66%); background: linear-gradient(150deg, #e7c1a4, #8e667b); color: #fff9f3; font: italic 26px Georgia, serif; }
.host-heading { display: flex; align-items: center; gap: 9px; }
.host-heading h1 { margin: 0; font: 26px Georgia, 'Times New Roman', serif; }
.host-heading > span { color: #f1d3c8; font-size: 11px; border-left: 1px solid rgb(255 255 255 / 30%); padding-left: 9px; }
.host-profile p { margin: 5px 0 0; color: #f5e6e3; font-size: 12px; line-height: 1.45; }
.scene-caption { display: flex; align-items: center; gap: 9px; position: absolute; bottom: 127px; left: 32px; right: 30px; color: #e2d1d0; font-size: 10px; line-height: 1.5; letter-spacing: .02em; }
.caption-rule { width: 24px; height: 1px; background: #dac1ac; flex: 0 0 auto; }
.background-notice { position: absolute; top: 180px; left: 24px; right: 24px; padding: 12px 16px; border-radius: 12px; background: rgb(29 19 28 / 85%); color: var(--gold); font-size: 13px; z-index: 2; }
.stage-footer { position: absolute; left: 30px; right: 30px; bottom: max(23px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 15px; }
.room-feedback { display: flex; align-items: center; gap: 8px; min-height: 19px; font-size: 12px; color: #e2ccd2; }
.room-feedback p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.feedback-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rose); flex: 0 0 auto; }
.stage-buttons { display: flex; align-items: center; gap: 13px; }
.primary-button, .secondary-button { min-height: 44px; padding: 11px 20px; border-radius: 14px; font-size: 13px; font-weight: 650; line-height: 1.35; display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-align: center; }
.primary-button { background: linear-gradient(115deg, #f8bdc5, #f18d9f); color: #39202b; box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), 0 7px 22px rgb(149 53 83 / 17%); }
.primary-button:hover:not(:disabled) { background: linear-gradient(115deg, #ffd2d7, #f7a1b0); }
.secondary-button { background: #2c242f; border: 1px solid rgb(255 255 255 / 12%); color: #f3dfe6; }
.secondary-button:hover:not(:disabled) { background: #3a2d3b; }
.gift-open { min-height: 49px; padding: 13px 22px; border-radius: 18px; }
.gift-open svg { width: 23px; height: 23px; }
.like-button { display: flex; gap: 8px; justify-content: center; align-items: center; min-height: 49px; min-width: 80px; padding: 10px 15px; background: rgb(42 26 39 / 56%); border: 1px solid rgb(255 255 255 / 20%); border-radius: 18px; }
.like-button > span:first-child { font-size: 27px; color: #ffb8c5; line-height: .8; }
.like-button > span:last-child { color: #f1dfe6; font-size: 12px; }
.host-reaction { position: absolute; display: flex; align-items: center; gap: 10px; bottom: 164px; left: 32px; max-width: min(410px, calc(100% - 64px)); padding: 13px 17px; background: rgb(45 25 41 / 82%); border: 1px solid rgb(248 169 190 / 35%); border-radius: 18px 18px 18px 5px; backdrop-filter: blur(12px); }
.reaction-symbol { font-size: 34px; color: var(--rose); }
.host-reaction small { color: #d1a7b8; font-size: 9px; }
.host-reaction p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); padding: max(30px, env(safe-area-inset-top)) 23px max(21px, env(safe-area-inset-bottom)); background: linear-gradient(155deg, #211b25, #16121a 70%); }
.chat-header { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { margin: 0 0 7px; color: #b59ba9; font-size: 9px; letter-spacing: .12em; font-weight: 600; text-transform: uppercase; }
.chat-header h2 { margin: 0; font: 26px Georgia, 'Times New Roman', serif; color: #f6e8e7; }
.chat-header-mark { color: #d8b7b4; font-size: 33px; }
.audience-pill { display: flex; align-items: center; gap: 7px; margin: 22px 0 19px; padding: 10px 12px; background: rgb(255 255 255 / 3%); border: 1px solid rgb(255 255 255 / 5%); border-radius: 11px; font-size: 10px; color: var(--muted); }
.audience-dots { color: #cc9baf; }
.audience-pill strong { color: var(--gold); margin-left: auto; font-size: 11px; font-weight: 600; }
.chat-log { list-style: none; flex: 1; min-height: 0; padding: 8px 0; margin: 0 0 17px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #5a4055 transparent; overscroll-behavior: contain; }
.chat-entry { margin: 0 0 21px; overflow-wrap: anywhere; }
.chat-entry-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.chat-entry-name { color: #e6bec8; font-size: 11px; font-weight: 600; }
.chat-entry-tag { font-size: 8px; letter-spacing: .02em; color: #aa8f9e; border: 1px solid rgb(185 148 173 / 18%); padding: 2px 4px; border-radius: 4px; }
.chat-entry p { margin: 0; color: #d4c9cf; font-size: 12px; line-height: 1.65; }
.chat-entry[data-kind="host"] { padding: 10px 12px; background: rgb(228 145 170 / 7%); border: 1px solid rgb(228 145 170 / 12%); border-radius: 12px; }
.chat-entry[data-kind="gift"] p { color: #edce9f; }
.chat-entry[data-self="true"] .chat-entry-name { color: #f6dedf; }
.chat-form { display: flex; align-items: center; gap: 6px; padding: 6px 7px 6px 14px; border: 1px solid rgb(235 197 219 / 16%); border-radius: 15px; background: #28202d; }
.chat-form input { min-width: 0; width: 100%; padding: 8px 0; border: 0; outline-offset: 5px; color: #ffedf2; background: transparent; font-size: 12px; }
.chat-form input::placeholder { color: #ae98a9; }
.chat-submit { display: grid; place-items: center; min-width: 40px; min-height: 40px; color: #f4b4c3; background: #3e2d3e; border-radius: 11px; }
.chat-notice { margin: 10px 3px 0; font-size: 9px; line-height: 1.6; color: #9d8696; }
.text-button { min-height: 36px; padding: 5px 8px; border-radius: 8px; color: #e9bccb; background: transparent; font-size: 11px; }
.text-button:hover:not(:disabled) { background: rgb(255 255 255 / 5%); }
dialog { color: var(--ink); padding: 0; border: 1px solid rgb(255 255 255 / 13%); background: var(--panel); border-radius: 25px; box-shadow: 0 22px 90px rgb(0 0 0 / 55%); }
dialog:not([open]) { display: none; }
dialog[data-fallback="true"] { position: fixed; z-index: 30; inset: 0; margin: auto; }
dialog::backdrop { background: rgb(10 5 13 / 56%); backdrop-filter: blur(7px); }
.gift-dialog[open] { display: flex; flex-direction: column; width: min(1100px, calc(100vw - 64px)); height: min(780px, calc(100vh - 64px)); height: min(780px, calc(100dvh - 64px)); max-height: calc(100dvh - 32px); overflow-x: hidden; overflow-y: auto; }
.dialog-header { display: flex; align-items: center; gap: 16px; padding: 24px 28px 15px; flex: 0 0 auto; }
.dialog-header h2 { margin: 0; font: 32px Georgia, 'Times New Roman', serif; color: #f7e8e8; }
.close-button { margin-left: auto; background: #302631; color: #e2c8d3; }
.gift-header .close-button { margin-left: 3px; }
.coin-display { display: grid; grid-template-columns: auto 34px; column-gap: 9px; margin-left: auto; text-align: right; }
.coin-display > span { grid-column: 1; color: #bca18a; font-size: 9px; }
.coin-display strong { grid-column: 1; color: var(--gold); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.coin-refill { grid-column: 2; grid-row: 1 / 3; align-self: center; min-width: 36px; min-height: 44px; border-radius: 11px; border: 1px solid rgb(242 211 165 / 15%); background: #33272d; color: #eed3ab; font-size: 23px; }
.coin-note { margin: 0; padding: 0 28px 17px; color: #ad98a5; font-size: 10px; line-height: 1.5; flex: 0 0 auto; }
.gift-filters { display: flex; gap: 10px; padding: 0 28px; flex: 0 0 auto; }
.gift-search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 0 12px; border: 1px solid rgb(255 255 255 / 11%); border-radius: 12px; color: #bda2b2; background: #241d29; }
.gift-search svg { width: 17px; height: 17px; }
.gift-search input { min-width: 0; width: 100%; height: 45px; border: 0; background: transparent; color: #f8e8ee; font-size: 12px; }
.gift-search input::-webkit-search-cancel-button { display: none; }
.gift-search input::placeholder { color: #a78d9f; }
.search-clear { min-width: 32px; min-height: 36px; font-size: 23px; background: transparent; color: #d9bccb; }
.category-field { min-width: 155px; max-width: 35%; }
.category-field select { width: 100%; height: 47px; padding: 0 30px 0 12px; background: #2c2230; border: 1px solid rgb(255 255 255 / 11%); color: #e5cbd7; font-size: 12px; border-radius: 12px; }
.collection-heading { display: flex; justify-content: space-between; align-items: center; min-height: 43px; padding: 3px 28px; color: #ba9eae; font-size: 10px; flex: 0 0 auto; }
.collection-retry { min-height: 36px; font-size: 10px; }
.gift-collection { flex: 1; min-height: 80px; overflow-y: auto; padding: 2px 28px 21px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #5b3e51 transparent; }
.gift-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; align-content: start; }
.gift-card { position: relative; display: flex; align-items: center; flex-direction: column; min-width: 0; padding: 9px 6px 10px; border: 1px solid rgb(236 197 217 / 8%); border-radius: 15px; background: linear-gradient(160deg, #2c2330, #241d29); transition: border-color .16s, background .16s; }
.gift-card:hover:not(:disabled) { border-color: rgb(247 173 193 / 50%); background: #382a39; }
.gift-card[aria-pressed="true"] { border-color: #f2a8bd; background: linear-gradient(160deg, #4a303e, #352638); box-shadow: inset 0 0 0 1px rgb(255 185 206 / 16%); }
.gift-card[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: #f4b1c1; color: #382333; font-size: 10px; }
.gift-poster { display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: 45px; color: #edb7c9; font-size: 45px; overflow: hidden; }
.gift-poster img { width: 100%; height: 100%; max-height: 105px; object-fit: contain; }
.gift-poster.is-missing { color: #90778c; font-size: 25px; }
.gift-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 29px; width: 100%; margin-top: 6px; color: #ecdce5; font-size: 10px; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
.gift-card-price { margin-top: 5px; color: var(--gold); font-size: 10px; font-variant-numeric: tabular-nums; }
.gift-card-status { color: #d5adbe; font-size: 8px; line-height: 1.4; padding-top: 5px; }
.collection-empty { margin: 18px auto; max-width: 420px; padding: 22px; color: #c7adbd; line-height: 1.7; font-size: 13px; text-align: center; }
.selection-bar { display: flex; align-items: center; gap: 14px; padding: 15px 28px; background: #241c28; border-top: 1px solid var(--line); flex: 0 0 auto; }
.selected-gift { display: flex; gap: 11px; align-items: center; flex: 1; min-width: 0; }
.selected-symbol { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; color: #f2bdd0; background: #3b2b3d; border-radius: 12px; font-size: 25px; overflow: hidden; }
.selected-symbol img { width: 100%; height: 100%; object-fit: contain; }
.selected-gift > div { min-width: 0; }
.selected-title { display: block; color: #efd9e3; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-detail { display: block; max-width: 390px; margin-top: 5px; font-size: 10px; color: #bea4b3; line-height: 1.5; overflow-wrap: anywhere; }
.send-controls { display: flex; align-items: center; gap: 8px; }
.quantity-field { display: flex; flex-direction: column; gap: 4px; color: #bda4b3; font-size: 9px; }
.quantity-field input { width: 61px; height: 36px; padding: 5px 7px; border-radius: 9px; border: 1px solid #5b4057; background: #302333; color: #efdae5; font-size: 12px; }
.send-controls .secondary-button, .send-controls .primary-button { padding: 11px 16px; font-size: 11px; }
.send-confirmation { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex: 0 0 auto; padding: 15px 28px; border-top: 1px solid #5e4155; background: #33232f; }
.send-confirmation h3 { margin: 0 0 5px; color: #f6dbe4; font-size: 14px; }
.send-confirmation p { margin: 4px 0; font-size: 11px; color: #d6b5c7; line-height: 1.5; }
.confirmation-totals { display: flex; gap: 18px; margin: 10px 0 0; font-size: 10px; }
.confirmation-totals > div { display: flex; gap: 6px; }
.confirmation-totals dt { color: #c4a1b4; }
.confirmation-totals dd { margin: 0; color: var(--gold); font-variant-numeric: tabular-nums; }
.confirmation-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.confirmation-actions button { font-size: 11px; }
.drawer-status { padding: 0 28px 12px; margin: 0; flex: 0 0 auto; color: #e8bdd0; font-size: 11px; line-height: 1.5; }
.drawer-status:empty { padding: 0; }
.compact-dialog[open] { display: flex; flex-direction: column; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding-bottom: 25px; }
.compact-dialog .dialog-header { padding: 22px 24px; }
.compact-dialog h2 { font-size: 24px; }
.settings-field { display: flex; flex-direction: column; gap: 10px; margin: 0 24px 20px; color: #cdb3c1; font-size: 12px; }
.settings-field select { min-height: 46px; padding: 10px 12px; background: #2e2332; color: #f0dce6; border: 1px solid #574253; border-radius: 12px; }
.about-button { margin: 0 24px; }
.about-copy { color: #ceb7c5; font-size: 13px; line-height: 1.9; margin: 0 24px; }
.effect-layer { position: fixed; inset: 0; z-index: 20; overflow: hidden; }
.effect-layer[data-state="loading"] { visibility: hidden; pointer-events: none; }
.effect-layer[data-presentation="small"] { pointer-events: none; }
/* The room already supplies a translated effect heading and demo disclosure. */
.effect-mount .gift-library-heart-artwork + span { display: none; }
.effect-scrim { position: absolute; inset: 0; background: rgb(15 7 18 / 68%); }
.effect-mount { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; }
.effect-mount canvas, .effect-mount video { max-width: 100%; max-height: 100%; }
.effect-layer[data-presentation="small"] .effect-scrim { background: transparent; }
.effect-layer[data-presentation="small"] .effect-mount { inset: auto; left: 8%; bottom: 20%; width: min(420px, 60vw); height: min(420px, 50vh); }
.effect-heading { position: absolute; z-index: 2; top: max(22px, env(safe-area-inset-top)); left: max(24px, env(safe-area-inset-left)); right: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #fff0f1; font-size: 15px; text-shadow: 0 1px 12px #170e18; }
.effect-demo-label { border: 1px solid rgb(255 255 255 / 26%); border-radius: 20px; padding: 5px 8px; background: rgb(33 18 35 / 60%); font-size: 9px; color: #f2d2c6; }
.effect-layer[data-presentation="small"] .effect-heading { top: auto; bottom: max(25px, env(safe-area-inset-bottom)); left: 24px; right: 120px; }
.effect-skip { position: absolute; z-index: 3; bottom: max(24px, env(safe-area-inset-bottom)); right: max(24px, env(safe-area-inset-right)); pointer-events: auto; background: rgb(44 28 46 / 85%); border-color: rgb(255 255 255 / 30%); }
.still-gift { position: fixed; z-index: 21; display: grid; grid-template-columns: 50px minmax(0, 1fr) 34px; column-gap: 12px; align-items: center; bottom: max(110px, calc(env(safe-area-inset-bottom) + 90px)); left: 28px; width: min(440px, calc(100vw - 56px)); padding: 17px; background: #362331; border: 1px solid #bb7b97; border-radius: 19px; box-shadow: 0 15px 50px rgb(0 0 0 / 40%); }
.still-art { grid-column: 1; grid-row: 1 / 3; display: grid; place-items: center; width: 50px; height: 50px; color: #f5b7cd; font-size: 38px; overflow: hidden; }
.still-art img { width: 100%; height: 100%; object-fit: contain; }
.still-gift p { grid-column: 2; margin: 0 0 5px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.still-gift small { grid-column: 2; font-size: 10px; line-height: 1.5; color: #d4afc2; }
.still-gift button { grid-column: 3; grid-row: 1 / 3; min-width: 34px; min-height: 44px; background: transparent; border: 0; font-size: 24px; }
.noscript-message { position: fixed; z-index: 40; inset: auto 16px 16px; margin: 0; padding: 18px; border: 1px solid var(--gold); border-radius: 15px; background: #342535; color: #f5dcc8; font-size: 14px; }

@media (min-width: 1600px) {
  .room-content { grid-template-columns: minmax(0, 1fr) 390px; }
  .chat-panel { padding-right: 30px; padding-left: 30px; }
  .host-profile { top: 122px; }
}

@media (max-width: 1100px) {
  .room-content { grid-template-columns: minmax(0, 1fr) 300px; }
  .room-header { padding-left: 22px; padding-right: 22px; gap: 9px; }
  .header-actions { gap: 3px; }
  .host-profile { left: 23px; }
  .chat-panel { padding-right: 19px; padding-left: 19px; }
  .gift-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 820px) and (orientation: landscape) {
  .room-content { grid-template-columns: minmax(0, 1fr) 255px; }
  .chat-panel { padding: 17px; }
  .chat-header h2 { font-size: 22px; }
  .chat-header-mark { display: none; }
  .audience-pill { margin: 12px 0 6px; padding: 7px; }
  .chat-entry { margin-bottom: 12px; }
  .room-header { padding-top: max(12px, env(safe-area-inset-top)); gap: 8px; }
  .brand { font-size: 21px; }
  .brand-symbol { width: 28px; height: 28px; font-size: 27px; }
  .demo-badge { font-size: 8px; padding: 5px 7px; }
  .header-actions .icon-button { min-width: 36px; min-height: 36px; }
  #share-room { display: none; }
  .host-profile { top: 68px; }
  .host-heading h1 { font-size: 22px; }
  .host-avatar { width: 39px; height: 39px; }
  .stage-footer { left: 22px; right: 22px; bottom: max(12px, env(safe-area-inset-bottom)); gap: 6px; }
  .scene-caption { left: 23px; bottom: 107px; font-size: 8px; }
  .host-reaction { left: 22px; bottom: 126px; padding: 8px 11px; }
  .host-reaction p { font-size: 11px; }
  .gift-dialog[open] { width: calc(100vw - 30px); height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); }
  .dialog-header { padding: 12px 20px 8px; }
  .dialog-header h2 { font-size: 24px; }
  .coin-note { padding: 0 20px 8px; font-size: 9px; }
  .gift-filters { padding: 0 20px; }
  .collection-heading { padding: 0 20px; min-height: 33px; }
  .gift-collection { padding: 0 20px 12px; }
  .gift-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .gift-poster { height: 50px; min-height: 0; aspect-ratio: auto; }
  .gift-poster img { max-height: 50px; }
  .selection-bar { padding: 9px 20px; }
  .send-confirmation { padding: 10px 20px; }
}

@media (max-width: 760px) and (orientation: portrait), (min-width: 761px) and (max-width: 1050px) and (orientation: portrait) {
  .room-content { display: block; position: relative; }
  .host-stage { position: absolute; inset: 0; }
  .scene-shade { background: linear-gradient(180deg, rgb(20 13 21 / 70%), transparent 30%, transparent 40%, rgb(20 13 21 / 36%) 58%, rgb(20 13 21 / 92%) 100%); }
  .room-header { padding: max(16px, env(safe-area-inset-top)) 16px 10px; gap: 9px; }
  .brand { font-size: 24px; }
  .brand-symbol { width: 29px; height: 29px; font-size: 28px; }
  .demo-badge { padding: 5px 7px; font-size: 8px; }
  .header-actions { gap: 0; }
  .header-actions .icon-button { min-width: 37px; min-height: 42px; border: 0; background: transparent; }
  .header-actions svg { width: 19px; height: 19px; }
  #share-room { display: none; }
  .host-profile { top: calc(max(16px, env(safe-area-inset-top)) + 65px); left: 18px; right: 16px; gap: 10px; }
  .host-avatar { width: 43px; height: 43px; font-size: 23px; }
  .host-heading h1 { font-size: 25px; }
  .host-profile p { font-size: 10px; }
  .host-heading > span { font-size: 9px; }
  .scene-caption { left: 20px; bottom: 153px; right: 18px; font-size: 8px; }
  .stage-footer { left: 17px; right: 17px; bottom: calc(max(11px, env(safe-area-inset-bottom)) + 80px); gap: 8px; }
  .room-feedback { font-size: 10px; min-height: 16px; }
  .stage-buttons { gap: 9px; }
  .gift-open { min-height: 45px; padding: 11px 17px; flex: 1; font-size: 12px; border-radius: 15px; }
  .like-button { min-height: 45px; min-width: 67px; border-radius: 15px; padding: 8px 12px; }
  .host-reaction { left: 18px; bottom: 185px; max-width: calc(100% - 36px); padding: 10px 14px; }
  .host-reaction p { font-size: 11px; }
  .host-reaction small { font-size: 8px; }
  .chat-panel { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 40%; min-height: 220px; padding: 0 18px max(9px, env(safe-area-inset-bottom)); background: transparent; border: 0; pointer-events: none; }
  .chat-header { display: none; }
  .audience-pill { position: fixed; z-index: 1; top: calc(max(16px, env(safe-area-inset-top)) + 120px); left: 20px; width: fit-content; max-width: calc(100vw - 40px); margin: 0; padding: 6px 9px; font-size: 8px; background: rgb(35 22 33 / 48%); border: 1px solid rgb(255 255 255 / 12%); pointer-events: auto; }
  .audience-pill strong { font-size: 9px; margin-left: 5px; }
  .chat-log { flex: 1; margin: 0 0 calc(max(11px, env(safe-area-inset-bottom)) + 80px + 45px + 12px); padding: 0 0 5px; max-width: min(78%, 370px); overflow-y: auto; pointer-events: auto; mask-image: linear-gradient(transparent, #000 13px); }
  .chat-entry { margin: 0 0 9px; text-shadow: 0 1px 8px rgb(0 0 0 / 70%); }
  .chat-entry-heading { display: inline; margin-right: 6px; }
  .chat-entry-name { font-size: 10px; }
  .chat-entry-tag { margin-left: 5px; font-size: 7px; background: rgb(27 16 30 / 30%); }
  .chat-entry p { display: inline; color: #f6e6ee; font-size: 10px; line-height: 1.7; }
  .chat-entry[data-kind="host"] { padding: 6px 8px; border-radius: 9px; background: rgb(47 24 41 / 56%); }
  .chat-form { position: absolute; bottom: calc(max(9px, env(safe-area-inset-bottom)) + 21px); left: 17px; right: 17px; pointer-events: auto; background: rgb(39 27 42 / 85%); border-radius: 14px; }
  .chat-form input { font-size: 16px; }
  .chat-notice { position: absolute; left: 19px; right: 17px; bottom: max(6px, env(safe-area-inset-bottom)); margin: 0; color: #b9a4b3; font-size: 8px; }
  .gift-dialog[open] { width: 100%; max-width: 100%; height: min(750px, 87dvh); max-height: 91dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-header { padding: 19px 17px 12px; gap: 9px; }
  .dialog-header h2 { font-size: 28px; }
  .eyebrow { font-size: 8px; margin-bottom: 5px; letter-spacing: .08em; }
  .gift-header .eyebrow { max-width: 160px; line-height: 1.5; }
  .coin-display { column-gap: 4px; }
  .coin-display strong { font-size: 19px; }
  .coin-display > span { font-size: 8px; }
  .coin-refill { min-width: 32px; min-height: 44px; }
  .gift-header .close-button { min-width: 36px; min-height: 44px; font-size: 25px; border: 0; background: transparent; }
  .coin-note { padding: 0 18px 12px; font-size: 8px; }
  .gift-filters { padding: 0 17px; gap: 8px; }
  .gift-search { padding: 0 10px; gap: 6px; }
  .gift-search input { font-size: 12px; height: 43px; }
  .category-field { min-width: 107px; max-width: 38%; }
  .category-field select { height: 45px; padding-left: 8px; font-size: 10px; }
  .collection-heading { min-height: 39px; padding: 1px 17px; font-size: 9px; }
  .collection-retry { font-size: 9px; }
  .gift-collection { padding: 0 17px 14px; }
  .gift-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .gift-card { padding: 8px 4px 9px; border-radius: 13px; }
  .gift-poster img { max-height: 95px; }
  .gift-card-title { font-size: 9px; min-height: 27px; }
  .gift-card-price { font-size: 9px; }
  .gift-card-status { font-size: 7px; }
  .selection-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 17px; }
  .selected-gift { gap: 9px; }
  .selected-symbol { width: 34px; height: 34px; border-radius: 9px; }
  .selected-title { font-size: 11px; }
  .selected-detail { font-size: 9px; max-width: none; }
  .send-controls { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
  .quantity-field input { width: 52px; height: 34px; }
  .send-controls .primary-button, .send-controls .secondary-button { min-height: 44px; padding: 10px 8px; font-size: 10px; align-self: end; border-radius: 11px; }
  .send-confirmation { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 17px; }
  .send-confirmation h3 { font-size: 12px; }
  .send-confirmation p { font-size: 10px; }
  .confirmation-totals { font-size: 9px; margin-top: 8px; gap: 13px; }
  .confirmation-actions { flex-wrap: nowrap; }
  .confirmation-actions button { flex: 1; min-height: 40px; padding: 9px; font-size: 10px; border-radius: 10px; }
  .drawer-status { padding: 0 17px 10px; font-size: 10px; }
  .effect-heading { top: max(18px, env(safe-area-inset-top)); left: 18px; font-size: 13px; }
  .effect-skip { right: 17px; bottom: max(20px, env(safe-area-inset-bottom)); font-size: 11px; }
  .effect-layer[data-presentation="small"] .effect-mount { left: 7%; bottom: 22%; width: 75vw; height: 40vh; }
  .still-gift { left: 17px; width: calc(100vw - 34px); bottom: calc(max(15px, env(safe-area-inset-bottom)) + 151px); padding: 12px; }
}

@media (min-width: 761px) and (max-width: 1050px) and (orientation: portrait) {
  .room-header { padding: max(25px, env(safe-area-inset-top)) 28px; }
  .brand { font-size: 31px; }
  .brand-symbol { width: 38px; height: 38px; font-size: 35px; }
  .demo-badge { font-size: 10px; padding: 7px 10px; }
  .header-actions .icon-button { min-width: 47px; min-height: 47px; }
  #share-room { display: inline-grid; }
  .host-profile { top: 117px; left: 30px; }
  .host-heading h1 { font-size: 33px; }
  .host-avatar { width: 55px; height: 55px; }
  .host-profile p { font-size: 13px; }
  .host-heading > span { font-size: 12px; }
  .audience-pill { top: 194px; left: 32px; font-size: 11px; padding: 8px 12px; }
  .audience-pill strong { font-size: 12px; }
  .chat-panel { height: 39%; padding-left: 30px; padding-right: 30px; }
  .chat-log { margin-bottom: calc(max(20px, env(safe-area-inset-bottom)) + 91px + 53px + 12px); max-width: min(66%, 450px); }
  .chat-entry { margin-bottom: 14px; }
  .chat-entry-name, .chat-entry p { font-size: 13px; }
  .chat-entry-tag { font-size: 8px; }
  .chat-form { left: 30px; right: 30px; bottom: calc(max(13px, env(safe-area-inset-bottom)) + 25px); min-height: 53px; }
  .chat-notice { left: 33px; font-size: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
  .stage-footer { left: 30px; right: 30px; bottom: calc(max(20px, env(safe-area-inset-bottom)) + 91px); gap: 10px; }
  .stage-buttons { gap: 14px; }
  .gift-open { min-height: 53px; flex: 0 1 300px; font-size: 15px; }
  .like-button { min-height: 53px; min-width: 90px; }
  .room-feedback { font-size: 12px; }
  .scene-caption { bottom: 195px; left: 33px; font-size: 10px; }
  .host-reaction { bottom: 235px; left: 30px; }
  .host-reaction p { font-size: 14px; }
  .gift-dialog[open] { height: min(900px, 84dvh); }
  .gift-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; }
  .gift-card-title { font-size: 11px; min-height: 32px; }
  .gift-card-price { font-size: 11px; }
  .gift-card-status { font-size: 9px; }
  .gift-poster img { max-height: 105px; }
  .selection-bar { flex-direction: row; align-items: center; padding: 17px 24px; }
  .send-controls { min-width: 320px; grid-template-columns: 55px 1fr 1fr; }
  .send-controls .primary-button, .send-controls .secondary-button { font-size: 11px; }
}

@media (max-width: 359px) and (orientation: portrait) {
  .room-header { gap: 6px; padding-left: 12px; padding-right: 10px; }
  .brand { font-size: 21px; gap: 6px; }
  .demo-badge { font-size: 7px; padding: 5px 6px; }
  .header-actions .icon-button { min-width: 32px; }
  .gift-filters, .gift-collection { padding-left: 12px; padding-right: 12px; }
  .gift-grid { gap: 6px; }
  .category-field { min-width: 93px; }
  .coin-display strong { font-size: 17px; }
  .gift-header .eyebrow { max-width: 125px; }
  .selection-bar { padding-left: 12px; padding-right: 12px; }
}

@media (max-height: 650px) and (orientation: portrait) {
  .chat-panel { height: 40%; min-height: 185px; }
  .chat-log { margin-bottom: 102px; }
  .host-profile { top: calc(max(16px, env(safe-area-inset-top)) + 54px); }
  .audience-pill { top: calc(max(16px, env(safe-area-inset-top)) + 107px); }
  .host-profile p { display: none; }
  .gift-header .eyebrow { display: none; }
  .dialog-header { padding-top: 10px; padding-bottom: 7px; }
  .coin-note { padding-bottom: 7px; }
  .selection-bar { gap: 7px; padding-top: 8px; padding-bottom: 8px; }
  .gift-dialog[open] { height: 93dvh; max-height: 93dvh; }
  .selected-detail { max-height: 26px; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
