:root {
  color-scheme: dark;
  --bg: #000;
  --text: #f7f2e8;
  --muted: #c2baaa;
  --accent: #3478c5;
  --cream: #f6f2e9;
  --cream-surface: #fcf9f2;
  --pale-blue: #edf3fa;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html.profile-active, body.profile-active { background: var(--cream); }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.landing { position: fixed; inset: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #000; }
.hero { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hero canvas { display: block; width: 100%; height: 100%; }
.hold-hint { position: absolute; z-index: 3; top: calc(24px + env(safe-area-inset-top)); left: 0; right: 0; color: rgba(248,244,233,.68); text-align: center; font-size: 14px; letter-spacing: 3px; text-shadow: 0 1px 12px rgba(248,244,233,.25); pointer-events: none; }
.entry-area { position: absolute; z-index: 2; bottom: calc(30px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.enter-button { pointer-events: auto; min-width: 170px; min-height: 52px; padding: 0 38px; border: 1px solid rgba(248,244,233,.3); border-radius: 30px; background: rgba(248,244,233,.04); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #f8f4e9; font-size: 15px; letter-spacing: 3px; transition: background .2s,border-color .2s,transform .2s; }
.enter-button:hover { background: rgba(248,244,233,.09); border-color: rgba(248,244,233,.5); }
.enter-button:active { transform: scale(.97); }
.render-fallback { background: radial-gradient(ellipse at 55% 45%,#16212d,#000 70%); }
.profile-view { color-scheme: light; width: 100%; max-width: 720px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 22px calc(36px + env(safe-area-inset-bottom)); background: var(--cream); color: #282633; }
.back { display: inline-flex; align-items: center; padding: 5px 0; margin: 0 0 16px; color: #777582; background: transparent; font-size: 14px; }
.profile-heading { margin: 0 0 18px; }
.profile-heading h1 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: .2px; }
.profile-heading p { margin: 7px 0 0; color: #9795a1; font-size: 12px; line-height: 1.6; }
.profile-sections { display: flex; flex-direction: column; gap: 12px; }
.profile-section { overflow: hidden; border-radius: 12px; background: var(--pale-blue); }
.section-toggle { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; background: transparent; color: #282633; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.5; }
.section-chevron { flex: none; color: #787584; font-size: 22px; line-height: 1; transition: transform .18s ease; }
.profile-section.is-open .section-chevron { transform: rotate(180deg); }
.section-content { padding: 0 14px 16px; }
.profile-field { margin: 0; padding: 15px 0 0; }
.field-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px; min-height: 21px; margin-bottom: 8px; color: #615f69; font-size: 12px; }
.required-mark { color: #e35466; }
.field-help { margin-left: 2px; padding: 0; background: transparent; color: #3478c5; font-size: 11px; }
.profile-input, .profile-textarea { display: block; width: 100%; min-width: 0; border: 1px solid #e4ded2; border-radius: 8px; background: var(--cream-surface); color: #272633; font-size: 13px; line-height: 1.6; }
.profile-input { height: 42px; padding: 0 12px; }
.profile-textarea { min-height: 92px; padding: 10px 12px; resize: vertical; }
.profile-input::placeholder, .profile-textarea::placeholder { color: #bbb9c3; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 8px; }
.profile-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 8px 4px 10px; border-radius: 18px; background: #e7f0fa; color: #2c6eaf; font-size: 12px; overflow-wrap: anywhere; }
.profile-chip button { padding: 0; background: transparent; color: inherit; font-size: 17px; line-height: 1; }
.tag-entry { display: flex; align-items: stretch; gap: 8px; }
.tag-entry .profile-input { flex: 1; }
.tag-add { flex: none; min-width: 62px; padding: 0 12px; border-radius: 8px; background: var(--accent); color: #f8f4e9; font-size: 12px; }
.form-error { margin: 14px 0 0; color: #bf344e; font-size: 13px; }
.agreement-row { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 5px; margin: 22px 0 16px; color: #3478c5; font-size: 13px; }
.agreement-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.agreement-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.agreement-link { padding: 4px 0; background: transparent; color: #3478c5; font-size: inherit; }
.profile-actions { display: flex; justify-content: flex-end; }
.profile-submit { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-width: 136px; min-height: 48px; padding: 0 20px; border-radius: 9px; background: var(--accent); color: #f8f4e9; font-size: 14px; font-weight: 600; }
.profile-submit:active, .dialog-done:active { opacity: .85; }
.profile-dialog { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; color: #282633; }
.profile-dialog-backdrop { position: absolute; inset: 0; background: rgba(20,18,29,.58); }
.profile-dialog-card { position: relative; display: flex; flex-direction: column; width: min(100%, 560px); max-height: min(84dvh, 720px); border-radius: 16px; background: var(--cream); box-shadow: 0 18px 70px #0004; overflow: hidden; }
.profile-dialog-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.profile-dialog-card h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.dialog-close { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: #eee9df; color: #65626e; font-size: 23px; line-height: 1; }
.profile-dialog-body { overflow: auto; padding: 0 20px 18px; color: #52505b; font-size: 13px; line-height: 1.85; overscroll-behavior: contain; }
.profile-dialog-body p { margin: 0 0 9px; }
.protocol-section h3 { margin: 16px 0 6px; color: #302e38; font-size: 14px; }
.protocol-section ol { margin: 0; padding-left: 22px; }
.protocol-section li { padding-left: 2px; margin: 0 0 7px; }
.dialog-done { flex: none; min-height: 44px; margin: 0 20px 18px; border-radius: 9px; background: var(--accent); color: #f8f4e9; font-size: 14px; }
.inner-view, .success { max-width: 460px; margin: auto; padding: 70px 26px 60px; min-height: 100vh; }
.success { text-align: center; padding-top: 24vh; color: var(--text); }
.success-ring { width: 70px; height: 70px; margin: 0 auto 28px; border: 1px solid #52636c; border-radius: 50%; color: #e9eff1; font-size: 32px; line-height: 70px; }
.success h2 { font-size: 29px; font-weight: 600; }
.success p { margin: 16px 0 38px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.success .primary { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 0 20px; border-radius: 11px; background: #e9eff1; color: #101416; text-align: left; font-size: 16px; font-weight: 600; }
.success .primary span:last-child { font-size: 25px; font-weight: 400; }
@media (max-width: 480px) {
  .profile-view { padding-right: 14px; padding-left: 14px; }
  .profile-heading h1 { font-size: 22px; }
  .section-toggle { min-height: 52px; padding-right: 14px; padding-left: 14px; font-size: 13px; }
  .section-content { padding-right: 12px; padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
