:root {
  --paper: #fbf7ef;
  --paper-strong: #fffdf9;
  --ink: #2e241b;
  --ink-soft: #5f5143;
  --muted: #847362;
  --gold: #b4823d;
  --gold-deep: #7d5525;
  --gold-pale: #ead8b4;
  --red: #82382d;
  --border: rgba(137, 96, 42, .22);
  --shadow: 0 20px 55px rgba(65, 43, 22, .12);
  --serif: "STSong", "Songti SC", "Noto Serif SC", serif;
  --sans: "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); padding-bottom: 92px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.app-backdrop { position: fixed; inset: 0; z-index: -2; background: linear-gradient(135deg, rgba(255,253,249,.96), rgba(245,234,213,.88)), url("assets/alternative-monogram-pattern.svg") center / 480px auto; }
.app-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 4%, rgba(199,151,80,.18), transparent 28%), radial-gradient(circle at 85% 22%, rgba(130,56,45,.09), transparent 24%); }

.app-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; border-bottom: 1px solid var(--border); background: rgba(251,247,239,.9); backdrop-filter: blur(18px); padding: 8px max(22px, calc((100vw - 1240px) / 2)); }
.app-brand { display: flex; align-items: center; gap: 10px; }
.app-brand img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(75,48,22,.15)); }
.app-brand span { display: grid; }
.app-brand strong { font-family: var(--serif); font-size: 1.16rem; letter-spacing: .12em; }
.app-brand small { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.sound-toggle { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--ink-soft); background: transparent; padding: 5px; }
.sound-toggle-icon { position: relative; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(137,96,42,.2); border-radius: 50%; background: rgba(255,253,249,.66); font-family: Georgia, serif; font-size: .94rem; line-height: 1; opacity: .65; transition: color .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease, transform .18s ease; }
.sound-toggle:hover .sound-toggle-icon, .sound-toggle:focus-visible .sound-toggle-icon { opacity: 1; transform: translateY(-1px); }
.sound-toggle:focus-visible { outline: 2px solid rgba(180,130,61,.5); outline-offset: 1px; }
.sound-toggle[aria-pressed="true"] .sound-toggle-icon { border-color: rgba(180,130,61,.42); color: var(--gold-deep); background: rgba(234,216,180,.42); opacity: .88; }
.sound-toggle[aria-pressed="false"] .sound-toggle-icon::after { content: ""; position: absolute; width: 18px; height: 1px; border-radius: 1px; background: currentColor; transform: rotate(-42deg); opacity: .7; }
.sound-toggle.is-blocked .sound-toggle-icon::before { content: ""; position: absolute; right: 1px; top: 1px; width: 6px; height: 6px; border: 2px solid var(--paper); border-radius: 50%; background: var(--red); }
.identity-chip { border: 1px solid var(--border); border-radius: 999px; color: var(--ink-soft); background: rgba(255,253,249,.78); padding: 8px 12px; font-size: .78rem; }
.identity-chip { color: #fff; background: linear-gradient(135deg, #b3813e, #7e4d29); }

.activity-ribbon { position: sticky; top: 76px; z-index: 19; display: grid; grid-template-columns: auto 1fr; min-height: 38px; border-bottom: 1px solid rgba(130,56,45,.16); color: var(--ink-soft); background: rgba(246,235,215,.94); overflow: hidden; }
.activity-ribbon > span { display: grid; place-items: center; min-width: 105px; color: #fff; background: linear-gradient(110deg, var(--red), #a76242); font-size: .74rem; font-weight: 900; letter-spacing: .16em; }
.activity-track { display: flex; align-items: center; padding: 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.demo-ribbon { border-bottom: 1px solid rgba(130,56,45,.18); color: #6d352c; background: #f2dfb9; padding: 8px 16px; font-size: .76rem; font-weight: 800; text-align: center; }

.platform-shell { width: min(1240px, calc(100% - 34px)); margin: 0 auto; padding: 34px 0 20px; }
.platform-page { display: none; animation: page-in .24s ease; }
.platform-page.is-active { display: block; }
.page-heading { display: grid; gap: 7px; margin-bottom: 20px; }
.page-heading p, .luxury-panel > span, .section-heading span { margin: 0; color: var(--gold-deep); font-size: .73rem; font-weight: 900; letter-spacing: .18em; }
.page-heading h1 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: .06em; }
.page-heading > span, .section-heading p { color: var(--muted); line-height: 1.7; }

.luxury-panel { border: 1px solid var(--border); border-radius: 20px; background: rgba(255,253,249,.82); box-shadow: var(--shadow); padding: 22px; }
.luxury-panel h2 { margin: 5px 0 8px; font-family: var(--serif); }
.luxury-panel p { color: var(--ink-soft); line-height: 1.75; }
.journey-overview { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr) auto; grid-template-areas: "kicker steps action" "copy steps action"; align-items: center; gap: 7px 28px; margin-bottom: 14px; border-top: 4px solid var(--gold); background: linear-gradient(110deg, rgba(255,253,249,.96), rgba(235,215,175,.56)); }
.journey-kicker { grid-area: kicker; color: var(--gold-deep); font-size: .73rem; font-weight: 900; letter-spacing: .16em; }
.journey-copy { grid-area: copy; }
.journey-copy h2 { margin: 2px 0 5px; font-size: 1.42rem; }
.journey-copy p { margin: 0; font-size: .84rem; }
.journey-steps { grid-area: steps; display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.journey-steps i { width: 26px; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(180,130,61,.15)); }
.journey-actions { grid-area: action; display: grid; gap: 8px; min-width: 142px; }
.journey-actions > button { width: 100%; }
.home-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 14px; margin-bottom: 14px; }
.identity-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, rgba(255,253,249,.9), rgba(230,207,161,.55)); }
.identity-seal { flex: 0 0 74px; width: 74px; height: 74px; display: grid; place-items: center; border: 1px solid rgba(128,79,35,.35); border-radius: 50%; color: #fff; background: radial-gradient(circle at 30% 25%, #d5a75c, #94552f 68%); box-shadow: inset 0 0 0 5px rgba(255,255,255,.18), 0 10px 30px rgba(105,63,30,.22); font-family: var(--serif); font-size: 1.7rem; font-weight: 900; }
.safety-panel { border-left: 4px solid var(--red); }
.create-order, .model-purchase { margin-top: 14px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.section-heading h2 { margin: 4px 0 0; }
.section-heading p { max-width: 630px; margin: 0; font-size: .85rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid label, .stack-form label { display: grid; gap: 7px; }
.form-grid label > span, .stack-form label > span { color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.form-grid input, .form-grid select, .form-grid textarea, .stack-form input, .stack-form select, .stack-form textarea, .inline-form input, .message-form textarea, #paymentNote { width: 100%; border: 1px solid var(--border); border-radius: 12px; outline: 0; color: var(--ink); background: rgba(255,253,249,.95); padding: 12px 13px; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .inline-form input:focus, .message-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180,130,61,.12); }
.form-grid .wide { grid-column: 1 / -1; }
.service-custom-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; border:1px dashed rgba(180,130,61,.42); border-radius:13px; background:rgba(237,218,180,.16); padding:13px; }
.service-custom-fields[hidden] { display:none; }
.service-custom-fields label { min-width:0; }
.service-custom-fields p { grid-column:1 / -1; margin:0; color:var(--muted); font-size:.76rem; line-height:1.55; }
.rule-check { grid-template-columns: auto 1fr; align-items: start; border: 1px solid rgba(130,56,45,.18); border-radius: 12px; background: rgba(130,56,45,.035); padding: 12px; color: var(--ink-soft); font-size: .8rem; line-height: 1.65; }
.rule-check input { width: auto; margin-top: 4px; accent-color: var(--gold); }
.rule-check a { color: var(--gold-deep); font-weight: 900; }
.order-price-summary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 16px; border: 1px solid rgba(180,130,61,.28); border-radius: 13px; background: rgba(237,218,180,.28); padding: 13px 15px; }
.order-price-summary span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.order-price-summary strong { justify-self: end; color: var(--red); font-size: 1.02rem; }
.order-price-summary small { grid-column: 1 / -1; color: var(--ink-soft); line-height: 1.55; }
.payment-method-picker { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; border:1px solid rgba(180,130,61,.28); border-radius:13px; background:rgba(255,253,249,.62); padding:11px; margin:12px 0; }
.payment-method-picker[hidden] { display:none; }
.payment-method-picker legend { color:var(--ink-soft); font-size:.8rem; font-weight:900; padding:0 7px; }
.payment-method-picker label { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:10px; border:1px solid var(--border); border-radius:10px; background:rgba(255,253,249,.9); padding:12px; cursor:pointer; }
.payment-method-picker label:has(input:checked) { border-color:var(--gold); box-shadow:0 0 0 2px rgba(180,130,61,.12); background:rgba(237,218,180,.28); }
.payment-method-picker label:has(input:disabled) { cursor:not-allowed; opacity:.58; }
.payment-method-picker input { width:18px; height:18px; margin:2px 0 0; accent-color:var(--gold-deep); }
.payment-method-picker span { min-width:0; display:grid; gap:4px; }
.payment-method-picker b { color:var(--ink); font-size:.88rem; }
.payment-method-picker small { color:var(--muted); line-height:1.45; overflow-wrap:anywhere; }
.gold-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; border-radius: 11px; padding: 10px 17px; font-weight: 900; }
.gold-button { border: 1px solid #9b682e; color: #fff; background: linear-gradient(135deg, #c99b54, #9a6332 68%, #7b452b); box-shadow: 0 10px 24px rgba(121,75,35,.2); }
.gold-button:hover { filter: brightness(1.04); }
.gold-button:disabled { cursor: not-allowed; filter: grayscale(.6); opacity: .55; }
.outline-button { border: 1px solid var(--border); color: var(--gold-deep); background: rgba(255,253,249,.82); }
.model-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; border: 1px solid var(--border); border-radius: 14px; background: rgba(247,238,221,.6); padding: 15px; }
.model-row > div { display: grid; gap: 4px; }
.model-row b { font-family: var(--serif); font-size: 1.06rem; }
.model-row span { color: var(--muted); font-size: .8rem; }
.model-row > strong { color: var(--red); }
.audio-debug-addon { display:grid; gap:8px; min-width:0; margin:14px 0 0; padding:12px 14px; border:1px solid rgba(180,130,61,.3); border-radius:14px; background:rgba(255,253,249,.74); }
.audio-debug-addon legend { padding:0 5px; color:var(--ink); font-family:var(--serif); font-weight:800; }
.audio-debug-addon-option { display:flex; align-items:center; gap:10px; min-width:0; }
.audio-debug-addon-option input { flex:0 0 auto; width:18px; height:18px; }
.audio-debug-addon-option span { display:grid; gap:2px; min-width:0; }
.audio-debug-addon-option b, .audio-debug-addon-option small, .audio-debug-addon-note { overflow-wrap:anywhere; }
.audio-debug-addon-option small, .audio-debug-addon small { color:var(--muted); }
.audio-debug-addon-option em { margin-left:auto; flex:0 0 auto; color:var(--red); font-size:.75rem; font-style:normal; }
.model-purpose { margin-bottom: 12px; }
.model-purpose label { display: grid; grid-template-columns: auto minmax(260px, 440px); align-items: center; gap: 14px; color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.model-purpose select { width: 100%; border: 1px solid var(--border); border-radius: 11px; color: var(--ink); background: rgba(255,253,249,.95); padding: 10px 12px; }

.connect-panel { margin-bottom: 14px; border-top: 4px solid var(--gold); }
.inline-form { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; }
.lobby-list, .record-list { display: grid; gap: 11px; }
.lobby-order, .record-card { display: grid; gap: 11px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,253,249,.86); box-shadow: 0 14px 36px rgba(69,45,23,.08); padding: 18px; }
.lobby-order header, .record-card header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.lobby-order h3, .record-card h3 { margin: 4px 0 0; font-family: var(--serif); }
.order-badge, .status-badge { border: 1px solid var(--border); border-radius: 999px; color: var(--gold-deep); background: rgba(234,216,180,.42); padding: 6px 10px; font-size: .72rem; font-weight: 900; }
.status-badge.is-assessment { border-color: rgba(130,56,45,.3); color: #7b322b; background: rgba(130,56,45,.08); }
.order-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.order-meta span { border-radius: 8px; color: var(--ink-soft); background: rgba(125,85,37,.07); padding: 6px 9px; font-size: .78rem; }
.order-note { color: var(--muted); line-height: 1.65; }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; }
.order-actions { flex-wrap: wrap; align-items: center; }
.danger-action { color: var(--red); border-bottom-color: rgba(130,56,45,.42); }
.tab-switch { display: inline-flex; gap: 6px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,253,249,.7); padding: 5px; margin-bottom: 14px; }
.tab-switch button { border: 0; border-radius: 9px; color: var(--muted); background: transparent; padding: 8px 14px; }
.tab-switch button.is-active { color: #fff; background: linear-gradient(135deg, #b4823d, #84502b); }
.empty-state { border: 1px dashed rgba(137,96,42,.3); border-radius: 16px; color: var(--muted); background: rgba(255,253,249,.55); padding: 28px; text-align: center; }

.chat-layout { display: grid; grid-template-columns: 280px 1fr; min-height: 590px; padding: 0; overflow: hidden; }
.chat-orders { display: grid; align-content: start; gap: 8px; border-right: 1px solid var(--border); background: rgba(238,221,189,.24); padding: 14px; }
.chat-order-button { display: grid; gap: 4px; border: 1px solid transparent; border-radius: 12px; color: var(--ink-soft); background: rgba(255,253,249,.66); padding: 11px; text-align: left; }
.chat-order-button.is-active { border-color: var(--gold); color: var(--ink); background: rgba(255,253,249,.98); }
.chat-order-button small { color: var(--muted); }
.chat-room { display: grid; grid-template-rows: auto auto minmax(250px, 1fr) auto auto; min-width: 0; }
.chat-notice { color: #fff; background: linear-gradient(100deg, #7f352d, #a55d3b); padding: 11px 15px; font-size: .78rem; line-height: 1.6; }
.chat-title { border-bottom: 1px solid var(--border); padding: 13px 16px; font-weight: 900; }
.message-list { display: flex; flex-direction: column; gap: 10px; overflow: auto; padding: 18px; }
.message { max-width: min(72%, 620px); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; background: rgba(255,253,249,.9); padding: 10px 12px; }
.message.is-mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; color: #fff; background: linear-gradient(135deg, #b6813e, #86502c); }
.message.is-system { align-self: center; max-width: 92%; border-color: rgba(130,56,45,.18); border-radius: 10px; color: var(--red); background: rgba(130,56,45,.055); text-align: center; }
.message strong, .message time { display: block; font-size: .69rem; opacity: .72; }
.message p { margin: 5px 0; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.message-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; border-top: 1px solid var(--border); padding: 12px; }
.chat-rule { color: var(--muted); padding: 0 14px 12px; line-height: 1.55; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-grid dl { display: grid; gap: 8px; }
.profile-grid dl div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 7px; }
.profile-grid dt { color: var(--muted); }
.profile-grid dd { margin: 0; font-weight: 900; }
.wallet-center { display:grid; align-content:start; gap:12px; }
.wallet-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wallet-heading > div { display:grid; gap:3px; }
.wallet-heading h2 { margin:0; color:var(--red); font-size:1.45rem; }
.wallet-center > p { margin:0; color:var(--ink-soft); font-size:.8rem; line-height:1.6; }
.wallet-ledger { display:grid; max-height:310px; overflow:auto; border-top:1px solid var(--border); }
.wallet-ledger-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; border-bottom:1px solid var(--border); padding:10px 2px; }
.wallet-ledger-row b { min-width:0; overflow-wrap:anywhere; font-size:.82rem; }
.wallet-ledger-row strong { color:var(--green); font-size:.84rem; }
.wallet-ledger-row strong.is-debit { color:var(--red); }
.wallet-ledger-row small { color:var(--muted); font-size:.7rem; line-height:1.45; }
.wallet-ledger-row small:last-child { text-align:right; }
.stack-form { display: grid; gap: 10px; }
.security-center { grid-column: 1 / -1; display: grid; gap: 16px; }
.security-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.security-heading h2 { margin-bottom: 0; }
.compact-button { min-height: 36px; padding: 7px 11px; }
.security-email { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; border: 1px solid rgba(180,130,61,.26); border-radius: 13px; background: rgba(237,218,180,.24); padding: 13px 15px; }
.security-email span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.security-email strong { justify-self: end; overflow-wrap: anywhere; }
.security-email small { grid-column: 1 / -1; color: var(--muted); line-height: 1.55; }
.security-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.security-section { display: grid; align-content: start; gap: 10px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,253,249,.72); padding: 14px; }
.security-section > div:first-child { display: grid; gap: 3px; }
.security-section > div:first-child small, .security-section > small { color: var(--muted); line-height: 1.55; }
.security-session-list { display: grid; gap: 8px; }
.security-session { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 10px; border-bottom: 1px solid var(--border); padding: 8px 0; }
.security-session:last-child { border-bottom: 0; }
.security-session > div { min-width: 0; display: grid; gap: 3px; }
.security-session strong, .security-session small { overflow-wrap: anywhere; }
.security-session small { color: var(--muted); }
.current-session { color: #315d37; font-size: .72rem; font-weight: 900; }
.privacy-request { grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; }
.privacy-request > div:first-child, .privacy-request > .form-status { grid-column: 1 / -1; }
.privacy-request label { display: grid; gap: 7px; }
.privacy-request label > span { color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.form-status { min-height: 1.35em; color: var(--gold-deep); font-size: .76rem; font-weight: 800; }
.form-status.is-error { color: var(--red); }

.bottom-nav { position: fixed; left: 50%; bottom: 13px; z-index: 30; width: min(720px, calc(100% - 24px)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid rgba(135,93,39,.3); border-radius: 22px; background: rgba(255,253,249,.94); box-shadow: 0 18px 55px rgba(65,43,22,.2); backdrop-filter: blur(18px); padding: 7px; }
.bottom-nav.is-four { grid-template-columns: repeat(4, 1fr); }
.bottom-nav button { display: grid; place-items: center; gap: 2px; min-height: 58px; border: 0; border-radius: 16px; color: var(--muted); background: transparent; }
.bottom-nav button span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; font-family: var(--serif); font-weight: 900; }
.bottom-nav button b { font-size: .72rem; }
.bottom-nav button.is-active { color: #fff; background: linear-gradient(145deg, #bd8e49, #8c552d); box-shadow: 0 8px 18px rgba(121,75,35,.2); }

dialog { max-width: 100vw; border: 0; background: transparent; padding: 18px; }
dialog::backdrop { background: rgba(35,26,19,.56); backdrop-filter: blur(5px); }
.auth-dialog, .payment-dialog, .terms-dialog { width: min(496px, 100vw); max-height: 100dvh; overflow-y: auto; }
.intent-dialog { width: min(716px, 100vw); }
.auth-card, .dialog-card { width: 100%; max-width: 100%; border: 1px solid rgba(196,153,87,.45); border-radius: 24px; background: var(--paper-strong); box-shadow: 0 28px 80px rgba(37,24,14,.32); padding: 24px; }
.auth-card > img { width: 82px; height: 82px; display: block; object-fit: contain; margin: 0 auto; }
.auth-card > p, .auth-card > h2 { text-align: center; }
.auth-card > h2, .dialog-card h2 { font-family: var(--serif); }
.auth-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin: 15px 0; }
.auth-tabs button { border: 0; border-radius: 8px; color: var(--muted); background: transparent; padding: 9px; }
.auth-tabs button.is-active { color: #fff; background: #9d6c35; }
.auth-card > small { display: block; color: var(--muted); margin-top: 12px; text-align: center; }
.auth-adult-check { grid-template-columns: auto 1fr; align-items: start; border: 1px solid rgba(130,56,45,.16); border-radius: 11px; color: var(--ink-soft); background: rgba(130,56,45,.04); padding: 10px; font-size: .76rem; line-height: 1.6; }
.auth-adult-check input { margin-top: 4px; accent-color: var(--gold); }
.registration-verification { display: grid; gap: 10px; border: 1px solid rgba(180,130,61,.28); border-radius: 13px; background: rgba(237,218,180,.2); padding: 11px; }
.registration-step { display: grid; gap: 7px; }
.registration-step > b { color: var(--gold-deep); font-size: .78rem; }
.captcha-row, .email-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 9px; }
.captcha-image { min-width: 126px; display: grid; justify-items: center; gap: 3px; }
.captcha-image img { width: 126px; height: 46px; display: block; border: 1px solid var(--border); border-radius: 9px; object-fit: contain; background: #fff; }
.captcha-image .text-button { padding: 2px 5px; font-size: .72rem; }
.email-code-row .outline-button { min-width: 118px; min-height: 46px; }
.privacy-request-history { display:grid; gap:8px; }
.privacy-request-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; border-top:1px solid var(--border); padding:9px 2px; }
.privacy-request-row > div { display:grid; gap:3px; }
.privacy-request-row small { color:var(--muted); line-height:1.5; }
.admin-login-mfa { display:grid; gap:9px; border:1px solid rgba(180,130,61,.28); border-radius:12px; background:rgba(237,218,180,.2); padding:11px; }
.admin-login-mfa > small { color:var(--muted); line-height:1.5; }
.dialog-card { position: relative; }
.dialog-close { position: absolute; right: 14px; top: 12px; border: 0; color: var(--muted); background: transparent; font-size: 1.55rem; }
.payment-code { min-height: 240px; display: grid; place-items: center; border: 1px dashed rgba(137,96,42,.32); border-radius: 16px; background: rgba(239,224,194,.25); overflow: hidden; }
.payment-code img { max-width: 230px; max-height: 230px; }
.payment-code span { color: var(--muted); }
.payment-auto-note { border-left:3px solid var(--gold); color:var(--ink-soft); background:rgba(239,224,194,.3); padding:10px 12px; line-height:1.55; }
.dialog-card dl { display: grid; gap: 7px; }
.dialog-card dl div { display: flex; justify-content: space-between; }
.dialog-card dd { margin: 0; font-weight: 900; }
.dialog-card .gold-button { width: 100%; margin-top: 10px; }
.terms-summary { display: grid; gap: 8px; border: 1px solid var(--border); border-radius: 13px; color: var(--ink-soft); background: rgba(239,224,194,.28); padding: 13px; margin-bottom: 12px; line-height: 1.6; }
.terms-summary a { color: var(--gold-deep); font-weight: 900; }
.terms-dialog .rule-check { display: grid; margin-top: 9px; }
.terms-dialog .outline-button { width: 100%; margin-top: 8px; }
.site-popup-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: visible; padding: 0; }
.site-popup-dialog::backdrop { background: rgba(27,22,19,.56); backdrop-filter: blur(12px) saturate(1.1); }
.site-popup-card { position: relative; display: grid; gap: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.62); border-radius: 20px; background: linear-gradient(145deg,rgba(255,253,249,.94),rgba(241,226,199,.86)); box-shadow: 0 30px 90px rgba(43,29,19,.34), inset 0 1px 0 rgba(255,255,255,.82); padding: clamp(22px,4vw,34px); backdrop-filter: blur(28px) saturate(1.22); }
.site-popup-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg,transparent,rgba(180,130,61,.72),transparent); }
.site-popup-signal { width: 42px; height: 5px; border-radius: 99px; background: linear-gradient(90deg,#d2a35c,#8c5b2d); box-shadow: 0 0 18px rgba(180,130,61,.4); }
.site-popup-eyebrow { margin: 2px 0 -5px; color: var(--gold-deep); font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.site-popup-card h2 { max-width: 100%; margin: 0; font-family: var(--serif); font-size: clamp(1.35rem,3vw,1.85rem); line-height: 1.35; overflow-wrap: anywhere; }
.site-popup-body { max-height: min(42dvh,360px); overflow-y: auto; color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .94rem; line-height: 1.8; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(180,130,61,.5) transparent; }
.site-popup-acknowledge { width: 100%; min-height: 48px; margin-top: 4px; }
.platform-footer { width: min(1240px,calc(100% - 34px)); display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 18px; color: var(--muted); margin: 20px auto 112px; font-size: .76rem; }
.platform-footer a { color: var(--gold-deep); font-weight: 900; }

.rules-page { padding-bottom: 48px; }
.rules-shell { width: min(960px,calc(100% - 34px)); display: grid; gap: 14px; margin: 38px auto; }
.rules-lead h1 { margin: 7px 0 10px; font-family: var(--serif); font-size: clamp(2rem,5vw,3.3rem); }
.rules-lead > p { line-height: 1.8; }
.commerce-state { border: 1px solid rgba(130,56,45,.22); border-radius: 12px; color: var(--red); background: rgba(130,56,45,.05); padding: 12px 14px; font-weight: 900; }
.commerce-state.is-open { border-color: rgba(65,113,68,.25); color: #315d37; background: rgba(65,113,68,.07); }
.operator-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 14px 0 0; }
.operator-details div { border: 1px solid var(--border); border-radius: 10px; background: rgba(255,253,249,.7); padding: 10px; }
.operator-details dt { color: var(--muted); font-size: .72rem; }
.operator-details dd { margin: 4px 0 0; font-weight: 900; word-break: break-word; }
.rules-nav { position: sticky; top: 83px; z-index: 8; display: flex; gap: 7px; overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,253,249,.94); box-shadow: 0 10px 30px rgba(62,42,24,.08); padding: 7px; backdrop-filter: blur(14px); }
.rules-nav a { flex: 0 0 auto; border-radius: 8px; color: var(--gold-deep); background: rgba(237,218,180,.32); padding: 8px 11px; font-size: .75rem; font-weight: 900; }
.rules-section { scroll-margin-top: 144px; }
.rules-section > span { color: var(--gold-deep); font-size: .73rem; font-weight: 900; }
.rules-section h2 { margin-top: 5px; }
.rules-section p { margin: 8px 0 0; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 60; width: max-content; max-width: calc(100% - 28px); transform: translateX(-50%); border: 1px solid var(--border); border-radius: 999px; color: #fff; background: rgba(49,35,24,.94); box-shadow: 0 16px 44px rgba(38,25,15,.26); padding: 11px 16px; text-align: center; }
.admin-login-page { display: grid; min-height: 100vh; place-items: center; padding: 22px; }
.admin-login-shell { width: min(460px, 100%); }
.admin-login-shell .auth-card { width: 100%; }
.admin-login-shell h1 { margin: 5px 0 14px; font-family: var(--serif); text-align: center; }
.admin-local-note { border: 1px solid rgba(130,56,45,.18); border-radius: 12px; color: var(--ink-soft); background: rgba(130,56,45,.05); padding: 11px 12px; margin-bottom: 14px; font-size: .78rem; line-height: 1.65; }

@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 780px) {
  body { padding-bottom: 88px; }
  .app-header { min-height: 66px; padding: 7px 12px; }
  .app-brand img { width: 48px; height: 48px; }
  .app-brand small, .identity-chip { display: none; }
  .sound-toggle { width: 38px; height: 38px; padding: 4px; }
  .sound-toggle-icon { width: 29px; height: 29px; }
  .activity-ribbon { top: 66px; }
  .activity-ribbon > span { min-width: 78px; }
  .platform-shell { width: min(100% - 22px, 1240px); padding-top: 22px; }
  .home-grid, .form-grid, .profile-grid, .chat-layout { grid-template-columns: 1fr; }
  .journey-overview { grid-template-columns: 1fr; grid-template-areas: "kicker" "copy" "steps" "action"; gap: 10px; }
  .journey-steps { overflow-x: auto; padding-bottom: 2px; }
  .journey-actions { width: 100%; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .form-grid .wide { grid-column: auto; }
  .service-custom-fields { grid-template-columns:1fr; }
  .service-custom-fields p { grid-column:auto; }
  .model-row { grid-template-columns: 1fr; align-items: start; }
  .model-purpose label { grid-template-columns: 1fr; gap: 7px; }
  .payment-method-picker { grid-template-columns:1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .chat-layout { min-height: 650px; }
  .chat-orders { grid-auto-flow: column; grid-auto-columns: minmax(190px, 72%); overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .chat-room { min-height: 530px; }
  .message { max-width: 86%; }
  .bottom-nav { bottom: 8px; border-radius: 18px; }
  .bottom-nav button { min-height: 54px; border-radius: 13px; }
  .luxury-panel { border-radius: 17px; padding: 17px; }
  .operator-details { grid-template-columns: 1fr; }
  .rules-shell { width: min(100% - 22px,960px); margin-top: 22px; }
  .rules-nav { top: 72px; }
}

/* 2026-08-05 complete interaction and mobile parity pass */
.identity-chip { border: 0; cursor: pointer; font: inherit; }
.identity-chip:hover, .identity-chip:focus-visible { outline: 2px solid rgba(180,130,61,.35); outline-offset: 2px; }
.sound-unlock { position: sticky; top: 112px; z-index: 19; width: 100%; border: 0; color: #382315; background: #f2cd72; padding: 10px 16px; font-weight: 900; box-shadow: 0 5px 18px rgba(80,52,18,.16); }
.platform-hero { position: relative; min-height: 330px; display: grid; grid-template-columns: minmax(320px,.82fr) minmax(520px,1.18fr); align-items: stretch; overflow: hidden; margin-bottom: 14px; padding: 0; background: radial-gradient(circle at 78% 24%,rgba(230,192,118,.32),transparent 38%),linear-gradient(110deg,#fffdf8 0%,#f1e2c4 54%,#e9d3a7 100%); }
.platform-hero::before { content:""; position:absolute; inset:0; opacity:.26; background-image:url("assets/alternative-monogram-pattern.svg"); background-size:170px; mix-blend-mode:multiply; }
.platform-hero-copy { position: relative; z-index: 2; display: grid; align-content: center; gap: 10px; padding: 42px 20px 42px 42px; }
.platform-hero-copy p { margin:0; color:var(--gold-deep); font-size:.75rem; font-weight:900; letter-spacing:.22em; }
.platform-hero-copy h1 { max-width: 520px; margin:0; font-family:var(--serif); font-size:clamp(2.15rem,4vw,3.7rem); line-height:1.12; }
.platform-hero-copy > span { max-width: 520px; color:var(--ink-soft); line-height:1.75; }
.change-intent-button,.text-button { width:fit-content; border:0; border-bottom:1px solid rgba(133,80,35,.42); color:var(--gold-deep); background:transparent; padding:5px 1px; font-weight:900; cursor:pointer; }
.platform-hero-art { position:relative; z-index:1; min-height:330px; overflow:hidden; isolation:isolate; background:radial-gradient(ellipse at 50% 52%,rgba(255,255,255,.8) 0%,rgba(255,255,255,.58) 55%,rgba(255,255,255,.2) 78%,transparent 100%); }
.platform-hero-art::before { content:""; position:absolute; z-index:0; inset:-4% -8% -5%; background:radial-gradient(ellipse at 50% 52%,rgba(255,255,255,.86) 0%,rgba(255,255,255,.76) 46%,rgba(255,255,255,.54) 67%,rgba(255,255,255,.2) 83%,transparent 100%); filter:blur(16px); transform:scale(1.02); pointer-events:none; }
.platform-hero-art::after { content:""; position:absolute; z-index:2; inset:-3%; background:linear-gradient(90deg,rgba(255,255,255,.48) 0%,rgba(255,255,255,.16) 9%,transparent 20%,transparent 80%,rgba(255,255,255,.16) 91%,rgba(255,255,255,.48) 100%),linear-gradient(180deg,rgba(255,255,255,.44) 0%,rgba(255,255,255,.15) 10%,transparent 24%,transparent 76%,rgba(255,255,255,.15) 90%,rgba(255,255,255,.44) 100%); filter:blur(8px); opacity:.62; pointer-events:none; }
.platform-hero-art picture { position:relative; z-index:1; display:block; width:100%; height:100%; }
.platform-hero-art img { width:100%; height:100%; display:block; object-fit:contain; object-position:center bottom; filter:saturate(1.02) contrast(1.02) brightness(1.01) drop-shadow(0 14px 18px rgba(74,48,25,.13)); transform:scale(1.04); transform-origin:center bottom; }
.role-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.swipe-hint { display:none; margin:0; color:var(--gold-deep); font-size:.73rem; font-weight:900; }
.role-gallery article { min-width:0; display:grid; grid-template-columns:78px 1fr; align-items:center; gap:12px; border:1px solid var(--border); border-radius:17px; background:rgba(255,253,249,.9); box-shadow:0 10px 30px rgba(62,42,24,.08); padding:8px; }
.role-gallery img { width:78px; height:auto; aspect-ratio:3 / 4; border-radius:12px; object-fit:cover; object-position:center 18%; }
.role-gallery div,.order-role-picker span,.model-choice-grid span { min-width:0; display:grid; gap:4px; }
.role-gallery b,.order-role-picker b,.model-choice-grid b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--serif); }
.role-gallery span,.order-role-picker small,.model-choice-grid small { color:var(--muted); font-size:.74rem; }
.character-availability { width:fit-content; border:1px solid rgba(83,116,67,.28); border-radius:999px; color:#527443; background:rgba(222,237,214,.62); padding:3px 7px; font-size:.68rem; font-style:normal; font-weight:900; line-height:1.2; }
.character-availability.is-unavailable { border-color:rgba(130,56,45,.18); color:var(--red); background:rgba(130,56,45,.06); }
.choice-hint { margin:0 0 9px; color:var(--muted); font-size:.76rem; }
.flow-steps { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto; align-items:center; gap:9px; margin:14px 0; color:var(--ink-soft); font-size:.78rem; font-weight:900; }
.flow-steps span { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.flow-steps b { width:25px; height:25px; display:grid; place-items:center; border-radius:50%; color:#fff; background:linear-gradient(145deg,#c39751,#86522d); }
.flow-steps i { height:1px; background:linear-gradient(90deg,var(--gold),rgba(180,130,61,.18)); }
.order-role-picker,.model-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0 16px; }
.order-role-picker button,.model-choice-grid button { min-width:0; display:grid; grid-template-columns:72px 1fr; align-items:center; gap:10px; border:1px solid var(--border); border-radius:14px; color:var(--ink); background:rgba(255,253,249,.9); padding:7px; text-align:left; cursor:pointer; }
.order-role-picker button.is-selected,.model-choice-grid button.is-selected { border-color:var(--gold); background:linear-gradient(135deg,#fffdf9,#f0dfbd); box-shadow:0 0 0 3px rgba(180,130,61,.12); }
.order-role-picker button.is-unavailable:not(.is-selected),.model-choice-grid button.is-unavailable:not(.is-selected) { background:rgba(249,246,240,.82); }
.order-role-picker img,.model-choice-grid img { width:72px; height:auto; aspect-ratio:3 / 4; border-radius:10px; object-fit:cover; object-position:center 18%; }
.character-order-notice { margin:0; border-left:3px solid #668451; border-radius:8px; color:#405837; background:rgba(222,237,214,.42); padding:8px 10px; font-size:.76rem; font-weight:800; line-height:1.55; }
.character-order-notice.is-unavailable { border-left-color:var(--red); color:var(--red); background:rgba(130,56,45,.055); }
.model-buy-action { display:grid !important; justify-items:end; gap:7px !important; }
.model-buy-action .character-order-notice { max-width:270px; text-align:left; }
.model-buy-action button { white-space:nowrap; }
.connect-form { display:grid; grid-template-columns:1.15fr .85fr auto; align-items:end; gap:12px; }
.connect-form label { display:grid; gap:6px; }
.connect-form label > span { color:var(--ink-soft); font-size:.82rem; }
.connect-form label > span b { color:var(--gold-deep); }
.connect-form input { width:100%; min-height:48px; border:1px solid var(--border); border-radius:12px; outline:0; background:#fffdf9; padding:11px 13px; font-size:1rem; }
.connect-form input[name="code"] { font-size:1rem; font-weight:900; letter-spacing:.06em; }
.connect-form small { color:var(--muted); line-height:1.45; }
.connect-form .gold-button { min-height:48px; }
.dispatch-delivery { display:grid; gap:12px; border:1px solid rgba(180,130,61,.38); border-radius:16px; background:linear-gradient(135deg,rgba(255,253,249,.98),rgba(238,220,184,.34)); margin:12px 0 16px; padding:14px; box-shadow:0 12px 28px rgba(95,62,30,.08); }
.dispatch-delivery[hidden] { display:none; }
.dispatch-delivery > div:first-child { display:grid; gap:4px; }
.dispatch-delivery > div:first-child span { color:var(--gold-deep); font-size:.75rem; font-weight:900; letter-spacing:.16em; }
.dispatch-delivery h3,.dispatch-delivery p { margin:0; }
.dispatch-delivery p { color:var(--muted); font-size:.8rem; line-height:1.6; }
.dispatch-delivery-list { display:grid; gap:9px; }
.dispatch-delivery-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; border:1px solid var(--border); border-radius:13px; background:#fffdf9; padding:11px; }
.dispatch-delivery-card > div { min-width:0; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:6px 9px; }
.dispatch-delivery-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dispatch-delivery-card small { grid-column:1 / -1; color:var(--muted); }
.dispatch-phrase { grid-column:1 / -1; overflow-wrap:anywhere; color:var(--gold-deep); background:rgba(238,220,184,.38); border-radius:9px; padding:8px 10px; font-family:var(--serif); font-size:1rem; font-weight:900; letter-spacing:.04em; }
.order-role-portrait { flex:0 0 58px; width:58px; height:68px; border-radius:10px; object-fit:cover; object-position:center 18%; border:1px solid var(--border); }
.lobby-order header > div,.record-card header > div { min-width:0; flex:1; }
.record-next-step { border-left:3px solid var(--gold); color:var(--ink-soft); background:rgba(238,220,184,.25); padding:8px 10px; font-size:.8rem; line-height:1.55; }
.profile-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:16px; }
.intent-card { width:100%; max-width:100%; }
.intent-safe-note { border:1px solid rgba(180,130,61,.28); border-radius:12px; color:var(--ink-soft); background:rgba(238,220,184,.28); padding:11px 13px; line-height:1.65; }
.intent-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }
.intent-options button { display:grid; gap:7px; border:1px solid var(--border); border-radius:14px; color:var(--ink); background:#fffdf9; padding:15px; text-align:left; cursor:pointer; }
.intent-options button:hover,.intent-options button.is-selected { border-color:var(--gold); background:linear-gradient(135deg,#fffdf9,#f0dfbd); }
.intent-options b { font-family:var(--serif); font-size:1.02rem; }
.intent-options span { color:var(--muted); font-size:.8rem; line-height:1.6; }

@media (max-width:780px) {
  body { padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
  .app-header { min-height:92px; display:grid; grid-template-columns:auto 1fr; gap:8px; padding:7px 11px; }
  .app-brand { min-width:0; }
  .app-brand strong { font-size:.92rem; }
  .app-brand small { display:none; }
  .header-actions { display:grid; justify-items:end; gap:4px; min-width:0; }
  .identity-chip { display:block; max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 9px; font-size:.69rem; }
  .activity-ribbon { top:92px; }
  .sound-unlock { top:128px; }
  .platform-shell { width:calc(100% - 20px); padding-top:18px; }
  dialog { width:calc(100vw - 32px); max-width:calc(100vw - 32px); padding:0; }
  .site-popup-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 0; }
  .site-popup-card { gap: 10px; border-radius: 17px; padding: 21px 18px 18px; }
  .site-popup-body { max-height: 46dvh; font-size: .9rem; line-height: 1.72; }
  .auth-dialog,.payment-dialog,.intent-dialog { width:100%; }
  .platform-page[data-page="home"].is-active { display:flex; flex-direction:column; }
  .journey-overview { order:1; }
  .platform-hero { order:2; min-height:0; grid-template-columns:1fr; }
  .role-gallery { order:3; }
  .home-grid { order:4; }
  #createOrderCard { order:5; }
  #modelPurchaseCard { order:6; }
  .platform-hero-copy { order:1; padding:18px 18px 2px; }
  .platform-hero-copy h1 { font-size:2rem; }
  .platform-hero-art { order:2; min-height:170px; margin-top:-12px; background:radial-gradient(ellipse at 50% 50%,rgba(255,255,255,.8) 0%,rgba(255,255,255,.56) 58%,rgba(255,255,255,.16) 82%,transparent 100%); }
  .platform-hero-art::before { inset:-6% -8% -5%; filter:blur(13px); }
  .platform-hero-art::after { background:linear-gradient(180deg,rgba(255,255,255,.46) 0%,rgba(255,255,255,.15) 12%,transparent 26%,transparent 76%,rgba(255,255,255,.15) 90%,rgba(255,255,255,.48) 100%),linear-gradient(90deg,rgba(255,255,255,.5) 0%,rgba(255,255,255,.15) 12%,transparent 24%,transparent 76%,rgba(255,255,255,.15) 88%,rgba(255,255,255,.5) 100%); }
  .platform-hero-art img { width:100%; max-width:100%; margin-left:0; transform:none; object-position:center bottom; }
  .role-gallery { grid-auto-flow:column; grid-auto-columns:minmax(250px,82%); grid-template-columns:none; overflow-x:auto; scroll-snap-type:x mandatory; padding:28px 1px 7px; position:relative; }
  .swipe-hint { display:block; position:absolute; left:2px; top:2px; }
  .role-gallery article { scroll-snap-align:start; }
  .flow-steps { grid-template-columns:1fr 1fr; gap:8px; }
  .flow-steps i { display:none; }
  .flow-steps span { border:1px solid var(--border); border-radius:11px; background:rgba(255,253,249,.7); padding:7px; }
  .order-role-picker,.model-choice-grid { grid-auto-flow:column; grid-auto-columns:minmax(230px,78%); grid-template-columns:none; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:7px; }
  .order-role-picker button,.model-choice-grid button { scroll-snap-align:start; }
  .connect-form { grid-template-columns:1fr; }
  .connect-form .gold-button { width:100%; }
  .dispatch-delivery-card { grid-template-columns:1fr; }
  .dispatch-delivery-card > .gold-button { width:100%; }
  .intent-options { grid-template-columns:1fr; }
  .profile-actions > * { width:100%; }
  .security-columns, .privacy-request { grid-template-columns:1fr; }
  .privacy-request > div:first-child, .privacy-request > .form-status { grid-column:auto; }
  .bottom-nav { bottom:calc(7px + env(safe-area-inset-bottom)); }
}

@media (max-width:600px) {
  .audio-debug-addon-option { align-items:flex-start; }
  .audio-debug-addon-option em { margin-left:auto; text-align:right; }
}

@media (max-width:340px) {
  .audio-debug-addon-option { display:grid; grid-template-columns:auto minmax(0,1fr); }
  .audio-debug-addon-option em { grid-column:2; margin-left:0; text-align:left; }
}

@media (max-width:600px) {
  .order-role-picker,.model-choice-grid { grid-auto-flow:row; grid-auto-columns:auto; grid-template-columns:1fr; overflow-x:visible; }
  .order-role-picker button,.model-choice-grid button { grid-template-columns:64px 1fr; }
  .order-role-picker img,.model-choice-grid img { width:64px; height:auto; }
  .model-buy-action { width:100%; justify-items:stretch; }
  .model-buy-action .character-order-notice { max-width:none; }
  .model-buy-action button { width:100%; }
  .auth-card { padding:18px; }
  .captcha-row, .email-code-row { grid-template-columns:1fr; align-items:stretch; }
  .captcha-image { grid-template-columns:1fr auto; align-items:center; justify-items:stretch; }
  .captcha-image img { width:100%; }
  .email-code-row .outline-button { width:100%; }
  .security-heading { align-items:stretch; flex-direction:column; }
  .security-heading .compact-button { width:100%; }
  .security-session { grid-template-columns:1fr; }
  .security-session .outline-button { width:100%; }
  .privacy-request-row { grid-template-columns:1fr; }
}

.model-delivery-boundary { margin:10px 0 14px; padding:10px 12px; border:1px solid rgba(78,103,91,.26); background:rgba(78,103,91,.08); color:var(--ink-soft); font-size:.78rem; line-height:1.65; }
.delivery-token-box { display:grid; gap:8px; min-height:132px; align-content:center; margin:14px 0; padding:14px; border:1px solid rgba(197,157,80,.42); background:rgba(16,20,28,.72); }
.delivery-token-box strong { max-width:100%; color:#f1c86b; font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; font-size:1.08rem; line-height:1.65; overflow-wrap:anywhere; user-select:all; }
.delivery-token-hint { overflow-wrap:anywhere; }
.model-delivery-card { width:min(620px,100%); }
.model-delivery-warning { margin:10px 0; padding:10px 12px; border-left:4px solid #b85638; background:rgba(184,86,56,.12); color:var(--ink); line-height:1.65; }
.delivery-token-countdown { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 0; }
.delivery-token-countdown strong { min-width:5ch; color:#b85638; font-variant-numeric:tabular-nums; font-size:1.25rem; text-align:right; }
.model-delivery-copy-status { min-height:2.8em; margin:0; color:var(--ink-soft); font-size:.8rem; line-height:1.4; }
.model-delivery-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:9px; margin-top:10px; }
.model-delivery-actions .gold-button,.model-delivery-actions .outline-button { width:100%; min-width:0; margin:0; white-space:normal; }
.model-delivery-old-status:disabled { opacity:1; color:#7d3228; border-color:rgba(184,86,56,.42); background:rgba(184,86,56,.08); cursor:default; }
.model-regenerate-card { width:min(520px,100%); }
.model-regenerate-status { min-height:2.8em; margin:0; line-height:1.5; }
.model-regenerate-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:9px; }
.model-regenerate-actions .gold-button,.model-regenerate-actions .outline-button { width:100%; min-width:0; margin:0; white-space:normal; }
.model-regenerate-wait { flex-basis:100%; color:var(--muted); text-align:right; line-height:1.5; }

/* N36 phone readability: wrap user-facing copy; keep the short status chip readable on phones. */
@media (max-width:480px) {
  .activity-ribbon { min-height:38px; height:auto; }
  .activity-track {
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    line-height:1.45;
    padding-block:8px;
  }
  .journey-steps {
    overflow-x:visible;
    flex-wrap:wrap;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .flow-steps span,
  .role-gallery b,
  .order-role-picker b,
  .model-choice-grid b,
  .dispatch-delivery-card strong,
  .worker-identity small {
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .model-buy-action button { white-space:normal; }
  /* N36: status text is user-visible context, so show the full value on phones. */
  .identity-chip {
    max-width:100%;
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    line-height:1.35;
    text-align:right;
  }
}
@media (max-width:600px) {
  .model-delivery-actions,.model-regenerate-actions { grid-template-columns:1fr; }
  .model-regenerate-wait { text-align:left; }
}
/* Player business closure: catalog, online workers, inbox, complaints and avatars. */
.offering-picker,.coupon-picker { min-width:0; border:1px solid rgba(180,130,61,.28); border-radius:14px; background:rgba(255,253,249,.62); padding:12px; margin:0; }
.offering-picker legend,.coupon-picker legend { color:var(--ink-soft); font-size:.82rem; font-weight:900; padding:0 7px; }
.offering-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.offering-choice { min-width:0; min-height:104px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:center; gap:5px 10px; border:1px solid var(--border); border-radius:13px; color:var(--ink); background:#fffdf9; padding:13px; text-align:left; }
.offering-choice b { min-width:0; overflow-wrap:anywhere; font-family:var(--serif); font-size:1rem; }
.offering-choice small { grid-column:1 / -1; color:var(--muted); font-size:.75rem; line-height:1.5; overflow-wrap:anywhere; }
.offering-choice strong { grid-column:2; grid-row:1; align-self:center; color:var(--red); font-size:.92rem; white-space:nowrap; }
.offering-choice.is-selected { border-color:var(--gold); background:linear-gradient(135deg,#fffdf9,#f0dfbd); box-shadow:0 0 0 3px rgba(180,130,61,.12); }
.coupon-picker { display:grid; gap:9px; }
.coupon-picker > small { color:var(--muted); font-size:.74rem; line-height:1.55; }
.coupon-choice-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.coupon-choice { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:9px; border:1px solid var(--border); border-radius:12px; background:#fffdf9; padding:11px; cursor:pointer; }
.coupon-choice:has(input:checked) { border-color:var(--gold); background:rgba(237,218,180,.3); box-shadow:0 0 0 2px rgba(180,130,61,.1); }
.coupon-choice.is-unavailable { cursor:not-allowed; opacity:.58; }
.coupon-choice input { width:17px; height:17px; margin:2px 0 0; accent-color:var(--gold-deep); }
.coupon-choice span { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; }
.coupon-choice b { min-width:0; overflow-wrap:anywhere; }
.coupon-choice strong { color:var(--red); white-space:nowrap; }
.coupon-choice small { grid-column:1 / -1; color:var(--muted); font-size:.7rem; line-height:1.45; overflow-wrap:anywhere; }

.online-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; padding:12px; }
.segmented-control { display:inline-flex; gap:5px; overflow-x:auto; border:1px solid var(--border); border-radius:12px; background:rgba(247,238,221,.54); padding:5px; }
.segmented-control button { flex:0 0 auto; min-height:36px; border:0; border-radius:8px; color:var(--muted); background:transparent; padding:7px 13px; font-weight:800; }
.segmented-control button.is-active { color:#fff; background:linear-gradient(135deg,#b4823d,#84502b); }
.worker-profile-editor { margin-bottom:14px; border-top:4px solid var(--gold); }
.toggle-field { grid-template-columns:auto minmax(0,1fr); align-items:center; border:1px solid var(--border); border-radius:12px; background:rgba(255,253,249,.72); padding:10px 12px; }
.toggle-field input { width:20px; height:20px; accent-color:var(--gold-deep); }
.toggle-field > span { display:grid; gap:3px; }
.toggle-field small { color:var(--muted); font-size:.72rem; line-height:1.45; }
.worker-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.worker-card { min-width:0; display:grid; align-content:start; gap:12px; border:1px solid var(--border); border-top:4px solid #8a7b68; border-radius:17px; background:rgba(255,253,249,.88); box-shadow:0 14px 36px rgba(69,45,23,.08); padding:17px; }
.worker-card.status-online { border-top-color:#4f7a52; }
.worker-card.status-busy { border-top-color:#ad7932; }
.worker-card header,.worker-card footer { display:flex; align-items:flex-start; justify-content:space-between; gap:11px; }
.worker-identity { min-width:0; display:flex; align-items:center; gap:11px; }
.worker-identity > div:last-child { min-width:0; display:grid; gap:3px; }
.worker-identity h2 { min-width:0; margin:0; overflow-wrap:anywhere; font-family:var(--serif); font-size:1.2rem; }
.worker-identity small { min-width:0; overflow:hidden; color:var(--muted); font-size:.72rem; text-overflow:ellipsis; white-space:nowrap; }
.worker-avatar,.profile-avatar { position:relative; flex:0 0 auto; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(180,130,61,.32); border-radius:50%; color:#fff; background:linear-gradient(145deg,#c39751,#7f4e2d); font-family:var(--serif); font-size:1.25rem; font-weight:900; }
.worker-avatar { width:58px; height:58px; }
.worker-avatar img,.profile-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.worker-status { flex:0 0 auto; border:1px solid var(--border); border-radius:999px; color:var(--muted); background:rgba(255,253,249,.8); padding:5px 8px; font-size:.69rem; font-weight:900; }
.status-online .worker-status { border-color:rgba(79,122,82,.3); color:#416844; background:rgba(220,237,218,.6); }
.status-busy .worker-status { border-color:rgba(173,121,50,.3); color:#865b22; background:rgba(244,225,190,.65); }
.worker-meta { display:flex; flex-wrap:wrap; gap:6px; }
.worker-meta span { border-radius:7px; color:var(--ink-soft); background:rgba(125,85,37,.07); padding:5px 7px; font-size:.7rem; overflow-wrap:anywhere; }
.worker-bio { min-height:3.2em; margin:0; color:var(--muted); font-size:.78rem; line-height:1.6; overflow-wrap:anywhere; }
.worker-card footer { align-items:flex-end; margin-top:auto; }
.worker-pricing { min-width:0; display:grid; gap:3px; }
.worker-pricing b { color:var(--red); font-size:.8rem; }
.worker-pricing small { color:var(--muted); font-size:.68rem; }
.worker-card-actions { flex:0 0 auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.negotiation-center { margin-top:14px; }
.negotiation-list { display:grid; gap:10px; }
.negotiation-card,.complaint-card { display:grid; gap:10px; border:1px solid var(--border); border-radius:14px; background:rgba(255,253,249,.78); padding:14px; }
.negotiation-card header,.complaint-card header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.negotiation-card h3,.complaint-card h3 { margin:4px 0 0; font-family:var(--serif); }
.negotiation-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.negotiation-quote-form { display:grid; grid-template-columns:minmax(130px,200px) auto; gap:8px; }
.negotiation-quote-form input,.negotiation-accept-panel select { width:100%; min-height:42px; border:1px solid var(--border); border-radius:10px; background:#fffdf9; padding:9px 11px; }
.negotiation-accept-panel { flex:1 1 100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(170px,230px) auto; align-items:end; gap:8px; border:1px solid rgba(180,130,61,.26); border-radius:12px; background:rgba(237,218,180,.2); padding:10px; }
.negotiation-accept-panel > small { grid-column:1 / -1; color:var(--muted); line-height:1.5; }
.negotiation-coupons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.negotiation-price { color:var(--red) !important; font-weight:900; }

.complaint-center { display:grid; gap:14px; }
.complaint-form-panel { border-top:4px solid var(--red); }
.complaint-history { display:grid; gap:10px; }
.evidence-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.evidence-item { min-width:0; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:#fffdf9; margin:0; }
.evidence-item img { display:block; width:100%; aspect-ratio:4 / 3; object-fit:cover; }
.evidence-item figcaption { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px; }
.evidence-item small { min-width:0; color:var(--muted); font-size:.68rem; overflow-wrap:anywhere; }

.inbox-list { display:grid; gap:10px; }
.inbox-message { display:grid; gap:10px; border:1px solid var(--border); border-left:4px solid var(--gold); border-radius:14px; background:rgba(255,253,249,.88); box-shadow:0 10px 28px rgba(69,45,23,.06); padding:16px; }
.inbox-message.is-read { border-left-color:rgba(137,96,42,.28); opacity:.8; }
.inbox-message.is-important { border-left-color:var(--red); }
.inbox-message header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.inbox-message h2 { min-width:0; margin:0; overflow-wrap:anywhere; font-family:var(--serif); font-size:1.05rem; }
.inbox-message p { margin:0; color:var(--ink-soft); line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.inbox-message time { color:var(--muted); font-size:.7rem; }
.inbox-message > button { justify-self:end; }
.inbox-labels { display:flex; gap:5px; }
.important-badge,.read-badge,.unread-count { border-radius:999px; padding:3px 7px; font-size:.66rem; font-style:normal; font-weight:900; }
.important-badge { color:#fff; background:var(--red); }
.read-badge { color:var(--gold-deep); background:rgba(234,216,180,.52); }
.unread-count { display:inline-grid; min-width:19px; place-items:center; color:#fff; background:var(--red); margin-left:4px; }

.avatar-profile-card { display:grid; align-content:start; }
.avatar-profile-row { display:flex; align-items:center; gap:14px; margin-top:10px; }
.avatar-profile-row > div:last-child { min-width:0; }
.avatar-profile-row h2 { margin:0 0 5px; }
.avatar-profile-row p { margin:0; font-size:.78rem; }
.avatar-moderation-state { display:block; margin-top:7px; font-size:.72rem; font-weight:800; line-height:1.45; }
.avatar-moderation-state.is-approved { color:#4f7b42; }
.avatar-moderation-state.is-pending,.avatar-moderation-state.is-loading { color:#95651e; }
.avatar-moderation-state.is-rejected,.avatar-moderation-state.is-error { color:#a22d2d; }
.avatar-moderation-state.is-none { color:var(--muted); }
.profile-avatar { width:84px; height:84px; font-size:1.75rem; }
.avatar-crop-card { max-width:520px; }
.avatar-crop-card canvas { display:block; width:min(100%,340px); height:auto; aspect-ratio:1; border:1px solid var(--border); border-radius:12px; background:#fffdf9; margin:12px auto; box-shadow:0 12px 30px rgba(65,43,22,.1); }
.avatar-crop-controls { display:grid; gap:9px; }
.avatar-crop-controls label { display:grid; grid-template-columns:90px minmax(0,1fr); align-items:center; gap:10px; color:var(--ink-soft); font-size:.78rem; font-weight:800; }
.avatar-crop-controls input { width:100%; accent-color:var(--gold-deep); }
.avatar-crop-card > .gold-button { width:100%; margin-top:12px; }
.bottom-nav.is-six { width:min(880px,calc(100% - 24px)); grid-template-columns:repeat(6,minmax(0,1fr)); }

@media (max-width:980px) {
  .worker-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .offering-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .negotiation-accept-panel { grid-template-columns:1fr 1fr; }
  .negotiation-coupons,.negotiation-accept-panel > small { grid-column:1 / -1; }
}

@media (max-width:780px) {
  .online-toolbar { align-items:stretch; flex-direction:column; }
  .online-toolbar > button { width:100%; }
  .worker-card-grid,.offering-choice-grid,.coupon-choice-list { grid-template-columns:1fr; }
  .worker-card footer { align-items:stretch; flex-direction:column; }
  .worker-card-actions { width:100%; }
  .worker-card-actions > button { flex:1 1 140px; }
  .negotiation-accept-panel,.negotiation-coupons { grid-template-columns:1fr; }
  .negotiation-coupons,.negotiation-accept-panel > small { grid-column:auto; }
  .negotiation-accept-panel > button { width:100%; }
  .evidence-preview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bottom-nav.is-six { width:calc(100% - 12px); padding:5px; }
  .bottom-nav.is-six button { min-width:0; min-height:56px; padding:4px 1px; }
  .bottom-nav.is-six button b { max-width:100%; overflow-wrap:anywhere; font-size:.64rem; line-height:1.1; }
}

@media (max-width:480px) {
  .worker-card header,.negotiation-card header,.complaint-card header,.inbox-message header { align-items:stretch; flex-direction:column; }
  .worker-status,.inbox-labels { align-self:flex-start; }
  .negotiation-quote-form { grid-template-columns:1fr; width:100%; }
  .negotiation-quote-form .gold-button { width:100%; }
  .evidence-preview { grid-template-columns:1fr; }
  .avatar-profile-row { align-items:flex-start; }
  .profile-avatar { width:72px; height:72px; }
  .avatar-crop-controls label { grid-template-columns:1fr; gap:4px; }
}

/* Isolated audio-card merge: keep the guidance readable on narrow phones. */
@media (max-width:780px) {
}

@media (max-width:480px) {
}

/* Mobile hardening N89: prevent page-wide clipping and navigation overflow. */
html, body { max-width: 100%; overflow-x: hidden; }
.promotion-source-marker { margin: 0 auto 12px; max-width: 1180px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; color: var(--ink-soft); background: #fffdf9; font-size: .82rem; overflow-wrap: anywhere; }
.platform-shell, .platform-page, .luxury-panel, .section-heading, .model-row, .journey-overview,
.home-grid, .form-grid, .bottom-nav { min-width: 0; }
.platform-shell { width: min(1240px, calc(100% - 24px)); }
img, video, canvas, iframe { max-width: 100%; }
.model-row > *, .section-heading > *, .journey-overview > *, .luxury-panel > * { min-width: 0; max-width: 100%; }
.model-row > div, .model-row > strong, .model-buy-action { overflow-wrap: anywhere; }
.bottom-nav { max-width: calc(100vw - 16px); overflow: hidden; }
.bottom-nav button { min-width: 0; max-width: 100%; overflow: hidden; }
.bottom-nav button b, .bottom-nav button span { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 600px) {
  body { padding-bottom: 84px; }
  .app-header { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .app-brand img { width: 42px; height: 42px; }
  .app-brand strong { font-size: .98rem; letter-spacing: .05em; }
  .app-brand small { display: none; }
  .header-actions { min-width: 0; }
  .identity-chip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 9px; }
  .platform-shell { width: calc(100% - 16px); padding-top: 18px; }
  .luxury-panel { padding: 15px; border-radius: 15px; }
  .home-grid, .form-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .journey-overview { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kicker" "copy" "steps" "action"; gap: 9px; }
  .journey-steps { white-space: normal; flex-wrap: wrap; }
  .model-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .model-row > strong { justify-self: start; }
  .model-buy-action { display: grid; gap: 8px; }
  .bottom-nav { width: calc(100vw - 16px); left: 8px; transform: none; bottom: 8px; border-radius: 17px; padding: 4px; }
  .bottom-nav button { min-height: 52px; border-radius: 12px; }
  .bottom-nav button b { font-size: .62rem; line-height: 1.15; }
}
.admin-log-filters{display:grid;grid-template-columns:minmax(180px,260px) minmax(220px,1fr);gap:12px;margin:16px 0}.admin-log-filters label{display:grid;gap:6px;color:var(--muted,#6b7280);font-size:.85rem}.admin-log-filters select,.admin-log-filters input{width:100%;min-height:42px;border:1px solid rgba(30,41,59,.16);border-radius:12px;padding:0 12px;background:#fff;color:#172033}@media(max-width:640px){.admin-log-filters{grid-template-columns:1fr}}
