:root {
  --cream: #f4dfbb;
  --paper: #fffaf0;
  --ink: #302016;
  --muted: #8d6d52;
  --green: #6f9e45;
  --green-dark: #497128;
  --red: #c44536;
  --shadow: 0 24px 70px rgba(72, 45, 21, .18);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: ui-rounded, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: radial-gradient(circle at 10% 10%, #fff6d9 0 18%, transparent 35%), radial-gradient(circle at 85% 0%, #c8e0a0 0 16%, transparent 34%), linear-gradient(135deg, #f1d6a7 0%, #e9c18c 48%, #d7aa73 100%); }
button, input { font: inherit; }
button { border: 0; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
button:active { transform: translateY(2px) scale(.99); }
#app { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 42px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.eyebrow, .kicker { margin: 0 0 6px; letter-spacing: .12em; font-size: 12px; color: var(--green-dark); font-weight: 900; }
h1 { max-width: 760px; margin: 0; font-size: clamp(32px, 5.4vw, 66px); line-height: .95; letter-spacing: -0.06em; }
h2 { margin: 0; font-size: 25px; letter-spacing: -0.04em; }
.view { display: none; }
.view.active { display: block; animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.top-tabs { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255,250,240,.58); box-shadow: inset 0 0 0 1px rgba(74, 43, 22, .1); }
.tab { min-height: 44px; padding: 0 18px; border-radius: 999px; color: #5b422e; background: transparent; font-weight: 900; }
.tab.active { background: #2f2118; color: #ffe7b5; box-shadow: 0 12px 26px rgba(48,32,22,.18); }
.panel { background: rgba(255, 250, 240, .84); border: 1px solid rgba(255,255,255,.65); border-radius: 30px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.recorder, .game-panel, .stats-panel, .history-panel { padding: 20px; }
.main-recorder { min-height: 430px; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head.compact { margin-bottom: 16px; }
.level-pill { padding: 10px 14px; border-radius: 999px; background: #2f2118; color: #ffe9bd; font-weight: 900; }
.meter-wrap { margin-bottom: 16px; }
.meter-copy { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.meter { height: 14px; background: #ead4ad; border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.12); }
#meterFill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), #c4d86f); border-radius: inherit; transition: width .45s ease; }
.stage { position: relative; height: min(64vh, 650px); min-height: 430px; overflow: hidden; border-radius: 34px; background: linear-gradient(180deg, rgba(255,255,255,.44), rgba(255,244,218,.62)), linear-gradient(145deg, #d7ad75, #9a7045); border: 0; box-shadow: inset 0 0 0 10px rgba(72, 43, 22, .18), inset 0 -8px 0 rgba(72, 43, 22, .14), inset 0 12px 24px rgba(255,255,255,.38); touch-action: none; }
.stage-glow { position: absolute; inset: 10% 12% auto; height: 34%; background: radial-gradient(ellipse, rgba(255,255,255,.42), transparent 66%); pointer-events: none; }
.rim { position: absolute; left: 8%; right: 8%; top: 12px; height: 18px; border-radius: 999px; background: rgba(255,255,255,.38); box-shadow: inset 0 -4px 0 rgba(80,50,20,.12); }
.blocks-layer { position: absolute; inset: 10px 10px 2px 10px; }
.poop-block { position: absolute; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; box-shadow: inset -6px -7px 0 rgba(0,0,0,.14), inset 5px 5px 0 rgba(255,255,255,.2), 0 7px 13px rgba(50,24,8,.18); transform-origin: center; will-change: transform, left, top; }
.poop-block::after { content: ""; position: absolute; inset: 5px auto auto 7px; width: 9px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.22); }
.poop-block.bloody { background-image: linear-gradient(118deg, transparent 0 28%, rgba(177, 22, 31, .72) 30% 34%, transparent 36% 100%), linear-gradient(34deg, transparent 0 58%, rgba(177, 22, 31, .55) 60% 63%, transparent 65% 100%); }
.poop-block.sticky::before { content: ""; position: absolute; right: 5px; bottom: 4px; width: 13px; height: 10px; border-radius: 999px 999px 999px 4px; background: rgba(255,255,255,.34); box-shadow: -12px -12px 0 -4px rgba(255,255,255,.22); }
.poop-block.dry { background-image: linear-gradient(135deg, rgba(0,0,0,.16) 0 2px, transparent 2px 11px), linear-gradient(45deg, rgba(255,255,255,.13) 0 2px, transparent 2px 12px); filter: contrast(1.12) saturate(.88); }
.poop-block.wet { filter: saturate(.78) brightness(1.08); }
.poop-block.wet::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: 5px; height: 7px; border-radius: 999px; background: rgba(79,195,247,.28); box-shadow: 8px -10px 0 -3px rgba(79,195,247,.22); }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: rgba(48,32,22,.64); gap: 8px; pointer-events: none; }
.empty-state strong { font-size: 28px; }
.empty-state span { font-size: 14px; }
.controls { display: grid; grid-template-columns: 1.1fr repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.primary-btn, .submit-btn { background: linear-gradient(135deg, var(--green), #a9c95f); color: white; box-shadow: 0 14px 28px rgba(77, 112, 43, .25); }
.soft-btn, .ghost-btn { background: rgba(255,250,240,.72); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(74, 43, 22, .1); }
.danger-btn { background: #f4d6cc; color: #9b2c20; }
.primary-btn, .soft-btn, .ghost-btn, .submit-btn, .danger-btn { min-height: 46px; padding: 0 16px; border-radius: 16px; font-weight: 900; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { min-height: 110px; border-radius: 22px; background: #f1dfbf; color: var(--ink); padding: 12px; display: grid; gap: 4px; justify-items: start; text-align: left; }
.choice span { width: 38px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.48); color: var(--green-dark); font-size: 13px; font-weight: 1000; }
.choice b { font-size: 17px; }
.choice small { color: var(--muted); line-height: 1.35; }
.choice.active { background: #2f2118; color: #ffe7b5; box-shadow: 0 14px 32px rgba(48,32,22,.22); }
.choice.active small { color: rgba(255,231,181,.72); }
.field-label { display: flex; justify-content: space-between; margin: 16px 0 8px; font-weight: 900; font-size: 14px; color: #604733; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.palette, .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.color-dot { width: 34px; height: 34px; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.52), 0 6px 14px rgba(0,0,0,.12); }
.color-dot.active { outline: 4px solid #2f2118; }
.tag { padding: 9px 12px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #f0dfc0; color: #5b422e; font-size: 13px; font-weight: 900; }
.tag.active { background: #2f2118; color: #ffe7b5; }
.submit-btn { width: 100%; margin-top: 22px; min-height: 56px; font-size: 17px; }
.record-public-row {
  width: min(320px, 100%);
  margin: 10px auto 0 !important;
  justify-content: center !important;
}
#recordView .submit-btn {
  margin-top: 16px !important;
}
.floating-stats { margin-top: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-grid div { padding: 14px; border-radius: 18px; background: #f0dfc0; display: grid; gap: 3px; }
.stats-grid strong { font-size: 25px; }
.stats-grid span { color: var(--muted); font-size: 12px; }
.notice { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.history-panel { margin-top: 18px; }
.inline-history { box-shadow: 0 16px 45px rgba(72, 45, 21, .12); }
.history-list { display: grid; gap: 10px; }
.record { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; background: rgba(240,223,192,.7); border-radius: 18px; }
.record-swatch { width: 34px; height: 34px; border-radius: 9px; box-shadow: inset -6px -6px 0 rgba(0,0,0,.12); }
.record b { display: block; }
.record small { color: var(--muted); }
.record time { color: var(--muted); font-size: 12px; }
@keyframes dropPop { 0% { transform: translateY(-90px) scale(.75) rotate(-16deg); opacity: 0; } 65% { opacity: 1; } 100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; } }
.new { animation: dropPop .55s cubic-bezier(.2,1.2,.24,1) both; }
@media (max-width: 900px) { #app { width: min(100% - 20px, 680px); padding-top: 18px; } .hero { align-items: start; flex-direction: column; } .record-grid { grid-template-columns: 1fr; } .stage { height: 58vh; min-height: 380px; } .controls { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .choice-grid, .stats-grid { grid-template-columns: 1fr; } .top-tabs { width: 100%; } .tab { flex: 1; } h1 { font-size: 38px; } .stage { min-height: 340px; } }
.plaza-panel, .feed-panel, .profile-card { padding: 20px; }
.plaza-stats { margin-bottom: 14px; }
.plaza-stage { height: min(58vh, 560px); min-height: 390px; background: linear-gradient(180deg, rgba(245,255,232,.38), rgba(255,244,218,.58)), linear-gradient(145deg, #b7c581, #9a7045); }
.feed-list { display: grid; gap: 10px; }
.feed-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(240,223,192,.7); }
.feed-swatch { width: 34px; height: 34px; border-radius: 9px; box-shadow: inset -6px -6px 0 rgba(0,0,0,.12); }
.feed-item b, .feed-item small { display: block; }
.feed-item small { color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px; border-radius: 16px; background: rgba(240,223,192,.72); font-weight: 900; color: #5b422e; }
.check-row input, .switch-row input { accent-color: var(--green); width: 18px; height: 18px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.profile-card.wide { grid-column: 1 / -1; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px; border-radius: 20px; background: rgba(240,223,192,.72); }
.switch-row b, .switch-row small { display: block; }
.switch-row small { margin-top: 5px; color: var(--muted); }
.disabled-btn { margin-top: 14px; opacity: .65; cursor: default; }
.health-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.health-card { padding: 16px; border-radius: 18px; background: rgba(240,223,192,.76); }
.health-card strong { display: block; font-size: 26px; margin-bottom: 4px; }
.health-card span { color: var(--muted); font-size: 13px; }
.color-stat-list { display: grid; gap: 10px; }
.color-stat { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.color-stat-dot { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset -4px -4px 0 rgba(0,0,0,.12); }
.color-stat-bar { height: 12px; border-radius: 999px; background: #ead4ad; overflow: hidden; }
.color-stat-fill { height: 100%; border-radius: inherit; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } .health-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .health-grid { grid-template-columns: 1fr; } .feed-item { grid-template-columns: auto 1fr; } .feed-item time { grid-column: 2; } }
.shape-grid { grid-template-columns: repeat(2, 1fr); }
.amount-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.amount-choice { min-height: 58px; padding: 12px; border-radius: 18px; background: #f1dfbf; color: var(--ink); text-align: left; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(74,43,22,.08); }
.amount-choice small { display: block; margin-top: 4px; color: var(--muted); font-weight: 700; }
.amount-choice.active { background: #2f2118; color: #ffe7b5; box-shadow: 0 14px 32px rgba(48,32,22,.18); }
.amount-choice.active small { color: rgba(255,231,181,.72); }
.volume-hint { margin-top: 12px; padding: 12px; border-radius: 16px; background: rgba(111,158,69,.12); color: var(--green-dark); font-weight: 900; font-size: 13px; line-height: 1.45; }
@media (max-width: 560px) { .shape-grid, .amount-grid { grid-template-columns: 1fr; } }
.month-summary { display: grid; gap: 12px; }
.month-card { padding: 16px; border-radius: 20px; background: rgba(240,223,192,.76); }
.month-card strong { display: block; font-size: 28px; margin-bottom: 4px; }
.month-card span { color: var(--muted); font-size: 13px; }
.month-card.good { background: rgba(111,158,69,.16); }
.month-card.warn { background: rgba(218,165,32,.18); }
.month-card.risk { background: rgba(196,69,54,.15); }
.archive-list { display: grid; gap: 10px; }
.archive-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: rgba(240,223,192,.76); }
.archive-item b, .archive-item small { display: block; }
.archive-item small { margin-top: 4px; color: var(--muted); }
/* App-style bottom navigation */
#app { padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
.hero { padding-right: 0; }
.top-tabs { display: none; }
.bottom-tabs { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; width: min(520px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; border-radius: 26px; background: rgba(255,250,240,.88); box-shadow: 0 18px 50px rgba(48,32,22,.22), inset 0 0 0 1px rgba(74,43,22,.1); backdrop-filter: blur(18px); }
.bottom-tabs .tab { min-height: 58px; padding: 6px 4px; border-radius: 20px; display: grid; place-items: center; gap: 2px; color: #6a4b34; background: transparent; }
.bottom-tabs .tab span { font-size: 20px; line-height: 1; }
.bottom-tabs .tab b { font-size: 12px; }
.bottom-tabs .tab.active { background: #2f2118; color: #ffe7b5; box-shadow: 0 12px 26px rgba(48,32,22,.2); }

/* Visual volume picker */
.visual-choice { min-height: 138px; justify-items: center; text-align: center; padding: 12px; }
.visual-choice b { font-size: 16px; }
.choice-art, .amount-art { display: block; position: relative; width: 100%; height: 82px; border-radius: 18px; background: rgba(255,255,255,.42); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(74,43,22,.06); }
.choice-art::before, .choice-art::after, .amount-art::before, .amount-art::after { content: ""; position: absolute; }
.choice-art.banana-full::before { left: 16%; top: 35px; width: 68%; height: 16px; border-radius: 999px; background: #d6a84d; transform: rotate(-10deg); box-shadow: inset -10px -5px 0 rgba(90,58,10,.18); }
.choice-art.lump-one::before { left: 28%; top: 25px; width: 44%; height: 34px; border-radius: 42% 50% 46% 55%; background: #8b6914; box-shadow: inset -10px -8px 0 rgba(0,0,0,.16); }
.choice-art.pellet-handful::before { left: 24%; top: 28px; width: 14px; height: 14px; border-radius: 50%; background: #b8860b; box-shadow: 22px 6px 0 #8b6914, 44px -3px 0 #d4a574, 18px 28px 0 #654321, 50px 24px 0 #c19a6b; }
.choice-art.loose-puddle::before { left: 22%; right: 22%; top: 31px; height: 27px; border-radius: 52% 48% 45% 55%; background: #a97739; box-shadow: inset -12px -8px 0 rgba(0,0,0,.12); }
.amount-choice.visual-amount { min-height: 108px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.amount-choice.visual-amount b { font-size: 14px; }
.amount-art { height: 54px; border-radius: 14px; }
.amount-art::before { top: 23px; height: 12px; border-radius: 999px; background: #d6a84d; box-shadow: inset -8px -4px 0 rgba(90,58,10,.18); }
.amount-art.long-half::before { left: 32%; width: 36%; transform: rotate(-9deg); }
.amount-art.long-one::before { left: 18%; width: 64%; transform: rotate(-9deg); }
.amount-art.long-oneHalf::before { left: 10%; width: 58%; transform: rotate(-9deg); box-shadow: inset -8px -4px 0 rgba(90,58,10,.18), 38px 14px 0 -1px #d6a84d; }
.amount-art.long-two::before { left: 13%; width: 58%; transform: rotate(-11deg); box-shadow: inset -8px -4px 0 rgba(90,58,10,.18), 20px 18px 0 0 #d6a84d; }
.amount-art.long-three::before { left: 10%; width: 48%; transform: rotate(-11deg); box-shadow: 18px 16px 0 #d6a84d, 38px 2px 0 #d6a84d; }
.amount-art.lump-small::before, .amount-art.lump-normal::before, .amount-art.lump-large::before, .amount-art.lump-double::before, .amount-art.lump-many::before { background: #8b6914; border-radius: 42% 50% 46% 55%; box-shadow: inset -8px -6px 0 rgba(0,0,0,.16); }
.amount-art.lump-small::before { left: 40%; top: 18px; width: 22px; height: 20px; }
.amount-art.lump-normal::before { left: 34%; top: 15px; width: 34px; height: 28px; }
.amount-art.lump-large::before { left: 28%; top: 11px; width: 50px; height: 36px; }
.amount-art.lump-double::before { left: 24%; top: 17px; width: 30px; height: 28px; box-shadow: inset -8px -6px 0 rgba(0,0,0,.16), 38px -4px 0 #8b6914; }
.amount-art.lump-many::before { left: 18%; top: 17px; width: 24px; height: 23px; box-shadow: 24px 7px 0 #654321, 48px -2px 0 #8b6914, 70px 10px 0 #b8860b; }
.amount-art.pellet-few::before, .amount-art.pellet-some::before, .amount-art.pellet-normal::before, .amount-art.pellet-many::before { left: 26%; top: 19px; width: 10px; height: 10px; border-radius: 50%; background: #b8860b; }
.amount-art.pellet-few::before { box-shadow: 22px 6px 0 #8b6914; }
.amount-art.pellet-some::before { box-shadow: 18px 6px 0 #8b6914, 36px -3px 0 #d4a574, 30px 18px 0 #654321; }
.amount-art.pellet-normal::before { box-shadow: 16px 4px 0 #8b6914, 32px -4px 0 #d4a574, 24px 18px 0 #654321, 50px 12px 0 #c19a6b; }
.amount-art.pellet-many::before { box-shadow: 12px 3px 0 #8b6914, 24px -5px 0 #d4a574, 26px 14px 0 #654321, 42px 7px 0 #c19a6b, 57px -2px 0 #b8860b, 66px 15px 0 #8b6914; }
.amount-art.loose-small::before, .amount-art.loose-normal::before, .amount-art.loose-large::before, .amount-art.loose-bowl::before { background: #a97739; border-radius: 52% 48% 45% 55%; box-shadow: inset -9px -6px 0 rgba(0,0,0,.12); }
.amount-art.loose-small::before { left: 36%; top: 19px; width: 30px; height: 18px; }
.amount-art.loose-normal::before { left: 30%; top: 17px; width: 44px; height: 23px; }
.amount-art.loose-large::before { left: 22%; top: 14px; width: 64px; height: 29px; }
.amount-art.loose-bowl::before { left: 12%; right: 12%; top: 15px; height: 30px; }
@media (max-width: 560px) { #app { width: min(100% - 18px, 520px); padding-top: 16px; } .hero { margin-bottom: 14px; } .eyebrow { font-size: 11px; } h1 { font-size: clamp(30px, 10vw, 42px); } .visual-choice { min-height: 124px; } .choice-art { height: 72px; } .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .amount-choice.visual-amount { min-height: 96px; padding: 9px; } .bottom-tabs { width: calc(100% - 18px); } }
/* Compact app pages */
#app { width: min(980px, calc(100% - 24px)); }
body { overflow-x: hidden; }
#recordView.active, #containerView.active { min-height: calc(100vh - 138px); display: grid; align-items: start; }
#statsView .history-panel { display: block; }
.hero { margin-bottom: 14px; }
#recordView .main-recorder { min-height: 0; max-height: calc(100vh - 155px); overflow: hidden; padding: 16px; }
#recordView .panel-head { margin-bottom: 8px; }
#recordView .record-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; }
#recordView .field-label { margin: 9px 0 6px; }
#recordView .volume-hint { display: none; }
#recordView .submit-btn { margin-top: 12px; min-height: 50px; }
#recordView .check-row { margin-top: 10px; padding: 9px 10px; }
#recordView .palette, #recordView .tags { gap: 6px; }
#recordView .tag { padding: 7px 10px; font-size: 12px; }
#recordView .color-dot { width: 30px; height: 30px; border-radius: 10px; }
#recordView .visual-choice { min-height: 104px; padding: 8px; border-radius: 18px; }
#recordView .choice-art { height: 62px; border-radius: 14px; }
#recordView .visual-choice b { font-size: 14px; }
#recordView .amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#recordView .amount-choice.visual-amount { min-height: 74px; padding: 7px; border-radius: 14px; gap: 4px; }
#recordView .amount-art { height: 34px; border-radius: 10px; }
#recordView .amount-choice.visual-amount b { font-size: 12px; line-height: 1.15; }
#containerView .game-panel { padding: 16px; max-height: calc(100vh - 155px); overflow: hidden; }
#containerView .floating-stats { display: none; }
#containerView .panel-head { margin-bottom: 8px; }
#containerView .meter-wrap { margin-bottom: 10px; }
#containerView .stage { height: calc(100vh - 330px); min-height: 280px; max-height: 520px; }
#containerView .controls { grid-template-columns: repeat(5, 1fr); gap: 8px; }
#containerView .controls button { min-height: 42px; padding: 0 8px; font-size: 13px; }
#plazaView.active { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
#plazaView .plaza-panel { position: sticky; top: 10px; z-index: 2; padding: 16px; }
#plazaView .plaza-stage { height: min(44vh, 420px); min-height: 270px; }
#plazaView .plaza-stats { grid-template-columns: repeat(3, 1fr); }
#plazaView .feed-panel { padding: 16px; }
.feed-list { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feed-item { align-items: start; }
@media (max-width: 760px) {
  #app { width: min(100% - 16px, 520px); padding-top: 12px; }
  .hero { margin-bottom: 10px; }
  .eyebrow { display: none; }
  h1 { font-size: clamp(25px, 7.8vw, 34px); line-height: 1; }
  #recordView .main-recorder { max-height: none; min-height: calc(100vh - 126px); overflow: visible; }
  #recordView .record-grid { grid-template-columns: 1fr; gap: 6px; }
  #recordView .shape-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  #recordView .visual-choice { min-height: 82px; border-radius: 16px; }
  #recordView .choice-art { height: 45px; }
  #recordView .visual-choice b { font-size: 12px; }
  #recordView .amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #recordView .amount-choice.visual-amount { min-height: 66px; }
  #recordView .panel-head h2 { font-size: 20px; }
  #recordView .ghost-btn { min-height: 38px; padding: 0 10px; font-size: 12px; }
  #containerView .game-panel { max-height: none; min-height: calc(100vh - 126px); }
  #containerView .stage { height: calc(100vh - 300px); min-height: 300px; }
  #containerView .controls { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #containerView .controls button { font-size: 12px; border-radius: 13px; }
  #plazaView .plaza-panel { top: 8px; }
  #plazaView .plaza-stage { height: 38vh; min-height: 260px; }
}
@media (max-width: 420px) {
  #recordView .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #recordView .shape-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #recordView .choice-art { height: 40px; }
  #recordView .visual-choice { padding: 6px 4px; }
  #containerView .controls { grid-template-columns: repeat(3, 1fr); }
  #containerView .stage { height: calc(100vh - 340px); }
}
@media (max-width: 760px) {
  #recordView .amount-grid { display: flex; overflow-x: auto; gap: 7px; padding-bottom: 2px; scrollbar-width: none; }
  #recordView .amount-grid::-webkit-scrollbar { display: none; }
  #recordView .amount-choice.visual-amount { min-width: 86px; min-height: 60px; }
  #recordView .amount-art { height: 28px; }
  #recordView .field-label { margin: 7px 0 5px; }
  #recordView .palette { max-height: 66px; overflow: hidden; }
  #recordView .tags { max-height: 74px; overflow: hidden; }
  #recordView .submit-btn { min-height: 48px; margin-top: 10px; }
  #recordView .check-row { font-size: 12px; }
}
@media (max-width: 760px) {
  #recordView .main-recorder { min-height: 0; max-height: calc(100vh - 104px); overflow: hidden; }
  #recordView .panel-head { margin-bottom: 4px; }
  #recordView .panel-head h2 { font-size: 18px; }
  #recordView .record-grid, #recordView .record-grid > div, #recordView .amount-grid { min-width: 0; max-width: 100%; }
  #recordView .shape-grid { gap: 5px; }
  #recordView .visual-choice { min-height: 66px; padding: 5px 3px; gap: 2px; }
  #recordView .choice-art { height: 31px; border-radius: 10px; }
  #recordView .visual-choice b { font-size: 11px; }
  #recordView .amount-grid { width: 100%; overflow-x: auto; overflow-y: hidden; }
  #recordView .amount-choice.visual-amount { flex: 0 0 76px; min-width: 76px; max-width: 76px; min-height: 54px; padding: 5px; }
  #recordView .amount-choice.visual-amount b { font-size: 11px; }
  #recordView .amount-art { height: 23px; }
  #recordView .field-label { margin: 5px 0 4px; font-size: 12px; }
  #recordView .color-dot { width: 26px; height: 26px; }
  #recordView .tag { padding: 6px 8px; font-size: 11px; }
  #recordView .tags { max-height: 58px; }
  #recordView .palette { max-height: 58px; }
  #recordView .check-row { margin-top: 7px; padding: 7px 8px; }
  #recordView .submit-btn { min-height: 44px; margin-top: 8px; font-size: 14px; }
}
/* Cute contrast theme: mascot and pictographic tags */
.mascot-head { align-items: center; }
.mascot-card { position: relative; width: 120px; height: 74px; flex: 0 0 auto; border-radius: 24px; background: linear-gradient(135deg, #ffe8a6, #cbe68f); box-shadow: inset 0 0 0 1px rgba(74,43,22,.08); overflow: hidden; }
.mascot-body { position: absolute; left: 35px; top: 17px; width: 52px; height: 44px; border-radius: 48% 52% 46% 54%; background: #fff7df; box-shadow: inset -8px -8px 0 rgba(111,158,69,.13), 0 7px 18px rgba(48,32,22,.14); }
.mascot-body::before, .mascot-body::after { content: ""; position: absolute; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: #302016; }
.mascot-body::before { left: 16px; }
.mascot-body::after { right: 16px; }
.mascot-mouth { position: absolute; left: 22px; top: 25px; width: 9px; height: 5px; border-radius: 0 0 999px 999px; background: #e48976; }
.snack { position: absolute; }
.snack-banana { left: 10px; top: 16px; width: 26px; height: 9px; border-radius: 999px; background: #d6a84d; transform: rotate(-18deg); box-shadow: inset -5px -3px 0 rgba(90,58,10,.17); }
.snack-tea { right: 10px; bottom: 10px; width: 20px; height: 28px; border-radius: 6px 6px 9px 9px; background: linear-gradient(#f6d68d 0 38%, #b87d43 39%); box-shadow: inset -4px -4px 0 rgba(0,0,0,.1); }
.snack-tea::before { content: ""; position: absolute; left: 4px; top: -7px; width: 12px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.7); }
.snack-choco { right: 12px; top: 13px; width: 18px; height: 18px; border-radius: 7px; background: #8b5a2b; transform: rotate(12deg); box-shadow: inset -5px -5px 0 rgba(0,0,0,.13); }
.icon-tag { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; row-gap: 0; text-align: left; border-radius: 16px; padding: 7px 9px; }
.icon-tag span { grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 9px; position: relative; background: rgba(255,255,255,.55); box-shadow: inset -3px -3px 0 rgba(0,0,0,.08); }
.icon-tag b { font-size: 12px; line-height: 1.1; }
.icon-tag small { font-size: 10px; color: var(--muted); line-height: 1.1; white-space: nowrap; }
.icon-tag.active small { color: rgba(255,231,181,.72); }
.feeling-easy span::before { content: ""; position: absolute; left: 6px; top: 8px; width: 12px; height: 7px; border: 3px solid #6f9e45; border-top: 0; border-left: 0; transform: rotate(45deg); }
.feeling-normal span::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #6f9e45; }
.feeling-bloat span::before { content: ""; position: absolute; left: 5px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #d6a84d; box-shadow: 0 0 0 4px rgba(214,168,77,.2); }
.feeling-pain span::before { content: ""; position: absolute; left: 10px; top: 4px; width: 5px; height: 16px; border-radius: 999px; background: #c44536; transform: rotate(25deg); }
.feeling-constipation span::before { content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 4px; background: #8b6914; box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); }
.feeling-gas span::before { content: ""; position: absolute; left: 5px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: #85c7d8; box-shadow: 8px -5px 0 #85c7d8, 13px 5px 0 #85c7d8; }
.feeling-urgent span::before { content: ""; position: absolute; left: 6px; top: 5px; width: 13px; height: 13px; border-radius: 50% 50% 50% 0; background: #e48976; transform: rotate(-45deg); }
.feeling-tired span::before { content: ""; position: absolute; left: 5px; top: 9px; width: 14px; height: 7px; border-radius: 999px; background: #8d6d52; }
.feeling-burn span::before { content: ""; position: absolute; left: 7px; top: 4px; width: 10px; height: 16px; border-radius: 60% 60% 50% 50%; background: linear-gradient(#e76f51, #f6bd60); }
.effect-bloody span::before { content: ""; position: absolute; left: 7px; top: 5px; width: 4px; height: 15px; border-radius: 999px; background: #b1161f; transform: rotate(35deg); box-shadow: 7px 4px 0 -1px #b1161f; }
.effect-sticky span::before { content: ""; position: absolute; left: 5px; top: 8px; width: 14px; height: 10px; border-radius: 999px 999px 999px 4px; background: rgba(255,255,255,.75); }
.effect-dry span::before { content: ""; position: absolute; left: 5px; top: 5px; width: 14px; height: 14px; border-radius: 4px; background: repeating-linear-gradient(45deg, #8b6914 0 3px, #6c4e12 3px 5px); }
.effect-wet span::before { content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 14px; border-radius: 50% 50% 60% 60%; background: rgba(79,195,247,.65); }
.choice-art.lump-one::before, .amount-art.lump-small::before, .amount-art.lump-normal::before, .amount-art.lump-large::before, .amount-art.lump-double::before, .amount-art.lump-many::before { background: radial-gradient(circle at 38% 34%, #c79b55 0 18%, transparent 19%), #8b5a2b; }
.choice-art.loose-puddle::before, .amount-art.loose-small::before, .amount-art.loose-normal::before, .amount-art.loose-large::before, .amount-art.loose-bowl::before { background: linear-gradient(#f6d68d 0 28%, #b87d43 29%); }
@media (max-width: 760px) { .mascot-card { width: 88px; height: 54px; border-radius: 18px; } .mascot-body { left: 28px; top: 13px; width: 36px; height: 31px; } .snack-banana { left: 8px; top: 12px; transform: scale(.78) rotate(-18deg); } .snack-tea, .snack-choco { transform: scale(.72); } .icon-tag small { display: none; } .icon-tag { grid-template-columns: auto auto; padding: 6px 7px; } .icon-tag span { width: 21px; height: 21px; } }
@media (max-width: 420px) { .mascot-card { display: none; } }
/* Image-first recording controls */
#recordView .field-label { display: none; }
.image-only b, .image-only small { display: none !important; }
.visual-choice.image-only { min-height: 92px; display: grid; place-items: center; padding: 8px; }
.visual-choice.image-only .choice-art { height: 70px; width: 100%; background-color: rgba(255,255,255,.38); }
.amount-choice.image-only { display: grid; place-items: center; padding: 7px; }
.amount-choice.image-only .amount-art { width: 100%; }
#recordView .volume-hint { display: block; padding: 8px 10px; font-size: 12px; text-align: center; }
@media (max-width: 760px) {
  .visual-choice.image-only { min-height: 64px; }
  .visual-choice.image-only .choice-art { height: 48px; }
  .amount-choice.image-only .amount-art { height: 34px; }
  #recordView .volume-hint { display: none; }
}
/* Minimal cleanup */
.hero { min-height: 0; margin-bottom: 8px; }
.hero .eyebrow, #heroTitle { display: none; }
.panel { border-radius: 28px; }
#recordView .main-recorder { padding: 14px; background: rgba(255,250,240,.9); }
#recordView .panel-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; margin-bottom: 6px; }
#recordView .panel-head .kicker { font-size: 18px; letter-spacing: .02em; margin: 0; color: var(--green-dark); }
#recordView .panel-head h2 { display: none; }
#recordView .ghost-btn { min-height: 40px; border-radius: 999px; padding: 0 18px; }
#recordView .record-grid { gap: 10px; }
#recordView .visual-choice.image-only { background: rgba(244,223,187,.72); box-shadow: none; }
#recordView .visual-choice.image-only.active, #recordView .amount-choice.image-only.active { background: #2f2118; }
#recordView .amount-choice.image-only { background: rgba(244,223,187,.72); box-shadow: none; }
#recordView .color-dot { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
#recordView .icon-tag { box-shadow: none; background: rgba(244,223,187,.72); }
#recordView .icon-tag.active { background: #2f2118; }
#recordView .check-row { border-radius: 22px; background: rgba(244,223,187,.72); }
#recordView .submit-btn { border-radius: 22px; box-shadow: 0 12px 26px rgba(77,112,43,.2); }
#plazaView .plaza-panel .panel-head { margin-bottom: 6px; }
#plazaView .plaza-panel .kicker { font-size: 18px; letter-spacing: .02em; margin: 0; }
#plazaView .plaza-panel h2, #plazaView .feed-panel h2 { display: none; }
#plazaView .plaza-stats { display: flex; gap: 8px; margin-bottom: 8px; }
#plazaView .plaza-stats div { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 999px; display: flex; align-items: baseline; justify-content: center; gap: 5px; }
#plazaView .plaza-stats strong { font-size: 16px; }
#plazaView .plaza-stats span { font-size: 10px; }
#plazaView .plaza-stage { height: min(42vh, 390px); min-height: 250px; }
#plazaView .feed-panel .panel-head { margin-bottom: 6px; }
#plazaView .feed-panel .kicker { margin: 0; }
.feed-item { padding: 10px; border-radius: 16px; }
@media (max-width: 760px) {
  .hero { display: none; }
  #app { padding-top: 8px; }
  #recordView.active, #containerView.active { min-height: calc(100vh - 104px); }
  #recordView .main-recorder { max-height: calc(100vh - 96px); }
  #recordView .panel-head { grid-template-columns: 1fr auto; }
  #recordView .mascot-card { display: none; }
  #plazaView .plaza-panel { top: 8px; }
  #plazaView .plaza-stage { height: 36vh; min-height: 230px; }
}
/* Sampling page redesign */
#recordView .main-recorder { background: linear-gradient(180deg, rgba(255,253,240,.94), rgba(250,244,224,.92)); }
#recordView .panel-head { grid-template-columns: 1fr auto; border-bottom: 1px solid rgba(74,43,22,.08); padding-bottom: 8px; }
#recordView .panel-head .kicker { font-size: 20px; color: #355d2a; }
#recordView .mascot-card { display: none; }
#recordView .record-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
#recordView .record-grid > div:first-child, #recordView .record-grid > div:last-child { display: grid; gap: 8px; min-width: 0; }
#recordView .shape-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#recordView .visual-choice.image-only { min-height: 74px; border-radius: 20px; padding: 7px; background: rgba(244,223,187,.58); }
#recordView .visual-choice.image-only .choice-art { height: 54px; border-radius: 15px; }
#recordView .amount-grid { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
#recordView .amount-grid::-webkit-scrollbar { display: none; }
#recordView .amount-choice.image-only { flex: 0 0 76px; min-width: 76px; min-height: 58px; border-radius: 16px; background: rgba(244,223,187,.58); }
#recordView .amount-choice.image-only .amount-art { height: 34px; }
#recordView .palette { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; max-height: none; }
#recordView .color-dot { width: 100%; aspect-ratio: 1; min-width: 0; height: auto; border-radius: 11px; }
#recordView #feelingTags { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; max-height: none; }
#recordView #effectTags { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-height: none; }
#recordView .icon-tag { display: grid; place-items: center; grid-template-columns: 1fr; min-height: 48px; padding: 5px; border-radius: 16px; }
#recordView .icon-tag span { grid-row: auto; width: 27px; height: 27px; }
#recordView .icon-tag b { font-size: 11px; margin-top: 2px; }
#recordView .icon-tag small { display: none; }
#recordView .check-row { margin-top: 0; min-height: 48px; border-radius: 18px; justify-content: center; }
#recordView .submit-btn { min-height: 52px; border-radius: 20px; }
@media (min-width: 820px) {
  #recordView .record-grid { grid-template-columns: 1.05fr .95fr; gap: 14px; }
  #recordView #feelingTags { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #recordView .main-recorder { max-height: calc(100vh - 96px); padding: 12px; }
  #recordView .panel-head .kicker { font-size: 18px; }
  #recordView .visual-choice.image-only { min-height: 58px; padding: 5px; }
  #recordView .visual-choice.image-only .choice-art { height: 43px; }
  #recordView .amount-choice.image-only { flex-basis: 68px; min-width: 68px; min-height: 48px; }
  #recordView .amount-choice.image-only .amount-art { height: 27px; }
  #recordView .palette { gap: 5px; }
  #recordView #feelingTags { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  #recordView #effectTags { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  #recordView .icon-tag { min-height: 42px; border-radius: 14px; }
  #recordView .icon-tag span { width: 23px; height: 23px; }
  #recordView .icon-tag b { font-size: 10px; }
  #recordView .check-row { min-height: 42px; }
  #recordView .submit-btn { min-height: 46px; }
}
/* Mother ship signal stream */
#plazaView .feed-list { column-count: 2; column-gap: 10px; display: block; }
.signal-item { break-inside: avoid; display: block; margin: 0 0 10px; padding: 12px; border-radius: 16px; background: rgba(255,250,240,.76); box-shadow: inset 0 0 0 1px rgba(74,43,22,.06); }
.signal-item p { margin: 0; font-size: 13px; line-height: 1.45; color: #4d3928; }
.signal-item b { color: #2f2118; }
.signal-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.feed-swatch { display: none; }
/* Keep sampling reference art fully visible */
.choice-art, .amount-art { overflow: visible; }
#recordView .visual-choice.image-only, #recordView .amount-choice.image-only { overflow: hidden; }
#recordView .choice-art.banana-full::before { left: 18%; width: 62%; top: 28px; }
#recordView .choice-art.lump-one::before { top: 22px; height: 28px; }
#recordView .choice-art.pellet-handful::before { top: 24px; }
#recordView .choice-art.loose-puddle::before { top: 29px; height: 22px; }
#recordView .amount-art::before { top: 15px; }
@media (max-width: 760px) {
  #plazaView .feed-list { column-count: 1; }
  #recordView .choice-art.banana-full::before { top: 20px; }
  #recordView .choice-art.lump-one::before { top: 16px; height: 22px; }
  #recordView .choice-art.pellet-handful::before { top: 16px; }
  #recordView .choice-art.loose-puddle::before { top: 19px; height: 18px; }
  #recordView .amount-art::before { top: 11px; }
}
#containerView .controls.compact-controls { grid-template-columns: 1fr 1.2fr 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
@media (max-width: 420px) { #containerView .controls.compact-controls { grid-template-columns: 1fr 1fr 1fr; } }
/* Mother ship: large tank + ticker */
#plazaView.active { gap: 8px; }
#plazaView .plaza-panel { min-height: calc(100vh - 116px); display: grid; grid-template-rows: auto auto 1fr; }
#plazaView .plaza-panel .panel-head { margin-bottom: 4px; }
#plazaView .plaza-stats { margin-bottom: 6px; }
#plazaView .plaza-stage { height: auto; min-height: 0; }
#plazaView .feed-panel { padding: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; margin-top: -62px; position: relative; z-index: 4; pointer-events: none; }
#plazaView .feed-panel .panel-head { display: none; }
#plazaView .feed-list { column-count: auto; display: block; }
#plazaView .signal-item { width: min(560px, calc(100% - 28px)); margin: 0 auto; border-radius: 999px; padding: 9px 16px; background: rgba(47,33,24,.82); color: #ffe7b5; box-shadow: 0 14px 34px rgba(48,32,22,.2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#plazaView .signal-item p { display: inline; color: inherit; font-size: 12px; }
#plazaView .signal-item small { display: inline; margin-left: 8px; color: rgba(255,231,181,.7); font-size: 11px; }
#plazaBlocksLayer .poop-block { border-radius: 3px; box-shadow: inset -2px -2px 0 rgba(0,0,0,.16), 0 2px 4px rgba(50,24,8,.12); }
#plazaBlocksLayer .poop-block::after, #plazaBlocksLayer .poop-block::before { display: none; }
@media (max-width: 760px) {
  #plazaView .plaza-panel { min-height: calc(100vh - 98px); }
  #plazaView .plaza-stage { height: auto; min-height: 0; }
  #plazaView .signal-item { width: calc(100% - 20px); }
}
#plazaView .signal-item { height: 36px; display: flex; align-items: center; gap: 8px; }
#plazaView .signal-item p, #plazaView .signal-item small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#plazaView .signal-item p { flex: 0 0 auto; }
#plazaView .signal-item small { flex: 1 1 auto; margin-left: 0; }
@media (max-width: 760px) { #plazaView .signal-item small { display: none; } #plazaView .signal-item p { flex: 1 1 auto; } }
.archive-item { width: 100%; border: 0; text-align: left; color: inherit; cursor: pointer; }
.archive-item:active { transform: scale(.99); }
.archive-item time { color: var(--muted); font-size: 12px; }
.archive-item.unverified-archive { opacity: .72; cursor: default; background: rgba(240,223,192,.5); }
.archive-item.unverified-archive:active { transform: none; }
.archive-notice { margin-bottom: 8px; }
/* Simplified sampling fields */
#recordView .shape-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#recordView .text-tags { display: flex; flex-wrap: wrap; gap: 6px; max-height: none; }
#recordView .text-tag { min-height: 34px; padding: 7px 11px; border-radius: 999px; font-size: 12px; background: rgba(244,223,187,.68); box-shadow: none; }
#recordView .text-tag.active { background: #2f2118; color: #ffe7b5; }
.hidden-effects { display: none !important; }
.custom-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.custom-row input { min-width: 0; height: 38px; border: 0; border-radius: 999px; padding: 0 14px; color: var(--ink); background: rgba(244,223,187,.68); outline: none; font-weight: 800; }
.custom-row button { min-height: 38px; border-radius: 999px; padding: 0 14px; }
@media (max-width: 760px) {
  #recordView .shape-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #recordView .text-tags { gap: 5px; }
  #recordView .text-tag { min-height: 30px; padding: 6px 9px; font-size: 11px; }
  .custom-row input, .custom-row button { height: 34px; min-height: 34px; font-size: 12px; }
}
/* Profile data center inspired by reference */
.profile-title-row { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; margin-bottom: 12px; }
.profile-title-row h2 { text-align: center; font-size: 24px; }
.round-btn { width: 46px; height: 46px; border-radius: 999px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.08); font-size: 26px; font-weight: 900; }
.calendar-grid { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; padding: 46px 8px 12px; background: rgba(255,255,255,.7); border-radius: 24px; }
.calendar-month { position: absolute; top: 12px; left: 0; right: 0; text-align: center; color: #9aa0ab; font-size: 18px; font-weight: 900; }
.calendar-grid b { text-align: center; color: #9aa0ab; font-size: 13px; }
.calendar-grid span { height: 34px; display: grid; place-items: center; border-radius: 999px; font-weight: 900; }
.calendar-grid span.muted { color: #b9b9b9; }
.calendar-grid span.today { background: #b7dadd; color: white; }
.calendar-grid span.marked:not(.today) { box-shadow: inset 0 -4px 0 #e5c056; }
.bar-list { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 56px 1fr 34px; gap: 10px; align-items: center; font-weight: 900; }
.bar-row i { height: 16px; border-radius: 999px; background: #eee4d2; overflow: hidden; }
.bar-row em { display: block; height: 100%; border-radius: inherit; background: #8b6914; }
.settings-list { display: grid; }
.settings-list div { display: flex; justify-content: space-between; gap: 12px; padding: 17px 0; border-bottom: 1px solid rgba(0,0,0,.08); font-weight: 900; }
.settings-list div:last-child { border-bottom: 0; }
.settings-list span { color: #9aa0ab; }
@media (max-width: 760px) { .calendar-grid { gap: 7px; } .calendar-grid span { height: 30px; } .profile-title-row { grid-template-columns: 44px 1fr 44px; } }
/* Stats/Profile split */
.bottom-tabs { grid-template-columns: repeat(5, 1fr); width: min(620px, calc(100% - 24px)); }
.profile-calendar.collapsed .calendar-grid { display: none; }
.profile-calendar.collapsed { padding-bottom: 14px; }
.settings-page .profile-card { padding: 20px; }
.settings-page .primary-btn { margin-top: 14px; min-height: 46px; border-radius: 16px; padding: 0 18px; }
#statsView .profile-grid, #profileView .profile-grid { padding-bottom: 8px; }
@media (max-width: 760px) { .bottom-tabs { width: calc(100% - 14px); gap: 4px; padding: 7px; } .bottom-tabs .tab { min-height: 54px; border-radius: 17px; } .bottom-tabs .tab span { font-size: 17px; } .bottom-tabs .tab b { font-size: 12px; } }
/* Mothership minimal: hide stats, tiny rolling ticker */
#plazaView .plaza-stats { display: none; }
#plazaView .plaza-panel { grid-template-rows: auto 1fr; }
#plazaView .plaza-panel .panel-head { position: absolute; left: 18px; top: 16px; z-index: 4; pointer-events: none; }
#plazaView .plaza-panel .panel-head button { pointer-events: auto; }
#plazaView .plaza-stage { min-height: calc(100vh - 132px); }
#plazaView .feed-panel { margin-top: -54px; }
.ticker-feed { height: 34px; overflow: hidden; width: min(380px, calc(100% - 24px)); margin: 0 auto; border-radius: 999px; background: rgba(47,33,24,.82); box-shadow: 0 12px 30px rgba(48,32,22,.18); }
.ticker-feed .signal-item { width: 100% !important; height: 34px; margin: 0; padding: 0 14px; border-radius: 0; background: transparent !important; box-shadow: none !important; animation: tickerFlip 12s infinite; }
.ticker-feed .signal-item p { height: 34px; display: flex !important; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: #ffe7b5; white-space: nowrap; }
.ticker-feed .signal-item:nth-child(1) { animation-delay: 0s; }
.ticker-feed .signal-item:nth-child(2) { animation-delay: -9.6s; }
.ticker-feed .signal-item:nth-child(3) { animation-delay: -7.2s; }
.ticker-feed .signal-item:nth-child(4) { animation-delay: -4.8s; }
.ticker-feed .signal-item:nth-child(5) { animation-delay: -2.4s; }
@keyframes tickerFlip { 0%, 15% { transform: translateY(0); opacity: 1; } 20%, 100% { transform: translateY(-34px); opacity: 0; } }
@media (max-width: 760px) { #plazaView .plaza-stage { min-height: calc(100vh - 112px); } #plazaView .plaza-panel .panel-head { top: 12px; left: 14px; } }
/* Mothership layout reset */
#plazaView .plaza-panel { min-height: auto; display: block; padding: 16px; }
#plazaView .plaza-panel .panel-head { position: static; pointer-events: auto; margin-bottom: 8px; }
#plazaView .mothership-head .kicker { font-size: 22px; }
#plazaView .feed-panel { margin-top: 0; margin-bottom: 8px; position: static; pointer-events: auto; }
#plazaView .plaza-stage { height: min(68vh, 620px); min-height: 430px; }
.ticker-feed { margin: 0 0 8px; width: 100%; }
@media (max-width: 760px) {
  #plazaView .plaza-panel { padding: 14px; }
  #plazaView .plaza-stage { height: calc(100vh - 210px); min-height: 460px; }
  #plazaView .mothership-head .kicker { font-size: 20px; }
}
/* Final mothership layout override */
#plazaView .plaza-panel { display: flex !important; flex-direction: column !important; min-height: 0 !important; }
#plazaView .plaza-panel .mothership-head { flex: 0 0 auto !important; position: static !important; }
#plazaView .feed-panel { flex: 0 0 auto !important; order: 2; }
#plazaView .plaza-stage { flex: 0 0 auto !important; order: 3; height: min(66vh, 600px) !important; min-height: 420px !important; }
#plazaView .plaza-panel .plaza-stats { display: none !important; }
@media (max-width: 760px) { #plazaView .plaza-stage { height: calc(100vh - 225px) !important; min-height: 420px !important; } }
#plazaView .ticker-feed { position: static !important; flex: 0 0 34px !important; order: 2 !important; margin: 0 0 10px !important; }
#plazaView .plaza-stage { order: 3 !important; }
.range-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; padding: 6px; border-radius: 999px; background: rgba(244,244,244,.9); }
.range-tabs button { min-height: 44px; border-radius: 999px; background: transparent; font-weight: 900; color: #8f96a3; }
.range-tabs button.active { background: white; color: #2f3338; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
/* Mothership notice row */
.mothership-notice-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 10px; padding: 2px 0 8px; }
.demo-badge { padding: 3px 8px; border-radius: 999px; background: rgba(196, 69, 54, .14); color: #9b2c20; font-size: 12px; font-weight: 900; white-space: nowrap; }
.local-badge { padding: 3px 8px; border-radius: 999px; background: rgba(111, 158, 69, .14); color: #497128; font-size: 12px; font-weight: 900; white-space: nowrap; }
.mothership-notice-row .kicker { margin: 0; color: #382719; font-size: 16px; font-weight: 1000; letter-spacing: .02em; white-space: nowrap; }
.mothership-notice-row .ticker-feed { margin: 0 !important; width: 100%; min-width: 0; background: linear-gradient(135deg, #2f2118, #4a3528); border: 1px solid rgba(255,231,181,.22); box-shadow: 0 10px 24px rgba(48,32,22,.16); }
.ticker-feed { position: relative; }
.ticker-feed .signal-item { position: absolute; inset: 0; opacity: 0; transform: translateY(100%); animation: tickerOne 15s infinite; }
.ticker-feed .signal-item:nth-child(1) { animation-delay: 0s; }
.ticker-feed .signal-item:nth-child(2) { animation-delay: 3s; }
.ticker-feed .signal-item:nth-child(3) { animation-delay: 6s; }
.ticker-feed .signal-item:nth-child(4) { animation-delay: 9s; }
.ticker-feed .signal-item:nth-child(5) { animation-delay: 12s; }
.ticker-feed .signal-item p { color: #fff3c8; font-weight: 900; text-shadow: 0 1px 0 rgba(0,0,0,.18); }
.ticker-feed .signal-item b { color: #bfe7e5; }
@keyframes tickerOne { 0% { opacity: 0; transform: translateY(100%); } 5%, 18% { opacity: 1; transform: translateY(0); } 23%, 100% { opacity: 0; transform: translateY(-100%); } }
@media (max-width: 760px) { .mothership-notice-row { gap: 8px; } .mothership-notice-row .kicker { font-size: 16px; } .ticker-feed .signal-item p { font-size: 12px; } }

/* Stable single-line mothership bulletin */
.mothership-notice-row .ticker-feed {
  position: relative !important;
  height: 38px !important;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #291b13 0%, #503323 100%) !important;
  border: 1px solid rgba(255, 236, 186, .38) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 22px rgba(49,33,20,.18) !important;
}
.ticker-feed .signal-item,
.ticker-feed .signal-item.live {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  opacity: 1 !important;
  transform: none !important;
  animation: tickerPulse .28s ease both !important;
  background: transparent !important;
  box-shadow: none !important;
}
.ticker-feed .signal-item p {
  height: 38px !important;
  justify-content: flex-start !important;
  color: #fff6d6 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: .01em;
  text-shadow: 0 1px 0 rgba(0,0,0,.22);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.ticker-feed .signal-item b {
  color: #9ce8df !important;
}
@keyframes tickerPulse {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
  .mothership-notice-row {
    gap: 6px;
  }
  .mothership-notice-row .ticker-feed,
  .ticker-feed .signal-item,
  .ticker-feed .signal-item.live,
  .ticker-feed .signal-item p {
    height: 36px !important;
  }
  .ticker-feed .signal-item {
    padding: 0 10px !important;
  }
  .ticker-feed .signal-item p {
    font-size: 12px !important;
  }
}

/* Unified top bars for sampling, container and mothership */
.sample-top-row,
.mothership-notice-row,
#recordView .panel-head {
  min-height: 44px;
  border-bottom: 1px solid rgba(74, 43, 22, .08);
}
.sample-top-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.sample-top-row .kicker,
.mothership-notice-row .kicker,
#recordView .panel-head .kicker {
  margin: 0;
  color: #355d2a;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
}
.container-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}
.container-progress span {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(244, 223, 187, .72);
  color: #7a6048;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.container-progress b {
  color: #2f2118;
  font-size: 16px;
}
#containerView .game-panel {
  padding-top: 14px;
}
#containerView .stage {
  height: calc(100vh - 250px) !important;
  max-height: 610px;
}
#containerView .compact-controls {
  grid-template-columns: repeat(4, 1fr);
}
#containerView .level-pill,
#containerView .meter-wrap {
  display: none !important;
}
@media (max-width: 760px) {
  .sample-top-row,
  .mothership-notice-row,
  #recordView .panel-head {
    min-height: 40px;
  }
  .sample-top-row {
    gap: 7px;
  }
  .sample-top-row .kicker,
  .mothership-notice-row .kicker,
  #recordView .panel-head .kicker {
    font-size: 16px;
  }
  .container-progress {
    gap: 4px;
  }
  .container-progress span {
    height: 32px;
    padding: 0 6px;
    font-size: 10px;
  }
  .container-progress b {
    font-size: 14px;
  }
  #containerView .stage {
    height: calc(100vh - 190px) !important;
    min-height: 470px !important;
  }
}

/* Profile: one clean settings sheet */
#profileView.active {
  display: block;
}
#profileView .settings-page {
  width: min(640px, 100%);
  margin: 0 auto;
  padding-bottom: 10px;
}
.profile-single {
  padding: 18px;
}
.profile-login-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0 16px;
  border-bottom: 1px solid rgba(74,43,22,.08);
}
.avatar-dot {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dbe9b3, #fff2c8);
  color: #355d2a;
  font-weight: 1000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 10px 24px rgba(77,112,43,.16);
}
.profile-login-row h2 {
  font-size: 22px;
}
.profile-login-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}
.profile-login-row .soft-btn {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 18px;
}
.profile-settings-list {
  margin-top: 4px;
}
.settings-list .settings-toggle,
.profile-settings-list div,
.profile-settings-list .settings-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-weight: 900;
}
.settings-action[aria-disabled="true"],
.profile-login-row .soft-btn[aria-disabled="true"] { opacity: .65; cursor: default; }
.settings-action[aria-disabled="true"]:active,
.profile-login-row .soft-btn[aria-disabled="true"]:active { transform: none; }
.settings-list .settings-toggle {
  margin: 0;
}
.settings-toggle input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
.about-brief {
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(244,223,187,.56), rgba(255,250,240,.78));
}
.profile-single .about-brief + .about-brief {
  margin-top: 10px;
}
.about-brief h2 {
  font-size: 21px;
  margin-bottom: 10px;
}
.about-brief p {
  margin: 10px 0 0;
  color: #604733;
  font-size: 14px;
  line-height: 1.72;
}
.about-brief .aside-note {
  color: #8a6043;
  font-weight: 900;
}
.about-fold {
  margin-top: 0;
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
}
.about-fold summary {
  min-height: 56px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}
.about-fold summary::-webkit-details-marker {
  display: none;
}
.about-fold summary::after {
  content: "›";
  color: #9aa0ab;
  font-size: 20px;
  transition: transform .18s ease;
}
.about-fold[open] summary::after {
  transform: rotate(90deg);
}
.about-fold summary span {
  color: #355d2a;
  font-size: 12px;
  letter-spacing: .12em;
}
.about-fold summary b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.about-copy {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(74,43,22,.08);
}
.about-copy p {
  margin-top: 12px;
}
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
}
.tour-overlay.show {
  display: flex;
}
.tour-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 16, .28);
  backdrop-filter: blur(.8px);
}
.tour-spotlight {
  position: absolute;
  border-radius: 18px;
  border: 2px solid rgba(227, 255, 207, .92);
  box-shadow:
    0 0 0 9999px rgba(10, 14, 16, .22),
    0 0 0 3px rgba(255,255,255,.18),
    0 0 30px rgba(178, 255, 121, .18);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease, left .18s ease, top .18s ease, width .18s ease, height .18s ease;
  pointer-events: none;
}
.tour-bubble {
  position: relative;
  z-index: 1;
  width: min(350px, calc(100% - 24px));
  pointer-events: auto;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,250,240,.98), rgba(244,252,234,.96));
  border: 1px solid rgba(255,255,255,.82);
  box-shadow: 0 24px 72px rgba(30, 42, 35, .28);
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.tour-mascot {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter:
    drop-shadow(0 10px 18px rgba(76,110,38,.16))
    drop-shadow(0 0 10px rgba(255,255,255,.7));
}
.tour-copy {
  min-width: 0;
}
.tour-kicker {
  margin: 0 0 6px;
  color: #4e7040;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}
.tour-bubble h2 {
  margin: 0;
  font-size: 22px;
}
.tour-bubble p {
  margin: 10px 0 0;
  color: #4f5a52;
  line-height: 1.7;
}
.tour-optout {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #4f5a52;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.tour-optout input { width: 18px; height: 18px; accent-color: #6f9e45; }
.tour-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.tour-actions .ghost-btn,
.tour-actions .soft-btn,
.tour-actions .primary-btn {
  min-height: 42px;
  border-radius: 14px;
}
.tour-focus {
  position: relative;
  z-index: 61 !important;
  box-shadow: 0 0 0 3px rgba(184, 255, 136, .36), 0 0 22px rgba(184, 255, 136, .16) !important;
}
@media (max-width: 760px) {
  .profile-single {
    padding: 16px;
  }
  .avatar-dot {
    width: 48px;
    height: 48px;
    border-radius: 18px;
  }
  .profile-login-row h2 {
    font-size: 20px;
  }
  .about-brief {
    padding: 14px;
  }
  .about-fold {
    padding: 0;
  }
  .about-fold summary {
    min-height: 52px;
    padding: 0 14px;
  }
  .about-copy {
    padding: 0 14px 14px;
  }
  .tour-bubble {
    width: min(330px, calc(100% - 18px));
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }
  .tour-mascot {
    width: 58px;
    height: 58px;
  }
}

/* Individual block dragging */
.blocks-layer {
  touch-action: none;
}
.poop-block {
  cursor: grab;
  user-select: none;
}
.poop-block.dragging {
  cursor: grabbing;
  z-index: 8;
  filter: brightness(1.06) saturate(1.04);
  box-shadow: inset -6px -7px 0 rgba(0,0,0,.12), inset 5px 5px 0 rgba(255,255,255,.24), 0 14px 24px rgba(50,24,8,.24);
}
.poop-block.locked:not(.dragging) {
  box-shadow: inset -6px -7px 0 rgba(0,0,0,.14), inset 5px 5px 0 rgba(255,255,255,.2), 0 8px 14px rgba(50,24,8,.16);
}
.block-tip {
  position: absolute;
  z-index: 12;
  width: 112px;
  min-height: 26px;
  padding: 6px 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  background: rgba(47, 33, 24, .9);
  color: #fff2c8;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(48,32,22,.18);
  transition: opacity .12s ease, transform .12s ease;
}
.block-tip.show {
  opacity: 1;
  transform: translateY(0);
}
#plazaBlocksLayer .block-tip {
  width: 120px;
  font-size: 10px;
}

@media (max-width: 420px) {
  #containerView .controls.compact-controls {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px;
  }
  #containerView .controls button {
    font-size: 12px;
    padding: 0 4px;
  }
}

/* ===== UI Refresh v1 (reference-driven) ===== */
:root {
  --ui-bg: #f4f8e9;
  --ui-bg-2: #edf5db;
  --ui-green: #5f8d33;
  --ui-green-deep: #355a1e;
  --ui-card: rgba(255, 255, 255, .74);
  --ui-line: rgba(98, 132, 62, .18);
  --ui-shadow: 0 18px 46px rgba(86, 116, 53, .16);
}
body {
  background:
    radial-gradient(circle at 88% 2%, rgba(182, 220, 122, .22), transparent 30%),
    radial-gradient(circle at 8% 12%, rgba(193, 226, 142, .20), transparent 26%),
    linear-gradient(160deg, var(--ui-bg), var(--ui-bg-2) 52%, #e8f1d4);
}
#app {
  width: min(1240px, calc(100% - 20px));
  padding-top: 16px;
}
.hero {
  padding: 12px 18px;
  margin-bottom: 10px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.46));
  border: 1px solid var(--ui-line);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(10px);
}
.eyebrow, .kicker {
  color: var(--ui-green-deep);
}
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.64));
  border: 1px solid var(--ui-line);
  border-radius: 30px;
  box-shadow: var(--ui-shadow);
}
.primary-btn, .submit-btn {
  background: linear-gradient(160deg, #7eb247, #5d8a31);
  box-shadow: 0 12px 26px rgba(76, 116, 35, .24), inset 0 1px 0 rgba(255,255,255,.34);
}
.soft-btn, .ghost-btn, .danger-btn {
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(98,132,62,.16);
  box-shadow: 0 8px 22px rgba(78,111,43,.08);
}
.bottom-tabs {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.68));
  border: 1px solid var(--ui-line);
  box-shadow: 0 16px 36px rgba(83,112,48,.16);
}
.bottom-tabs .tab.active {
  background: linear-gradient(160deg, #6ea73c, #4e7f2a);
  color: #f4ffd9;
}
#recordView .main-recorder,
#containerView .game-panel,
#plazaView .plaza-panel,
#statsView .profile-card,
#profileView .profile-single {
  position: relative;
  overflow: hidden;
}
#recordView .main-recorder::before,
#containerView .game-panel::before,
#plazaView .plaza-panel::before,
#statsView .profile-card::before,
#profileView .profile-single::before {
  content: "";
  position: absolute;
  inset: -22% auto auto -20%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197,229,150,.3), transparent 68%);
  pointer-events: none;
}
.sample-top-row,
.mothership-notice-row,
#recordView .panel-head {
  border-bottom-color: rgba(98,132,62,.16);
}
.choice,
.amount-choice,
.text-tag,
.icon-tag,
.check-row,
.settings-list div,
.settings-toggle,
.health-card,
.range-tabs,
.archive-item {
  background: rgba(255,255,255,.66) !important;
  border: 1px solid rgba(98,132,62,.14);
  box-shadow: 0 8px 20px rgba(78,111,43,.08);
}
.choice.active,
.amount-choice.active,
.text-tag.active,
.icon-tag.active {
  background: linear-gradient(160deg, #5f8d33, #3f6522) !important;
  color: #f1ffd5 !important;
}
.stage {
  background:
    radial-gradient(circle at 50% 26%, rgba(255,255,255,.34), transparent 48%),
    linear-gradient(160deg, rgba(208,228,170,.82), rgba(168,197,120,.7));
  border: 1px solid rgba(115,150,70,.24);
  box-shadow:
    inset 0 0 0 10px rgba(245,255,230,.22),
    inset 0 -10px 0 rgba(64,95,31,.12),
    0 14px 32px rgba(84,112,48,.22);
}
.rim {
  background: rgba(245,255,230,.56);
}
.container-progress span {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(98,132,62,.15);
}
.ticker-feed {
  border-color: rgba(198,228,149,.46) !important;
}

/* Mascot placement on every page */
.alien-sticker {
  position: absolute;
  z-index: 6;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(76,110,38,.18));
  pointer-events: none;
}
.record-alien { right: 18px; bottom: 14px; }
.container-alien { right: 16px; top: 50px; width: 84px; height: 84px; opacity: .94; }
.plaza-alien { right: 14px; top: 8px; width: 86px; height: 86px; }
.stats-alien { right: 8px; top: 6px; width: 72px; height: 72px; opacity: .86; }
.profile-alien { right: 14px; top: 10px; width: 80px; height: 80px; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes boby {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-4deg); }
}
.floaty { animation: floaty 3.4s ease-in-out infinite; }
.boby { animation: boby 3s ease-in-out infinite; }

@media (max-width: 760px) {
  .alien-sticker { width: 64px; height: 64px; }
  .record-alien { right: 10px; bottom: 8px; }
  .container-alien { right: 8px; top: 56px; }
  .plaza-alien { right: 8px; top: 6px; }
  .profile-alien { right: 8px; top: 8px; }
  .stats-alien { display: none; }
}

/* Sampling page layout pass (match reference closer) */
#recordView .main-recorder {
  padding: 14px;
}
#recordView .panel-head {
  grid-template-columns: 1fr auto;
  margin-bottom: 8px;
}
#recordView .panel-head .kicker {
  font-size: 36px;
  letter-spacing: .01em;
  line-height: 1;
}
#recordView .ghost-btn {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 1000;
}
#recordView .record-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}
#recordView .record-grid > div {
  display: grid;
  gap: 9px;
}
#recordView .field-label {
  display: block;
  margin: 2px 0 0;
  font-size: 22px;
  color: #3d5f24;
}
#recordView .shape-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#recordView .visual-choice.image-only {
  min-height: 160px;
  border-radius: 22px;
  padding: 10px 8px 8px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.62));
}
#recordView .visual-choice.image-only .choice-art {
  height: 88px;
  border-radius: 16px;
}
#recordView .visual-choice.image-only b {
  font-size: 28px;
  color: #4a3b2b;
  font-weight: 1000;
}
#recordView .palette {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}
#recordView .color-dot {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 999px;
}
#recordView .text-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#recordView .text-tag {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
}
#recordView .custom-row {
  grid-template-columns: 1fr auto;
  gap: 8px;
}
#recordView .custom-row input {
  height: 44px;
  border-radius: 999px;
  font-size: 16px;
}
#recordView .custom-row button {
  min-height: 44px;
  border-radius: 999px;
}
#recordView .check-row {
  min-height: 44px;
  margin-top: 2px;
  border-radius: 16px;
  justify-content: center;
  font-size: 16px;
}
#recordView .submit-btn {
  margin-top: 8px;
  min-height: 62px;
  border-radius: 999px;
  font-size: 30px;
  letter-spacing: .02em;
}
#recordView .record-alien {
  width: 100px;
  height: 100px;
  right: 12px;
  bottom: 78px;
}
#recordView .amount-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
#recordView .amount-grid::-webkit-scrollbar {
  display: none;
}
#recordView .amount-choice.image-only {
  flex: 0 0 112px;
  min-width: 112px;
  min-height: 86px;
  border-radius: 16px;
  padding: 8px 6px;
}
#recordView .amount-choice.image-only .amount-art {
  height: 48px;
}
#recordView .amount-choice.image-only b {
  font-size: 16px;
  color: #544332;
}
#recordView .main-recorder::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 66px;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(248,252,233,.92));
}
@media (max-width: 760px) {
  #recordView .panel-head .kicker {
    font-size: 28px;
  }
  #recordView .field-label {
    font-size: 18px;
  }
  #recordView .visual-choice.image-only {
    min-height: 126px;
  }
  #recordView .visual-choice.image-only .choice-art {
    height: 70px;
  }
  #recordView .visual-choice.image-only b {
    font-size: 22px;
  }
  #recordView .text-tag {
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }
  #recordView .submit-btn {
    min-height: 56px;
    font-size: 24px;
  }
  #recordView .record-alien {
    width: 76px;
    height: 76px;
    bottom: 74px;
  }
  #recordView .amount-choice.image-only {
    flex-basis: 92px;
    min-width: 92px;
    min-height: 72px;
  }
  #recordView .amount-choice.image-only .amount-art {
    height: 38px;
  }
  #recordView .amount-choice.image-only b {
    font-size: 13px;
  }
}

/* Sampling page compact refinement */
@media (max-width: 760px) {
  #app {
    padding-top: 8px;
  }
  .hero {
    display: none;
  }
  #recordView.active {
    min-height: calc(100vh - 88px);
  }
  #recordView .main-recorder {
    max-height: calc(100vh - 104px);
    padding: 14px;
    border-radius: 28px;
  }
  #recordView .panel-head {
    padding-bottom: 10px;
    margin-bottom: 8px;
  }
  #recordView .panel-head .kicker {
    font-size: 24px;
  }
  #recordView .ghost-btn {
    min-height: 38px;
    padding: 0 16px;
  }
  #recordView .record-grid,
  #recordView .record-grid > div {
    gap: 7px;
  }
  #recordView .field-label {
    font-size: 15px;
    margin-top: 0;
  }
  #recordView .visual-choice.image-only {
    min-height: 98px;
    border-radius: 18px;
    gap: 4px;
    padding: 7px;
  }
  #recordView .visual-choice.image-only .choice-art {
    height: 56px;
  }
  #recordView .visual-choice.image-only b {
    font-size: 16px;
  }
  #recordView .amount-choice.image-only {
    flex-basis: 82px;
    min-width: 82px;
    min-height: 58px;
    padding: 5px;
  }
  #recordView .amount-choice.image-only .amount-art {
    height: 28px;
  }
  #recordView .amount-choice.image-only b {
    font-size: 11px;
  }
  #recordView .palette {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
  }
  #recordView .text-tags {
    gap: 6px;
  }
  #recordView .text-tag {
    min-height: 31px;
    padding: 0 10px;
    font-size: 12px;
  }
  #recordView .custom-row input,
  #recordView .custom-row button {
    height: 36px;
    min-height: 36px;
    font-size: 12px;
  }
  #recordView .check-row {
    min-height: 38px;
    font-size: 13px;
  }
  #recordView .submit-btn {
    min-height: 52px;
    font-size: 20px;
    margin-top: 6px;
  }
  #recordView .record-alien {
    left: 8px;
    right: auto;
    bottom: 70px;
    width: 72px;
    height: 72px;
  }
  #recordView .submit-btn {
    padding-left: 74px;
  }
  .bottom-tabs {
    bottom: max(8px, env(safe-area-inset-bottom));
    border-radius: 24px;
  }
}

/* Sampling page second compression */
@media (max-width: 760px) {
  #recordView .main-recorder {
    max-height: calc(100vh - 118px);
    padding: 12px;
  }
  #recordView .panel-head {
    padding-bottom: 7px;
    margin-bottom: 5px;
  }
  #recordView .panel-head .kicker {
    font-size: 22px;
  }
  #recordView .ghost-btn {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }
  #recordView .record-grid,
  #recordView .record-grid > div {
    gap: 5px;
  }
  #recordView .field-label {
    font-size: 13px;
    line-height: 1.1;
  }
  #recordView .visual-choice.image-only {
    min-height: 82px;
    border-radius: 16px;
    padding: 5px;
    gap: 2px;
  }
  #recordView .visual-choice.image-only .choice-art {
    height: 43px;
  }
  #recordView .visual-choice.image-only b {
    font-size: 14px;
  }
  #recordView .amount-choice.image-only {
    flex-basis: 74px;
    min-width: 74px;
    min-height: 48px;
    border-radius: 14px;
    padding: 4px;
  }
  #recordView .amount-choice.image-only .amount-art {
    height: 21px;
  }
  #recordView .amount-choice.image-only b {
    font-size: 10px;
  }
  #recordView .palette {
    gap: 5px;
  }
  #recordView .text-tags {
    gap: 5px;
  }
  #recordView .text-tag {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }
  #recordView #feelingTags {
    max-height: 61px;
    overflow: hidden;
  }
  #recordView .custom-row input,
  #recordView .custom-row button {
    height: 32px;
    min-height: 32px;
    font-size: 11px;
  }
  #recordView .check-row {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }
  #recordView .submit-btn {
    min-height: 48px;
    font-size: 18px;
    margin-top: 4px;
    padding-left: 66px;
  }
  #recordView .record-alien {
    width: 62px;
    height: 62px;
    bottom: 66px;
  }
  .bottom-tabs {
    min-height: 68px;
  }
}

/* Real sample images + dynamic amount slider */
#recordView .visual-choice.image-only img {
  width: 100%;
  height: 86px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 16px rgba(90,72,38,.18));
}
#recordView .visual-choice.image-only .choice-art,
#recordView .amount-choice.image-only {
  display: none;
}
#recordView .amount-grid {
  display: block;
  overflow: visible;
}
.amount-slider-card {
  padding: 12px 14px 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.62));
  border: 1px solid rgba(98,132,62,.16);
  box-shadow: 0 10px 22px rgba(78,111,43,.09);
}
.amount-slider-value {
  width: fit-content;
  min-width: 92px;
  margin: 0 auto 8px;
  padding: 6px 14px;
  border-radius: 999px;
  text-align: center;
  color: #f5ffe0;
  background: linear-gradient(160deg, #6fa43c, #416b22);
  font-weight: 1000;
  box-shadow: 0 8px 16px rgba(71,104,33,.2);
}
.amount-slider-card input[type="range"] {
  width: 100%;
  height: 22px;
  accent-color: #629738;
}
.amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dfeac5, #8ebc55);
  box-shadow: inset 0 1px 3px rgba(68,94,33,.18);
}
.amount-slider-card input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 18%, #8fbd4f 19% 100%);
  border: 3px solid #fff;
  box-shadow: 0 8px 16px rgba(67,101,28,.24);
}
.amount-slider-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  color: #7d6a50;
  font-size: 12px;
  font-weight: 900;
}
@media (max-width: 760px) {
  #recordView .visual-choice.image-only img {
    height: 52px;
  }
  .amount-slider-card {
    padding: 8px 10px 7px;
    border-radius: 16px;
  }
  .amount-slider-value {
    min-width: 78px;
    margin-bottom: 4px;
    padding: 4px 10px;
    font-size: 12px;
  }
  .amount-slider-card input[type="range"] {
    height: 18px;
  }
  .amount-slider-scale {
    font-size: 10px;
  }
}

/* Reference correction: liquid glass home */
body {
  color: #35512d;
  background:
    radial-gradient(circle at 18% 4%, rgba(255,255,255,.96) 0 10%, transparent 28%),
    radial-gradient(circle at 78% 12%, rgba(224,240,176,.72), transparent 34%),
    radial-gradient(circle at 12% 84%, rgba(197,224,151,.62), transparent 36%),
    linear-gradient(155deg, #f9f5dc 0%, #eef5d4 48%, #dfeec5 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 18%, rgba(255,255,255,.7) 0 1px, transparent 2px),
    radial-gradient(circle at 20% 70%, rgba(255,255,255,.8) 0 1px, transparent 2px),
    linear-gradient(120deg, transparent 0 40%, rgba(255,255,255,.28) 45%, transparent 52%);
  opacity: .75;
}
#recordView .main-recorder {
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.34)),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.72), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(179,214,117,.28), transparent 42%);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow:
    0 22px 58px rgba(93,119,55,.18),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -22px 48px rgba(154,190,91,.08);
  backdrop-filter: blur(22px) saturate(1.35);
}
#recordView .main-recorder::before {
  inset: 10px;
  width: auto;
  aspect-ratio: auto;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.55), transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(255,255,255,.34), transparent 18%);
  border: 1px solid rgba(255,255,255,.42);
  opacity: .8;
}
#recordView .panel-head {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(101,123,59,.13);
}
#recordView .panel-head .kicker {
  color: #315321;
  text-shadow: 0 2px 8px rgba(255,255,255,.8);
}
#recordView .record-grid,
#recordView .submit-btn,
#recordView .record-alien {
  position: relative;
  z-index: 2;
}
#recordView .field-label {
  color: #41632c;
  font-weight: 1000;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
#recordView .visual-choice.image-only,
.amount-slider-card,
#recordView .text-tag,
#recordView .custom-row input,
#recordView .custom-row button,
#recordView .check-row {
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.42)) !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  box-shadow:
    0 12px 28px rgba(94,120,55,.12),
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 -10px 22px rgba(169,198,106,.08) !important;
  backdrop-filter: blur(16px) saturate(1.45);
}
#recordView .visual-choice.image-only.active,
#recordView .text-tag.active {
  background:
    linear-gradient(180deg, rgba(128,176,74,.94), rgba(72,121,39,.94)) !important;
  color: #f7ffe6 !important;
  border-color: rgba(255,255,255,.72) !important;
  box-shadow:
    0 12px 28px rgba(79,126,35,.28),
    0 0 0 4px rgba(255,255,255,.34),
    inset 0 1px 0 rgba(255,255,255,.46),
    inset 0 -14px 24px rgba(38,79,16,.18) !important;
}
#recordView .visual-choice.image-only.active b,
#recordView .text-tag.active {
  color: #f7ffe6 !important;
}
#recordView .visual-choice.image-only b {
  color: #5a4a35;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
}
#recordView .palette {
  padding: 6px 0;
}
#recordView .color-dot {
  border: 3px solid rgba(255,255,255,.72);
  box-shadow:
    0 6px 14px rgba(80,62,35,.14),
    inset 0 2px 5px rgba(255,255,255,.38),
    inset 0 -5px 8px rgba(0,0,0,.12) !important;
}
#recordView .color-dot.active {
  outline: 3px solid rgba(91,134,45,.95);
  outline-offset: 2px;
  box-shadow:
    0 0 0 6px rgba(255,255,255,.55),
    0 10px 22px rgba(82,119,39,.18),
    inset 0 2px 5px rgba(255,255,255,.38) !important;
}
.amount-slider-card {
  position: relative;
  overflow: hidden;
}
.amount-slider-card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.34);
  pointer-events: none;
}
.amount-slider-value {
  background: linear-gradient(180deg, #82b946, #4f8726);
  box-shadow:
    0 8px 18px rgba(75,122,34,.22),
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -10px 18px rgba(45,89,18,.18);
}
#recordView .submit-btn {
  background:
    radial-gradient(circle at 88% 50%, rgba(255,255,255,.32), transparent 18%),
    linear-gradient(180deg, #81b842, #4f8425);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow:
    0 16px 30px rgba(78,128,35,.28),
    inset 0 2px 0 rgba(255,255,255,.46),
    inset 0 -16px 24px rgba(33,84,10,.22);
}
#recordView .submit-btn::after {
  content: "→";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.36);
}
#recordView .record-alien {
  filter: drop-shadow(0 10px 16px rgba(79,120,42,.18)) drop-shadow(0 0 14px rgba(255,255,255,.9));
}
.bottom-tabs {
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.58));
  border: 1px solid rgba(255,255,255,.82);
  box-shadow:
    0 18px 42px rgba(85,113,53,.2),
    inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter: blur(24px) saturate(1.45);
}
.bottom-tabs .tab.active {
  background: linear-gradient(180deg, #77ad3e, #4d8429);
  color: #f7ffe6;
  box-shadow:
    0 10px 18px rgba(72,116,36,.24),
    inset 0 1px 0 rgba(255,255,255,.38);
}
@media (max-width: 760px) {
  #recordView .field-label:is(:first-of-type),
  #recordView .amount-label {
    display: none;
  }
  #recordView .main-recorder {
    max-height: calc(100vh - 116px);
  }
}

/* Home structure: glass sections instead of flat form */
#recordView .record-section {
  position: relative;
  padding: 10px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.16));
  border: 1px solid rgba(255,255,255,.48);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.58),
    inset 0 -18px 26px rgba(168,196,105,.05);
}
#recordView .record-section + .record-section {
  margin-top: 2px;
}
#recordView .shape-section {
  padding-bottom: 11px;
}
#recordView .detail-section {
  padding-top: 9px;
}
#recordView .shape-grid {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(112,133,74,.12);
}
#recordView .visual-choice.image-only {
  box-shadow:
    0 10px 24px rgba(88,109,57,.13),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -16px 24px rgba(190,204,143,.1) !important;
}
#recordView .visual-choice.image-only img {
  transform: translateY(2px);
}
#recordView .visual-choice.image-only.active img {
  filter: drop-shadow(0 12px 18px rgba(38,70,21,.26)) saturate(1.04);
}
#recordView .field-label:not(.amount-label) {
  padding-left: 2px;
}
#recordView .detail-section .field-label {
  margin-top: 7px;
}
#recordView .detail-section .field-label:first-child {
  margin-top: 0;
}
#recordView .palette {
  padding: 8px 4px 11px;
  border-bottom: 1px solid rgba(112,133,74,.12);
}
#recordView .color-dot {
  background-clip: padding-box;
}
#recordView .text-tags {
  padding: 2px 0 1px;
}
#recordView .custom-row input {
  background: linear-gradient(90deg, rgba(246,225,185,.62), rgba(255,255,255,.34)) !important;
}
#recordView .check-row {
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(238,247,216,.5)) !important;
}
@media (max-width: 760px) {
  #recordView .record-section {
    padding: 8px;
    border-radius: 20px;
  }
  #recordView .shape-grid {
    padding-bottom: 7px;
  }
  #recordView .palette {
    padding: 5px 2px 7px;
  }
  #recordView .detail-section .field-label {
    margin-top: 5px;
  }
  #recordView .visual-choice.image-only {
    min-height: 78px;
  }
  #recordView .visual-choice.image-only img {
    height: 47px;
  }
}

/* Keep submit clear from bottom navigation after glass sections */
@media (max-width: 760px) {
  #recordView .main-recorder {
    max-height: calc(100vh - 146px);
    padding-bottom: 74px;
  }
  #recordView .record-grid {
    max-height: calc(100vh - 270px);
    overflow: hidden;
  }
  #recordView .detail-section {
    padding-bottom: 6px;
  }
  #recordView .submit-btn {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    z-index: 8;
  }
  #recordView .record-alien {
    bottom: 18px;
    z-index: 9;
  }
}

/* Design token system: elevation + soft material */
:root {
  --tone-cream-0: #fffdf1;
  --tone-cream-1: #f7f1d7;
  --tone-cream-2: #ece8c9;
  --tone-green-1: #d9edac;
  --tone-green-2: #86b94a;
  --tone-green-3: #4d7c28;
  --tone-brown: #6e563a;
  --radius-chip: 999px;
  --radius-card: 22px;
  --radius-shell: 32px;
  --elev-surface: inset 1px 1px 0 rgba(255,255,255,.72), inset -10px -14px 26px rgba(133,161,88,.06);
  --elev-card: 10px 14px 30px rgba(88,104,55,.12), -5px -6px 18px rgba(255,255,255,.56), inset 1px 1px 0 rgba(255,255,255,.88), inset -12px -16px 24px rgba(130,160,80,.08);
  --elev-float: 14px 20px 42px rgba(82,102,48,.18), -8px -8px 22px rgba(255,255,255,.62), inset 1px 1px 0 rgba(255,255,255,.9), inset -14px -18px 30px rgba(112,145,72,.1);
  --elev-cta: 0 14px 28px rgba(79,125,36,.32), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -18px 28px rgba(34,80,14,.28), 0 0 22px rgba(144,193,78,.28);
}
body {
  background:
    radial-gradient(circle at 12% 6%, rgba(255,255,255,.92), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(234,241,193,.78), transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(197,224,148,.54), transparent 38%),
    linear-gradient(145deg, var(--tone-cream-0), var(--tone-cream-1) 46%, #e6efd0 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image:
    radial-gradient(circle at 16% 72%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 22%, rgba(255,255,255,.75) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 63%, rgba(255,255,255,.72) 0 1px, transparent 2px);
  background-size: 240px 240px, 180px 180px, 260px 260px;
}
#recordView .main-recorder {
  border-radius: var(--radius-shell);
  background:
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.34)),
    radial-gradient(circle at 22% 10%, rgba(255,255,255,.72), transparent 28%),
    radial-gradient(circle at 80% 90%, rgba(211,232,166,.42), transparent 42%),
    rgba(248, 246, 226, .72);
  box-shadow: var(--elev-float);
  border: 1px solid rgba(255,255,255,.82);
}
#recordView .main-recorder::before {
  box-shadow: var(--elev-surface);
}
#recordView .record-section {
  background:
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(255,255,255,.22)),
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.55), transparent 36%);
  box-shadow: var(--elev-surface);
  border-color: rgba(255,255,255,.62);
}
#recordView .visual-choice.image-only,
.amount-slider-card {
  border-radius: var(--radius-card);
  background:
    linear-gradient(145deg, rgba(255,255,255,.74), rgba(255,255,255,.38)),
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.72), transparent 34%) !important;
  box-shadow: var(--elev-card) !important;
  border: 1px solid rgba(255,255,255,.82) !important;
}
#recordView .visual-choice.image-only.active {
  background:
    linear-gradient(145deg, rgba(137,184,82,.98), rgba(73,122,38,.96)),
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.32), transparent 34%) !important;
  box-shadow:
    var(--elev-card),
    0 0 0 5px rgba(255,255,255,.46),
    0 0 24px rgba(127,177,70,.36) !important;
}
#recordView .text-tag,
#recordView .custom-row input,
#recordView .custom-row button,
#recordView .check-row {
  border-radius: var(--radius-chip);
  background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(248,240,215,.38)) !important;
  box-shadow: 5px 7px 16px rgba(94,108,60,.08), -3px -4px 10px rgba(255,255,255,.55), inset 1px 1px 0 rgba(255,255,255,.86) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  color: var(--tone-brown);
}
#recordView .text-tag.active {
  background: linear-gradient(145deg, #88b953, #4e7e2a) !important;
  box-shadow: 0 8px 18px rgba(76,119,35,.22), inset 1px 1px 0 rgba(255,255,255,.4), inset -8px -10px 18px rgba(42,85,18,.18), 0 0 16px rgba(132,184,74,.28) !important;
}
#recordView .color-dot {
  box-shadow: 6px 8px 16px rgba(83,75,49,.12), -3px -4px 10px rgba(255,255,255,.7), inset 1px 2px 4px rgba(255,255,255,.5), inset -3px -5px 8px rgba(0,0,0,.16) !important;
}
#recordView .color-dot.active {
  outline-color: #78a93f;
  box-shadow: 0 0 0 6px rgba(255,255,255,.68), 0 0 22px rgba(126,174,70,.28), inset 1px 2px 4px rgba(255,255,255,.48), inset -3px -5px 8px rgba(0,0,0,.16) !important;
}
.amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #f3ead0, #cfe4a4 55%, #82b84c);
  box-shadow: inset 2px 2px 5px rgba(95,105,59,.14), inset -1px -1px 2px rgba(255,255,255,.7);
}
.amount-slider-card input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 9px 18px rgba(70,103,34,.28), -2px -2px 8px rgba(255,255,255,.8), inset 1px 1px 0 rgba(255,255,255,.9);
}
#recordView .submit-btn {
  box-shadow: var(--elev-cta);
}
.bottom-tabs {
  border-radius: 28px;
  box-shadow: var(--elev-float);
}
.bottom-tabs .tab:not(.active) {
  color: #806a4e;
}
@media (max-width: 760px) {
  #recordView .record-grid {
    gap: 7px;
  }
}

/* Soft glass UI system v2: rebuild sampling page around elevation, not flat blocks */
:root {
  --ui-bg-0: #fffbea;
  --ui-bg-1: #f4efd2;
  --ui-bg-2: #e7efc9;
  --ui-cream: rgba(255, 250, 231, .72);
  --ui-cream-solid: #fff8df;
  --ui-line: rgba(255,255,255,.72);
  --ui-line-soft: rgba(103, 126, 69, .12);
  --ui-ink: #3f3323;
  --ui-muted: #917d5e;
  --ui-green: #7fb33f;
  --ui-green-deep: #4d8126;
  --ui-green-soft: #dbeab3;
  --ui-brown: #6d5439;
  --r-sm: 12px;
  --r-chip: 999px;
  --r-card: 22px;
  --r-panel: 30px;
  --light-edge: inset 1px 1px 0 rgba(255,255,255,.9);
  --inner-glow: inset -14px -18px 30px rgba(126, 158, 75, .08);
  --shadow-1: 7px 9px 18px rgba(91, 105, 58, .08), -5px -6px 16px rgba(255,255,255,.72);
  --shadow-2: 14px 18px 42px rgba(83, 104, 53, .16), -8px -10px 24px rgba(255,255,255,.68);
  --shadow-3: 22px 28px 68px rgba(78, 101, 51, .22), -10px -12px 28px rgba(255,255,255,.72);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  color: var(--ui-ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,.98) 0 7%, transparent 28%),
    radial-gradient(circle at 76% 6%, rgba(229,239,181,.76) 0 14%, transparent 36%),
    radial-gradient(circle at 18% 92%, rgba(178,214,139,.56) 0 12%, transparent 38%),
    linear-gradient(145deg, var(--ui-bg-0) 0%, var(--ui-bg-1) 48%, var(--ui-bg-2) 100%);
}
body::before {
  background:
    linear-gradient(118deg, transparent 0 32%, rgba(255,255,255,.34) 42%, transparent 54%),
    radial-gradient(circle at 18% 72%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 16%, rgba(255,255,255,.82) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 58%, rgba(255,255,255,.72) 0 1px, transparent 2px);
  background-size: auto, 160px 160px, 220px 220px, 260px 260px;
  opacity: .9;
}
body::after {
  opacity: .62;
  background:
    radial-gradient(ellipse at 55% 32%, rgba(255,255,255,.54), transparent 34%),
    radial-gradient(ellipse at 50% 104%, rgba(126,176,72,.26), transparent 42%);
}

#app {
  width: min(100% - 18px, 430px);
  padding-top: 10px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
.hero {
  display: none;
}
#recordView.active {
  min-height: calc(100svh - 112px);
  display: grid;
  align-items: start;
  justify-items: center;
}
#recordView .main-recorder {
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow: visible;
  isolation: isolate;
  padding: 18px 16px 16px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.86);
  background:
    radial-gradient(circle at 18% 3%, rgba(255,255,255,.86), transparent 26%),
    radial-gradient(circle at 92% 96%, rgba(197,224,143,.34), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.24)),
    rgba(250, 246, 222, .64);
  box-shadow:
    var(--shadow-3),
    inset 1px 1px 0 rgba(255,255,255,.96),
    inset -18px -24px 42px rgba(116, 151, 78, .08);
  backdrop-filter: blur(26px) saturate(1.35);
}
#recordView .main-recorder::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  width: auto;
  aspect-ratio: auto;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.42);
  background:
    linear-gradient(145deg, rgba(255,255,255,.48), transparent 34%),
    radial-gradient(circle at 76% 8%, rgba(255,255,255,.46), transparent 18%);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.7);
  opacity: .9;
  pointer-events: none;
}
#recordView .main-recorder::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 56px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(109,130,76,.16), transparent);
  pointer-events: none;
}

#recordView .panel-head {
  min-height: 64px;
  padding: 10px 12px 13px 74px;
  margin: 0 0 9px;
  border-bottom: 0;
  display: flex;
  align-items: end;
  position: relative;
  z-index: 2;
}
#recordView .panel-head .kicker {
  margin: 0;
  color: #335b22;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.02em;
  font-weight: 1000;
  text-shadow: 0 2px 8px rgba(255,255,255,.9);
}
#recordView .panel-head h2,
#recordView .mascot-card {
  display: none;
}
#recordView .record-alien {
  width: 58px;
  height: 58px;
  left: 16px;
  right: auto;
  top: 12px;
  bottom: auto;
  z-index: 6;
  padding: 4px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(238,247,211,.44));
  box-shadow:
    8px 10px 20px rgba(96,117,64,.1),
    -4px -5px 12px rgba(255,255,255,.72),
    inset 1px 1px 0 rgba(255,255,255,.9);
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(73,111,45,.2));
}

#recordView .record-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: none;
  overflow: visible;
}
#recordView .record-section {
  padding: 10px;
  border-radius: var(--r-panel);
  border: 1px solid rgba(255,255,255,.68);
  background:
    linear-gradient(145deg, rgba(255,255,255,.38), rgba(255,255,255,.14)),
    rgba(255, 250, 230, .24);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.66),
    inset -12px -16px 26px rgba(143, 173, 91, .05);
  backdrop-filter: blur(18px) saturate(1.2);
}
#recordView .shape-section {
  padding-bottom: 10px;
}
#recordView .detail-section {
  padding-top: 10px;
}
#recordView .field-label,
#recordView .field-label:is(:first-of-type),
#recordView .amount-label {
  display: flex;
  margin: 8px 0 7px;
  padding-left: 2px;
  color: #41602b;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .08em;
  font-weight: 1000;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
}
#recordView .shape-section .field-label:first-child {
  margin-top: 0;
}
#recordView .amount-label {
  margin-top: 10px;
}

#recordView .shape-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 0 0 9px;
  border-bottom: 1px solid rgba(103,126,69,.1);
}
#recordView .visual-choice.image-only {
  min-height: 94px;
  padding: 9px 7px 7px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.82), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.64), rgba(249,239,210,.38)) !important;
  border: 1px solid rgba(255,255,255,.84) !important;
  box-shadow:
    var(--shadow-1),
    inset 1px 1px 0 rgba(255,255,255,.92),
    inset -10px -12px 20px rgba(128,158,84,.06) !important;
  backdrop-filter: blur(18px) saturate(1.3);
}
#recordView .visual-choice.image-only::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.38);
  pointer-events: none;
}
#recordView .visual-choice.image-only img {
  height: 58px;
  width: 100%;
  object-fit: contain;
  transform: translateY(0);
  filter:
    drop-shadow(0 11px 13px rgba(86,71,43,.18))
    drop-shadow(-4px -4px 8px rgba(255,255,255,.55));
}
#recordView .visual-choice.image-only b {
  margin-top: 1px;
  color: var(--ui-brown);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .01em;
}
#recordView .visual-choice.image-only.active {
  transform: translateY(-1px);
  background:
    radial-gradient(circle at 22% 10%, rgba(255,255,255,.44), transparent 30%),
    linear-gradient(155deg, #9ac35b, #5c932d 64%, #4d8126) !important;
  border-color: rgba(255,255,255,.78) !important;
  box-shadow:
    10px 14px 28px rgba(74,112,35,.26),
    -5px -6px 16px rgba(255,255,255,.62),
    0 0 0 4px rgba(255,255,255,.38),
    0 0 26px rgba(134,187,78,.36),
    inset 1px 1px 0 rgba(255,255,255,.48),
    inset -14px -18px 28px rgba(42,84,16,.18) !important;
}
#recordView .visual-choice.image-only.active b {
  color: #f8ffe7 !important;
  text-shadow: 0 1px 4px rgba(39,75,16,.24);
}
#recordView .visual-choice.image-only.active img {
  filter: drop-shadow(0 13px 18px rgba(37,70,18,.3)) saturate(1.06) brightness(1.04);
}

#recordView .amount-grid {
  display: block;
  padding: 0;
}
.amount-slider-card {
  padding: 10px 13px 9px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 0%, rgba(255,255,255,.78), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(247,238,205,.36)) !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  box-shadow:
    var(--shadow-1),
    inset 1px 1px 0 rgba(255,255,255,.92),
    inset -12px -14px 22px rgba(135,164,83,.08) !important;
}
.amount-slider-value {
  min-width: 84px;
  margin: 0 auto 8px;
  padding: 5px 14px;
  color: #f8ffe9;
  background:
    radial-gradient(circle at 22% 14%, rgba(255,255,255,.42), transparent 28%),
    linear-gradient(180deg, #8aba47, #4f8527);
  box-shadow:
    0 9px 18px rgba(73,117,35,.24),
    0 0 18px rgba(140,190,78,.28),
    inset 1px 1px 0 rgba(255,255,255,.48),
    inset -8px -10px 18px rgba(38,80,16,.2);
  font-size: 12px;
}
.amount-slider-card input[type="range"] {
  height: 24px;
}
.amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  height: 11px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.68), rgba(220,233,184,.92) 45%, #8dbd4e);
  box-shadow:
    inset 2px 2px 5px rgba(87,101,55,.16),
    inset -1px -1px 2px rgba(255,255,255,.86),
    0 1px 0 rgba(255,255,255,.76);
}
.amount-slider-card input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 27px;
  height: 27px;
  margin-top: -8px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.88);
  background:
    radial-gradient(circle at 32% 25%, #fff 0 18%, #a8ce66 20% 56%, #5f9230 57% 100%);
  box-shadow:
    0 10px 18px rgba(68,104,34,.28),
    -3px -3px 8px rgba(255,255,255,.86),
    inset 1px 1px 0 rgba(255,255,255,.9);
}
.amount-slider-scale {
  margin-top: 0;
  color: #8b7658;
  font-size: 10px;
  font-weight: 900;
}

#recordView .palette {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 7px;
  padding: 3px 1px 8px;
  border-bottom: 1px solid rgba(103,126,69,.1);
}
#recordView .color-dot {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.72);
  box-shadow:
    5px 7px 13px rgba(79,65,42,.14),
    -3px -4px 9px rgba(255,255,255,.72),
    inset 2px 2px 5px rgba(255,255,255,.42),
    inset -4px -5px 8px rgba(0,0,0,.14) !important;
}
#recordView .color-dot.active {
  outline: 0;
  transform: translateY(-1px) scale(1.08);
  box-shadow:
    0 0 0 4px rgba(255,255,255,.72),
    0 0 0 6px rgba(121,169,64,.78),
    0 8px 18px rgba(83,119,42,.2),
    inset 2px 2px 5px rgba(255,255,255,.4),
    inset -4px -5px 8px rgba(0,0,0,.14) !important;
}

#recordView .text-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 2px;
}
#recordView .text-tag,
#recordView .custom-row input,
#recordView .custom-row button,
#recordView .check-row {
  min-height: 31px;
  border-radius: var(--r-chip);
  color: var(--ui-brown);
  background:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,.78), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.58), rgba(247,237,208,.36)) !important;
  border: 1px solid rgba(255,255,255,.78) !important;
  box-shadow:
    5px 7px 14px rgba(91,105,58,.08),
    -3px -4px 10px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.9),
    inset -8px -10px 16px rgba(126,158,75,.05) !important;
  backdrop-filter: blur(14px) saturate(1.25);
}
#recordView .text-tag {
  padding: 7px 11px;
  font-size: 11px;
  line-height: 1;
}
#recordView .text-tag.active {
  color: #f7ffe8 !important;
  background:
    radial-gradient(circle at 22% 10%, rgba(255,255,255,.34), transparent 28%),
    linear-gradient(155deg, #93bf50, #5b8d2d) !important;
  box-shadow:
    0 8px 16px rgba(74,112,35,.22),
    0 0 16px rgba(139,189,78,.26),
    inset 1px 1px 0 rgba(255,255,255,.44),
    inset -9px -12px 18px rgba(43,84,17,.16) !important;
}
#recordView .custom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-bottom: 4px;
}
#recordView .custom-row input,
#recordView .custom-row button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}
#recordView .check-row {
  width: fit-content;
  min-height: 32px;
  margin-top: 7px;
  padding: 7px 12px;
  gap: 7px;
  font-size: 11px;
  font-weight: 1000;
}
#recordView .check-row input {
  width: 15px;
  height: 15px;
}

#recordView .submit-btn {
  position: relative;
  z-index: 4;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.78);
  color: #f8ffe9;
  background:
    radial-gradient(circle at 90% 46%, rgba(255,255,255,.42), transparent 17%),
    linear-gradient(180deg, #8dbc45, #558b28 64%, #477b21);
  box-shadow:
    0 15px 26px rgba(72,116,35,.3),
    0 0 28px rgba(139,188,78,.3),
    inset 1px 2px 0 rgba(255,255,255,.48),
    inset -13px -18px 28px rgba(32,77,10,.22);
  font-size: 16px;
  letter-spacing: .02em;
}
#recordView .submit-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.26);
  pointer-events: none;
}
#recordView .submit-btn::after {
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.24);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.38),
    0 5px 12px rgba(47,84,21,.18);
}

.bottom-tabs {
  width: min(414px, calc(100% - 14px));
  min-height: 66px;
  padding: 7px;
  border-radius: 27px;
  border: 1px solid rgba(255,255,255,.86);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.9), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,247,222,.46));
  box-shadow:
    16px 20px 44px rgba(76,96,52,.18),
    -6px -8px 22px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.94),
    inset -12px -14px 24px rgba(126,158,75,.06);
  backdrop-filter: blur(26px) saturate(1.35);
}
.bottom-tabs .tab {
  min-height: 52px;
  border-radius: 19px;
  color: #7c674b;
  background: transparent;
}
.bottom-tabs .tab span {
  font-size: 17px;
  opacity: .86;
}
.bottom-tabs .tab b {
  font-size: 12px;
  letter-spacing: .01em;
}
.bottom-tabs .tab.active {
  color: #f8ffe8;
  background:
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.36), transparent 28%),
    linear-gradient(155deg, #8cbb45, #4f8626) !important;
  box-shadow:
    0 10px 18px rgba(70,109,34,.26),
    0 0 18px rgba(138,188,76,.3),
    inset 1px 1px 0 rgba(255,255,255,.42),
    inset -9px -12px 18px rgba(42,83,17,.16) !important;
}

@media (max-width: 430px) {
  #app {
    width: calc(100% - 14px);
    padding-top: 8px;
  }
  #recordView .main-recorder {
    padding: 16px 13px 14px;
    border-radius: 32px;
  }
  #recordView .panel-head {
    min-height: 60px;
    padding-left: 68px;
    padding-bottom: 11px;
  }
  #recordView .panel-head .kicker {
    font-size: 21px;
  }
  #recordView .record-alien {
    width: 54px;
    height: 54px;
    left: 14px;
  }
  #recordView .record-section {
    padding: 9px;
    border-radius: 26px;
  }
  #recordView .visual-choice.image-only {
    min-height: 86px;
  }
  #recordView .visual-choice.image-only img {
    height: 51px;
  }
  #recordView .palette {
    gap: 6px;
  }
  #recordView .text-tag {
    padding: 7px 10px;
    font-size: 10.5px;
  }
}

@media (max-height: 780px) and (max-width: 430px) {
  #recordView .main-recorder {
    padding-top: 12px;
  }
  #recordView .panel-head {
    min-height: 52px;
    margin-bottom: 6px;
    padding-bottom: 8px;
  }
  #recordView .record-alien {
    width: 48px;
    height: 48px;
  }
  #recordView .record-section {
    padding: 8px;
  }
  #recordView .field-label,
  #recordView .field-label:is(:first-of-type),
  #recordView .amount-label {
    margin: 6px 0 5px;
  }
  #recordView .visual-choice.image-only {
    min-height: 78px;
    padding: 7px 6px 6px;
  }
  #recordView .visual-choice.image-only img {
    height: 46px;
  }
  .amount-slider-card {
    padding: 8px 11px 7px;
  }
  #recordView .palette {
    padding-bottom: 6px;
  }
  #recordView .text-tags {
    gap: 5px;
  }
  #recordView .text-tag {
    min-height: 28px;
    padding: 6px 9px;
  }
  #recordView .custom-row input,
  #recordView .custom-row button {
    min-height: 31px;
  }
  #recordView .submit-btn {
    min-height: 49px;
    margin-top: 8px;
  }
  .bottom-tabs {
    min-height: 62px;
  }
  .bottom-tabs .tab {
    min-height: 48px;
  }
}

/* One-screen sampling pass: reduce form stacking while keeping soft material */
#recordView .main-recorder {
  height: min(calc(100svh - 94px), 760px);
  overflow: hidden;
}
#recordView .record-grid {
  gap: 8px;
}
#recordView .panel-head {
  min-height: 52px;
  margin-bottom: 6px;
  padding-top: 7px;
  padding-bottom: 8px;
}
#recordView .panel-head .kicker {
  font-size: 20px;
}
#recordView .record-alien {
  width: 48px;
  height: 48px;
  top: 10px;
}
#recordView .record-section {
  padding: 8px;
}
#recordView .field-label,
#recordView .field-label:is(:first-of-type),
#recordView .amount-label {
  margin: 5px 0 5px;
  font-size: 11px;
}
#recordView .shape-grid {
  gap: 8px;
  padding-bottom: 7px;
}
#recordView .visual-choice.image-only {
  min-height: 72px;
  padding: 6px 5px 5px;
  border-radius: 18px;
}
#recordView .visual-choice.image-only img {
  height: 43px;
}
#recordView .visual-choice.image-only b {
  font-size: 11px;
}
.amount-slider-card {
  padding: 7px 11px 6px;
  border-radius: 19px;
}
.amount-slider-value {
  margin-bottom: 4px;
  padding: 4px 12px;
  font-size: 11px;
}
.amount-slider-card input[type="range"] {
  height: 18px;
}
.amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  height: 9px;
}
.amount-slider-card input[type="range"]::-webkit-slider-thumb {
  width: 23px;
  height: 23px;
  margin-top: -7px;
}
.amount-slider-scale {
  font-size: 9px;
}
#recordView .palette {
  gap: 6px;
  padding: 2px 1px 5px;
}
#recordView .text-tags {
  gap: 5px;
  padding-bottom: 0;
}
#recordView .text-tag {
  min-height: 26px;
  padding: 6px 9px;
  font-size: 10px;
}
#recordView #smoothTags,
#recordView #durationTags,
#recordView #feelingTags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
#recordView #feelingTags {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
#recordView #smoothTags .text-tag,
#recordView #durationTags .text-tag,
#recordView #feelingTags .text-tag {
  width: 100%;
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
  text-align: center;
}
#recordView .custom-row {
  gap: 6px;
  margin-bottom: 2px;
}
#recordView .custom-row input,
#recordView .custom-row button {
  min-height: 29px;
  padding: 0 10px;
  font-size: 10px;
}
#recordView #customTags {
  display: none;
}
#recordView .check-row {
  min-height: 29px;
  margin-top: 5px;
  padding: 6px 10px;
  font-size: 10px;
}
#recordView .submit-btn {
  position: relative;
  min-height: 48px;
  margin-top: 8px;
  border-radius: 20px;
  font-size: 15px;
}
#recordView .submit-btn::after {
  width: 32px;
  height: 32px;
}

@media (max-width: 430px) {
  #recordView .main-recorder {
    height: min(calc(100svh - 88px), 750px);
    padding: 12px 12px 12px;
  }
  #recordView .panel-head {
    min-height: 50px;
    padding-left: 62px;
  }
  #recordView .record-alien {
    left: 13px;
    width: 46px;
    height: 46px;
  }
  #recordView .record-section {
    border-radius: 24px;
  }
}

/* Lock CTA inside the glass shell and keep the page one-screen */
#recordView .main-recorder {
  position: relative;
  padding-bottom: 68px;
}
#recordView .record-grid {
  max-height: calc(100% - 118px);
  overflow: hidden;
}
#recordView .submit-btn {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 13px;
  width: auto;
  margin: 0;
}
@media (max-width: 430px) {
  #recordView .main-recorder {
    padding-bottom: 64px;
  }
  #recordView .record-grid {
    max-height: calc(100% - 112px);
  }
  #recordView .submit-btn {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* Final specificity guard: keep submit visible above the bottom tab bar */
body #app #recordView .main-recorder > #addBtn.submit-btn {
  position: absolute !important;
  left: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  top: auto !important;
  width: auto !important;
  margin: 0 !important;
  z-index: 12 !important;
  transform: none;
}
body #app #recordView .main-recorder > .record-grid {
  max-height: calc(100% - 112px) !important;
  padding-bottom: 4px;
}
body #app #recordView .main-recorder {
  padding-bottom: 66px !important;
}
body #app #recordView .main-recorder > .record-alien {
  z-index: 14;
}

/* Airy glass refinement: lighter, clearer, less dense */
:root {
  --airy-green: #a8d46a;
  --airy-green-2: #8ec455;
  --airy-green-3: #6fa63c;
  --airy-ink: #3f4d35;
  --airy-muted: #8a7e68;
  --airy-panel: rgba(255, 255, 248, .46);
  --airy-card: rgba(255, 255, 250, .34);
  --airy-edge: rgba(255,255,255,.76);
  --airy-shadow: 0 10px 26px rgba(104, 122, 78, .085), -5px -7px 18px rgba(255,255,255,.7), inset 1px 1px 0 rgba(255,255,255,.82);
}
body {
  background:
    radial-gradient(circle at 20% 9%, rgba(255,255,255,.96) 0 8%, transparent 31%),
    radial-gradient(circle at 77% 8%, rgba(233,245,196,.68) 0 13%, transparent 38%),
    radial-gradient(circle at 17% 91%, rgba(198,231,161,.38) 0 11%, transparent 40%),
    linear-gradient(145deg, #fffdf2 0%, #f8f5df 48%, #edf6d9 100%);
}
body::before {
  opacity: .68;
}
body::after {
  opacity: .42;
}

#recordView.active {
  align-items: start;
}
#recordView .main-recorder {
  height: min(calc(100svh - 96px), 748px);
  padding-top: 10px;
  border-color: rgba(255,255,255,.82);
  background:
    radial-gradient(circle at 18% 2%, rgba(255,255,255,.78), transparent 28%),
    radial-gradient(circle at 94% 98%, rgba(207,235,163,.22), transparent 44%),
    linear-gradient(145deg, rgba(255,255,255,.48), rgba(255,255,255,.18)),
    rgba(251, 249, 230, .38);
  box-shadow:
    0 16px 48px rgba(98, 118, 75, .13),
    -8px -10px 28px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.9),
    inset -12px -18px 32px rgba(151, 184, 101, .045);
  backdrop-filter: blur(30px) saturate(1.28);
}
#recordView .main-recorder::before {
  opacity: .58;
  background:
    linear-gradient(145deg, rgba(255,255,255,.36), transparent 38%),
    radial-gradient(circle at 76% 8%, rgba(255,255,255,.28), transparent 18%);
}
#recordView .main-recorder::after {
  top: 60px;
  background: linear-gradient(90deg, transparent, rgba(141,166,104,.1), transparent);
}

#recordView .panel-head {
  min-height: 58px;
  padding: 11px 12px 11px 62px;
  margin-bottom: 12px;
}
#recordView .panel-head .kicker {
  color: var(--airy-ink);
  font-size: 26px;
  letter-spacing: -.03em;
  font-weight: 800;
}
#recordView .record-alien {
  width: 44px;
  height: 44px;
  top: 12px;
  left: 15px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.66), rgba(245,250,223,.32));
  box-shadow:
    0 8px 18px rgba(106,126,80,.09),
    -4px -5px 14px rgba(255,255,255,.7),
    inset 1px 1px 0 rgba(255,255,255,.9);
}

#recordView .record-grid {
  gap: 14px;
  max-height: calc(100% - 122px) !important;
}
#recordView .record-section {
  padding: 12px;
  border-radius: 28px;
  border-color: rgba(255,255,255,.58);
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.45), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,.08)),
    rgba(255, 255, 246, .18);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.56),
    inset -8px -12px 22px rgba(151, 184, 101, .035);
  backdrop-filter: blur(20px) saturate(1.16);
}
#recordView .field-label,
#recordView .field-label:is(:first-of-type),
#recordView .amount-label {
  margin: 2px 0 10px;
  color: rgba(63,77,53,.84);
  font-size: 13px;
  letter-spacing: .03em;
  font-weight: 700;
}
#recordView .amount-label {
  display: none !important;
}
#recordView.amount-open .amount-label {
  display: flex !important;
  margin-top: 16px;
  margin-bottom: 8px;
}

#recordView .shape-grid {
  gap: 13px;
  padding-bottom: 0;
  border-bottom: 0;
}
#recordView .visual-choice.image-only {
  min-height: 92px;
  padding: 9px 7px 8px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 10%, rgba(255,255,255,.66), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.4), rgba(255,250,230,.18)) !important;
  border-color: rgba(255,255,255,.7) !important;
  box-shadow: var(--airy-shadow) !important;
}
#recordView .visual-choice.image-only img {
  height: 54px;
  filter: drop-shadow(0 9px 12px rgba(91,78,52,.13)) drop-shadow(-3px -4px 8px rgba(255,255,255,.5));
}
#recordView .visual-choice.image-only b {
  color: #726552;
  font-size: 14px;
  font-weight: 600;
}
#recordView .visual-choice.image-only.active {
  background:
    radial-gradient(circle at 24% 10%, rgba(255,255,255,.52), transparent 32%),
    linear-gradient(155deg, rgba(190,225,123,.92), rgba(142,196,85,.9) 66%, rgba(119,175,68,.9)) !important;
  box-shadow:
    0 10px 24px rgba(125,169,76,.18),
    -5px -7px 16px rgba(255,255,255,.72),
    0 0 0 3px rgba(255,255,255,.34),
    0 0 22px rgba(178,221,111,.28),
    inset 1px 1px 0 rgba(255,255,255,.48),
    inset -8px -11px 20px rgba(68,119,34,.11) !important;
}
#recordView .visual-choice.image-only.active b {
  color: #faffec !important;
}

#recordView .amount-grid {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  overflow: hidden;
  transition: max-height .28s ease, opacity .22s ease, transform .22s ease;
}
#recordView.amount-open .amount-grid {
  max-height: 74px;
  opacity: 1;
  transform: translateY(0);
}
.amount-slider-card {
  padding: 12px 14px 11px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,.6), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,250,232,.14)) !important;
  border-color: rgba(255,255,255,.66) !important;
  box-shadow:
    0 8px 20px rgba(106,124,80,.075),
    -4px -6px 16px rgba(255,255,255,.62),
    inset 1px 1px 0 rgba(255,255,255,.78) !important;
}
.amount-slider-card::before {
  opacity: .48;
}
.amount-slider-value {
  position: relative;
  left: var(--amount-progress);
  transform: translateX(-50%);
  min-width: 58px;
  width: max-content;
  margin: 0 0 6px;
  padding: 4px 12px;
  color: #4d7034;
  font-size: 13px;
  font-weight: 800;
  background:
    radial-gradient(circle at 22% 8%, rgba(255,255,255,.78), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(225,242,190,.58));
  border: 1px solid rgba(255,255,255,.78);
  box-shadow:
    0 7px 14px rgba(112,146,75,.13),
    -3px -4px 10px rgba(255,255,255,.7),
    inset 1px 1px 0 rgba(255,255,255,.86);
}
.amount-slider-card input[type="range"] {
  height: 18px;
  accent-color: var(--airy-green);
}
.amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background:
    linear-gradient(90deg, rgba(164,211,102,.68) 0 var(--amount-progress), rgba(255,255,255,.46) var(--amount-progress) 100%);
  box-shadow:
    inset 1px 1px 2px rgba(107,126,78,.12),
    0 1px 0 rgba(255,255,255,.72);
}
.amount-slider-card input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7.5px;
  border: 2px solid rgba(255,255,255,.82);
  background:
    radial-gradient(circle at 31% 22%, #fff 0 20%, rgba(198,229,131,.95) 21% 58%, rgba(135,194,78,.88) 59% 100%);
  box-shadow:
    0 7px 14px rgba(104,146,62,.18),
    -2px -3px 8px rgba(255,255,255,.82),
    inset 1px 1px 0 rgba(255,255,255,.86);
}
.amount-slider-scale {
  display: none;
}

#recordView .palette {
  gap: 9px;
  padding: 0 1px 0;
  border-bottom: 0;
}
#recordView .color-dot {
  border-color: rgba(255,255,255,.68);
  box-shadow:
    3px 5px 10px rgba(82,69,47,.1),
    -2px -3px 8px rgba(255,255,255,.68),
    inset 1px 1px 4px rgba(255,255,255,.34),
    inset -3px -4px 7px rgba(0,0,0,.1) !important;
}
#recordView .color-dot.active {
  box-shadow:
    0 0 0 4px rgba(255,255,255,.7),
    0 0 0 6px rgba(169,211,99,.62),
    0 6px 16px rgba(117,153,74,.15),
    inset 1px 1px 4px rgba(255,255,255,.34),
    inset -3px -4px 7px rgba(0,0,0,.1) !important;
}

#recordView .text-tags {
  gap: 8px;
}
#recordView #smoothTags,
#recordView #durationTags,
#recordView #feelingTags {
  gap: 8px;
}
#recordView .text-tag,
#recordView .custom-row input,
#recordView .custom-row button,
#recordView .check-row {
  min-height: 32px;
  color: #756957;
  background:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,.58), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,250,232,.14)) !important;
  border-color: rgba(255,255,255,.62) !important;
  box-shadow:
    0 6px 14px rgba(105,121,82,.055),
    -3px -4px 10px rgba(255,255,255,.58),
    inset 1px 1px 0 rgba(255,255,255,.74) !important;
}
#recordView .text-tag {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
#recordView .text-tag.active {
  color: #4a6f33 !important;
  background:
    radial-gradient(circle at 22% 9%, rgba(255,255,255,.58), transparent 30%),
    linear-gradient(145deg, rgba(218,240,171,.9), rgba(171,216,103,.78)) !important;
  box-shadow:
    0 7px 16px rgba(127,172,78,.16),
    0 0 16px rgba(184,225,114,.2),
    inset 1px 1px 0 rgba(255,255,255,.54) !important;
}
#recordView .custom-row input,
#recordView .custom-row button {
  min-height: 34px;
  font-size: 12px;
}
#recordView .check-row {
  opacity: .86;
  min-height: 32px;
}

body #app #recordView .main-recorder > #addBtn.submit-btn {
  min-height: 50px;
  bottom: 14px !important;
  border-radius: 22px;
  color: #faffef;
  background:
    radial-gradient(circle at 88% 48%, rgba(255,255,255,.4), transparent 18%),
    linear-gradient(180deg, rgba(164,211,86,.94), rgba(116,178,57,.9));
  box-shadow:
    0 12px 24px rgba(114,166,68,.22),
    0 0 22px rgba(184,225,111,.24),
    inset 1px 2px 0 rgba(255,255,255,.45),
    inset -9px -12px 20px rgba(68,119,35,.13);
  font-size: 16px;
  font-weight: 800;
}

.bottom-tabs {
  min-height: 64px;
  border-color: rgba(255,255,255,.76);
  background:
    radial-gradient(circle at 14% 0%, rgba(255,255,255,.76), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.56), rgba(255,250,230,.28));
  box-shadow:
    0 12px 32px rgba(92,112,70,.13),
    -5px -7px 18px rgba(255,255,255,.66),
    inset 1px 1px 0 rgba(255,255,255,.82);
}
.bottom-tabs .tab {
  color: #8a7a62;
}
.bottom-tabs .tab.active {
  color: #4f7137;
  background:
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.5), transparent 28%),
    linear-gradient(145deg, rgba(213,237,159,.92), rgba(162,211,89,.8)) !important;
  box-shadow:
    0 8px 16px rgba(124,171,76,.18),
    0 0 18px rgba(184,225,114,.22),
    inset 1px 1px 0 rgba(255,255,255,.54) !important;
}

@media (max-width: 430px) {
  #recordView .main-recorder {
    height: min(calc(100svh - 92px), 744px);
    padding-left: 13px;
    padding-right: 13px;
  }
  #recordView .record-grid {
    gap: 12px;
  }
  #recordView .record-section {
    padding: 11px;
  }
  #recordView .visual-choice.image-only {
    min-height: 86px;
  }
  #recordView .visual-choice.image-only img {
    height: 49px;
  }
  #recordView .visual-choice.image-only b {
    font-size: 13px;
  }
  #recordView .text-tag {
    font-size: 11.5px;
    padding: 8px 8px;
  }
  #recordView #feelingTags {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #recordView #feelingTags .text-tag {
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Open amount state: remove redundancy and keep the screen breathable */
#recordView.amount-open .amount-label {
  display: none !important;
}
#recordView.amount-open .shape-section {
  padding-bottom: 10px;
}
#recordView.amount-open #amountChoices {
  margin-top: 14px;
  max-height: 52px;
}
#recordView.amount-open .amount-slider-card {
  height: 52px;
  padding: 4px 14px 8px;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}
#recordView.amount-open .amount-slider-card::before {
  display: none;
}
#recordView.amount-open .amount-slider-value {
  margin-bottom: 2px;
  padding: 3px 11px;
  font-size: 12px;
}
#recordView.amount-open .amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  background:
    linear-gradient(90deg, rgba(181,222,113,.72) 0 var(--amount-progress), rgba(232,238,214,.48) var(--amount-progress) 100%);
}
#recordView.amount-open .detail-section {
  padding-top: 10px;
  padding-bottom: 10px;
}
#recordView.amount-open .detail-section .field-label {
  margin: 0 0 7px;
  font-size: 12px;
}
#recordView.amount-open .detail-section .field-label:not(:first-child) {
  margin-top: 12px;
}
#recordView.amount-open .palette {
  gap: 8px;
}
#recordView.amount-open #smoothTags,
#recordView.amount-open #durationTags,
#recordView.amount-open #feelingTags {
  gap: 6px;
}
#recordView.amount-open .text-tag {
  min-height: 28px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 11px;
}
#recordView.amount-open #feelingTags {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
#recordView.amount-open #feelingTags .text-tag {
  padding-left: 3px;
  padding-right: 3px;
  font-size: 10.5px;
}
#recordView.amount-open .custom-row,
#recordView.amount-open #customTags,
#recordView.amount-open .check-row,
#recordView.amount-open .detail-section .field-label:nth-of-type(5) {
  display: none !important;
}

@media (max-width: 430px) {
  #recordView.amount-open .record-grid {
    gap: 10px;
  }
  #recordView.amount-open .visual-choice.image-only {
    min-height: 80px;
  }
  #recordView.amount-open .visual-choice.image-only img {
    height: 45px;
  }
  #recordView.amount-open .detail-section .field-label:not(:first-child) {
    margin-top: 10px;
  }
  #recordView.amount-open .text-tag {
    font-size: 10.5px;
  }
}

/* Refined custom range: remove default dark system track */
.amount-slider-card input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  outline: none;
}
.amount-slider-card input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(190,226,119,.78) 0 var(--amount-progress), rgba(237,244,220,.62) var(--amount-progress) 100%) !important;
  border: 1px solid rgba(255,255,255,.42);
  box-shadow:
    inset 1px 1px 2px rgba(112,135,78,.08),
    0 1px 0 rgba(255,255,255,.8) !important;
}
.amount-slider-card input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
}
.amount-slider-card input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(237,244,220,.62);
  border: 1px solid rgba(255,255,255,.42);
}
.amount-slider-card input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(190,226,119,.78);
}
.amount-slider-card input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.82);
  background: radial-gradient(circle at 31% 22%, #fff 0 20%, rgba(198,229,131,.95) 21% 58%, rgba(135,194,78,.88) 59% 100%);
  box-shadow: 0 7px 14px rgba(104,146,62,.18), -2px -3px 8px rgba(255,255,255,.82), inset 1px 1px 0 rgba(255,255,255,.86);
}

/* Metric sliders: smoothness + duration in one light row */
#recordView .dual-slider-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
#recordView .mini-slider-field {
  min-width: 0;
}
#recordView .mini-slider-field .field-label {
  margin: 0 0 8px;
}
#recordView .metric-slider-slot {
  display: block !important;
  padding: 0;
}
.metric-slider-card {
  --metric-progress: 50%;
  position: relative;
  min-height: 58px;
  padding: 3px 6px 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 24% 0%, rgba(255,255,255,.48), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,250,232,.1));
  border: 1px solid rgba(255,255,255,.5);
  box-shadow:
    0 7px 16px rgba(105,121,82,.055),
    -3px -4px 10px rgba(255,255,255,.52),
    inset 1px 1px 0 rgba(255,255,255,.7);
}
.metric-slider-value {
  position: relative;
  left: var(--metric-progress);
  transform: translateX(-50%);
  width: max-content;
  min-width: 46px;
  max-width: 88px;
  margin: 0 0 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #4f7137;
  background:
    radial-gradient(circle at 22% 8%, rgba(255,255,255,.72), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.68), rgba(224,241,190,.52));
  border: 1px solid rgba(255,255,255,.7);
  box-shadow:
    0 6px 12px rgba(112,146,75,.11),
    -2px -3px 8px rgba(255,255,255,.64),
    inset 1px 1px 0 rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.metric-slider-card input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  outline: none;
  accent-color: var(--airy-green);
}
.metric-slider-card input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(190,226,119,.72) 0 var(--metric-progress), rgba(237,244,220,.62) var(--metric-progress) 100%);
  border: 1px solid rgba(255,255,255,.42);
  box-shadow:
    inset 1px 1px 2px rgba(112,135,78,.08),
    0 1px 0 rgba(255,255,255,.78);
}
.metric-slider-card input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 19px;
  height: 19px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.82);
  background:
    radial-gradient(circle at 31% 22%, #fff 0 20%, rgba(200,230,133,.95) 21% 58%, rgba(139,196,82,.88) 59% 100%);
  box-shadow:
    0 7px 14px rgba(104,146,62,.16),
    -2px -3px 8px rgba(255,255,255,.8),
    inset 1px 1px 0 rgba(255,255,255,.86);
}
.metric-slider-card input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(237,244,220,.62);
  border: 1px solid rgba(255,255,255,.42);
}
.metric-slider-card input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(190,226,119,.72);
}
.metric-slider-card input[type="range"]::-moz-range-thumb {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.82);
  background: radial-gradient(circle at 31% 22%, #fff 0 20%, rgba(200,230,133,.95) 21% 58%, rgba(139,196,82,.88) 59% 100%);
  box-shadow: 0 7px 14px rgba(104,146,62,.16), -2px -3px 8px rgba(255,255,255,.8), inset 1px 1px 0 rgba(255,255,255,.86);
}

#recordView.amount-open .dual-slider-row {
  margin-top: 12px;
  gap: 10px;
}
#recordView.amount-open .metric-slider-card {
  min-height: 52px;
}
#recordView.amount-open .metric-slider-value {
  font-size: 10.5px;
  padding: 3px 8px;
}

@media (max-width: 430px) {
  #recordView .dual-slider-row {
    gap: 9px;
  }
  .metric-slider-card {
    min-height: 54px;
    padding-left: 5px;
    padding-right: 5px;
  }
  .metric-slider-value {
    min-width: 42px;
    font-size: 10.5px;
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* Shared metric control + fixed amount bubble */
#recordView .shared-metric-panel {
  margin-top: 14px;
}
#recordView .metric-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
#recordView .metric-switch button {
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-content: center;
  text-align: center;
  color: #7d715d;
  background:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,.58), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,250,232,.14));
  border: 1px solid rgba(255,255,255,.62);
  box-shadow:
    0 6px 14px rgba(105,121,82,.055),
    -3px -4px 10px rgba(255,255,255,.58),
    inset 1px 1px 0 rgba(255,255,255,.74);
}
#recordView .metric-switch button span {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
#recordView .metric-switch button b {
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
  color: #5f6f4c;
}
#recordView .metric-switch button.active {
  color: #4f7137;
  background:
    radial-gradient(circle at 22% 9%, rgba(255,255,255,.62), transparent 30%),
    linear-gradient(145deg, rgba(222,242,177,.92), rgba(176,219,107,.78));
  box-shadow:
    0 8px 16px rgba(127,172,78,.15),
    0 0 16px rgba(184,225,114,.2),
    inset 1px 1px 0 rgba(255,255,255,.56);
}
#recordView .metric-switch button.active b {
  color: #4f7137;
}
#recordView .metric-slider-slot {
  display: block !important;
}
.metric-slider-card.shared {
  min-height: 50px;
  padding: 4px 12px 8px;
}
.metric-slider-card.shared .metric-slider-value {
  left: auto;
  transform: none;
  margin-left: auto;
  margin-right: auto;
}

.amount-slider-card .amount-slider-value,
#recordView.amount-open .amount-slider-value {
  left: auto !important;
  transform: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}
#recordView.amount-open #amountChoices {
  max-height: 54px;
}
#recordView.amount-open .amount-slider-card {
  height: 54px;
}

#recordView.amount-open .shared-metric-panel {
  margin-top: 10px;
}
#recordView.amount-open .metric-switch {
  gap: 8px;
  margin-bottom: 8px;
}
#recordView.amount-open .metric-switch button {
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}
#recordView.amount-open .metric-slider-card.shared {
  min-height: 46px;
  padding-bottom: 6px;
}

@media (max-width: 430px) {
  #recordView .metric-switch {
    gap: 8px;
  }
  #recordView .metric-switch button {
    min-height: 40px;
  }
  #recordView .metric-switch button span {
    font-size: 10.5px;
  }
  #recordView .metric-switch button b {
    font-size: 12px;
  }
}

/* Compact shared metric control so the home screen stays complete */
#recordView .shared-metric-panel {
  margin-top: 12px;
}
#recordView .metric-switch {
  gap: 8px;
  margin-bottom: 6px;
}
#recordView .metric-switch button {
  min-height: 34px;
  padding: 5px 9px;
  gap: 1px;
}
#recordView .metric-switch button span {
  font-size: 10px;
}
#recordView .metric-switch button b {
  font-size: 12px;
}
.metric-slider-card.shared {
  min-height: 38px;
  padding: 0 12px 5px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.metric-slider-card.shared .metric-slider-value {
  min-width: 44px;
  margin-bottom: 0;
  padding: 2px 9px;
  font-size: 10.5px;
}
.metric-slider-card.shared input[type="range"] {
  height: 16px;
}
#recordView.amount-open .shared-metric-panel {
  margin-top: 8px;
}
#recordView.amount-open .metric-switch button {
  min-height: 32px;
}
#recordView.amount-open .metric-slider-card.shared {
  min-height: 36px;
}

/* Interaction refinement: tap-to-open color/metric panels, smoother slider hit areas */
#recordView .palette {
  display: grid;
  place-items: center;
  gap: 9px;
  padding: 0;
}
#recordView .color-summary {
  min-width: 128px;
  min-height: 38px;
  padding: 6px 14px 6px 9px;
  border-radius: 999px;
  display: inline-grid;
  grid-template-columns: 26px auto;
  align-items: center;
  gap: 8px;
  color: #5f6f4c;
  background:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,.62), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.42), rgba(255,250,232,.18));
  border: 1px solid rgba(255,255,255,.66);
  box-shadow:
    0 7px 16px rgba(105,121,82,.07),
    -3px -4px 10px rgba(255,255,255,.62),
    inset 1px 1px 0 rgba(255,255,255,.78);
}
#recordView .color-summary i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.72);
  box-shadow: inset 1px 1px 4px rgba(255,255,255,.34), inset -3px -4px 7px rgba(0,0,0,.1);
}
#recordView .color-summary b {
  font-size: 13px;
  font-weight: 850;
}
#recordView .color-summary.active {
  background:
    radial-gradient(circle at 22% 9%, rgba(255,255,255,.62), transparent 30%),
    linear-gradient(145deg, rgba(222,242,177,.9), rgba(176,219,107,.72));
}
#recordView .color-popover {
  display: none;
  width: 100%;
  padding: 9px 10px;
  border-radius: 22px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  justify-items: center;
  gap: 7px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.48), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.3), rgba(255,250,232,.12));
  border: 1px solid rgba(255,255,255,.54);
  box-shadow:
    0 8px 18px rgba(105,121,82,.07),
    -3px -4px 10px rgba(255,255,255,.56),
    inset 1px 1px 0 rgba(255,255,255,.72);
}
#recordView.color-open .color-popover {
  display: grid;
  animation: viewIn .2s ease both;
}
#recordView .color-popover .color-dot {
  width: 22px;
  height: 22px;
  aspect-ratio: auto;
}

#recordView .metric-slider-slot {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height .22s ease, opacity .18s ease, transform .18s ease;
}
#recordView.metric-open .metric-slider-slot {
  max-height: 46px;
  opacity: 1;
  transform: translateY(0);
}
#recordView .shared-metric-panel {
  margin-top: 12px;
}
#recordView .metric-switch button {
  cursor: pointer;
}
#recordView .metric-slider-card.shared,
#recordView .amount-slider-card {
  touch-action: none;
  cursor: grab;
}
#recordView .metric-slider-card.shared:active,
#recordView .amount-slider-card:active {
  cursor: grabbing;
}
#recordView .metric-slider-card.shared input[type="range"],
#recordView .amount-slider-card input[type="range"] {
  pointer-events: none;
}

body #app #recordView .main-recorder > #addBtn.submit-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding-left: 16px !important;
  padding-right: 58px !important;
  text-align: center;
}
body #app #recordView .main-recorder > #addBtn.submit-btn::after {
  flex: none;
}

@media (max-width: 430px) {
  #recordView .color-popover {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 9px 14px;
  }
  #recordView .color-popover .color-dot {
    width: 24px;
    height: 24px;
  }
}

/* Fix opened panels: full-width color tray and comfortable slider hit zones */
#recordView .palette {
  width: 100%;
  justify-items: center;
}
#recordView .color-popover {
  justify-self: stretch;
  width: 100% !important;
  min-width: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
}
#recordView.color-open .color-popover {
  display: grid !important;
}
#recordView .color-popover .color-dot {
  width: 23px !important;
  height: 23px !important;
}
#recordView.amount-open #amountChoices {
  min-height: 44px;
  max-height: 58px;
  overflow: visible;
}
#recordView.amount-open .amount-slider-card {
  min-height: 44px;
  height: 44px;
  padding: 0 14px 8px;
  overflow: visible;
}
#recordView.amount-open .amount-slider-card input[type="range"] {
  height: 24px;
  padding: 9px 0;
}
#recordView.metric-open .metric-slider-slot {
  min-height: 44px;
  max-height: 48px;
  overflow: visible;
}
.metric-slider-card.shared {
  min-height: 44px;
  padding: 0 12px 8px;
  overflow: visible;
}
.metric-slider-card.shared input[type="range"] {
  height: 24px;
  padding: 9px 0;
}
@media (max-width: 430px) {
  #recordView .color-popover {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    justify-self: stretch;
    width: 100% !important;
  }
}

/* Specific guard against old 12-column palette rules */
#recordView .detail-section > #palette.palette {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center;
  justify-items: center;
}
#recordView .detail-section > #palette.palette > .color-popover {
  grid-column: 1 / -1;
}

/* Compact three-control row: color + smoothness + duration */
#recordView .shared-metric-panel {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas:
    "color switch"
    "tray tray";
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
#recordView .shared-metric-panel #palette {
  grid-area: color;
}
#recordView .shared-metric-panel #metricSwitch {
  grid-area: switch;
}
#recordView .shared-metric-panel #metricSliderSlot,
#recordView .shared-metric-panel .color-popover {
  grid-area: tray;
}
#recordView .shared-metric-panel #metricSwitch.metric-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
#recordView .shared-metric-panel .metric-switch button {
  min-height: 36px;
  padding: 5px 7px;
}
#recordView .shared-metric-panel .metric-switch button span {
  font-size: 9.5px;
}
#recordView .shared-metric-panel .metric-switch button b {
  font-size: 11.5px;
}
#recordView .shared-metric-panel #palette.palette {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100%;
  gap: 0;
}
#recordView .color-summary {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
}
#recordView .color-summary b {
  display: none !important;
}
#recordView .color-summary i {
  width: 25px;
  height: 25px;
}
#recordView .shared-metric-panel .color-popover {
  justify-self: stretch;
  width: 100% !important;
  margin-top: 0;
}
#recordView .shared-metric-panel .metric-slider-slot {
  justify-self: stretch;
  width: 100%;
}
#recordView.metric-open .metric-slider-slot {
  max-height: 42px;
  min-height: 40px;
}
.metric-slider-card.shared {
  min-height: 40px;
  padding: 0 12px 7px;
}
#recordView.color-open .color-popover {
  margin-top: 0;
}

/* Tighter centered feeling tags and custom add control */
#recordView #feelingTags {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}
#recordView #feelingTags .text-tag {
  min-height: 28px;
  padding: 5px 6px !important;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px !important;
  line-height: 1;
}
#recordView .custom-row {
  grid-template-columns: 1fr 34px;
  gap: 7px;
}
#recordView .custom-row input {
  text-align: center;
}
#recordView .custom-row button {
  min-width: 34px;
  width: 34px;
  padding: 0 !important;
  display: grid;
  place-items: center;
  font-size: 0 !important;
}
#recordView .custom-row button::before {
  content: "+";
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

/* Final CTA centering guard */
body #app #recordView .main-recorder > #addBtn.submit-btn {
  display: grid !important;
  grid-template-columns: 1fr 34px;
  align-items: center;
  justify-items: center;
  padding-left: 50px !important;
  padding-right: 12px !important;
}
body #app #recordView .main-recorder > #addBtn.submit-btn::after {
  position: static !important;
  transform: none !important;
  grid-column: 2;
}

@media (max-width: 430px) {
  #recordView .shared-metric-panel {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 7px;
  }
  #recordView .shared-metric-panel .metric-switch button b {
    font-size: 10.5px;
  }
  #recordView #feelingTags .text-tag {
    font-size: 10.5px !important;
  }
}

/* Mascot final assets: decorative background layer, no floating layout impact */
.alien-sticker,
.floaty,
.boby {
  animation: none !important;
}
.alien-sticker {
  position: absolute;
  pointer-events: none;
  user-select: none;
  object-fit: contain;
  z-index: 1;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 14px 24px rgba(112, 143, 76, .16)) drop-shadow(0 0 18px rgba(255,255,255,.82)) !important;
  opacity: .72;
  transform: none !important;
}
#recordView .main-recorder,
#containerView .game-panel,
#plazaView .plaza-panel,
#statsView .profile-grid,
#profileView .profile-card {
  position: relative;
  overflow: hidden;
}
#recordView .record-grid,
#recordView .panel-head,
#recordView .submit-btn,
#containerView .sample-top-row,
#containerView .stage,
#containerView .controls,
#plazaView .mothership-notice-row,
#plazaView .plaza-stats,
#plazaView .stage,
#statsView .profile-card,
#profileView .about-brief,
#profileView .profile-login-row,
#profileView .settings-list {
  position: relative;
  z-index: 2;
}
#recordView .record-alien {
  width: 168px !important;
  height: 168px !important;
  left: auto !important;
  right: -42px !important;
  top: 4px !important;
  bottom: auto !important;
  padding: 0 !important;
  opacity: .34;
}
#containerView .container-alien {
  width: 190px !important;
  height: 190px !important;
  right: -48px !important;
  top: -26px !important;
  opacity: .36;
}
#plazaView .plaza-alien {
  width: 148px !important;
  height: 170px !important;
  right: -26px !important;
  top: 2px !important;
  opacity: .42;
}
#statsView .stats-alien {
  display: block !important;
  width: 168px !important;
  height: 168px !important;
  right: -42px !important;
  top: -28px !important;
  opacity: .34;
}
#profileView .profile-alien {
  width: 172px !important;
  height: 172px !important;
  right: -40px !important;
  top: -20px !important;
  opacity: .36;
}
@media (max-width: 430px) {
  #recordView .record-alien {
    width: 148px !important;
    height: 148px !important;
    right: -40px !important;
    top: 6px !important;
  }
  #containerView .container-alien,
  #statsView .stats-alien,
  #profileView .profile-alien {
    width: 150px !important;
    height: 150px !important;
    right: -40px !important;
    top: -18px !important;
  }
  #plazaView .plaza-alien {
    width: 126px !important;
    height: 146px !important;
    right: -28px !important;
    top: 0 !important;
  }
}

/* Final mascot placement guard: background only, never an avatar layer */
body #app #recordView .main-recorder > .record-alien.alien-sticker {
  left: auto !important;
  right: -46px !important;
  top: 18px !important;
  bottom: auto !important;
  width: 158px !important;
  height: 158px !important;
  z-index: 1 !important;
  opacity: .24 !important;
  pointer-events: none !important;
  animation: none !important;
  transform: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
body #app #containerView .game-panel > .container-alien.alien-sticker,
body #app #plazaView .plaza-panel > .plaza-alien.alien-sticker,
body #app #statsView .stats-alien.alien-sticker,
body #app #profileView .profile-card > .profile-alien.alien-sticker {
  z-index: 1 !important;
  pointer-events: none !important;
  animation: none !important;
  transform: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (max-width: 430px) {
  body #app #recordView .main-recorder > .record-alien.alien-sticker {
    right: -42px !important;
    top: 24px !important;
    width: 142px !important;
    height: 142px !important;
  }
}

/* Absolute mascot fix after mobile legacy rules */
body #app #recordView .main-recorder > img.record-alien.alien-sticker,
body #app #containerView .game-panel > img.container-alien.alien-sticker,
body #app #plazaView .plaza-panel > img.plaza-alien.alien-sticker,
body #app #profileView .profile-card > img.profile-alien.alien-sticker {
  position: absolute !important;
}
body #app #statsView img.stats-alien.alien-sticker {
  position: absolute !important;
}

/* Fix color picker tray: full-width overlay under the compact control row */
#recordView .shared-metric-panel {
  position: relative;
  padding-bottom: 0;
}
#recordView.color-open .shared-metric-panel {
  padding-bottom: 72px;
}
#recordView .shared-metric-panel #palette.palette {
  position: static;
}
#recordView .shared-metric-panel .color-popover {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 44px !important;
  width: 100% !important;
  z-index: 6;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 7px !important;
  padding: 10px 12px !important;
  transform: none !important;
}
#recordView .shared-metric-panel .color-popover .color-dot {
  width: 24px !important;
  height: 24px !important;
}
#recordView.metric-open .shared-metric-panel {
  padding-bottom: 42px;
}
#recordView.metric-open .shared-metric-panel .metric-slider-slot {
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  z-index: 5;
}
@media (max-width: 430px) {
  #recordView .shared-metric-panel .color-popover {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    top: 43px !important;
    padding: 9px 16px !important;
  }
  #recordView.color-open .shared-metric-panel {
    padding-bottom: 78px;
  }
}

/* Prevent expanded control trays from overlapping the feeling section */
#recordView.color-open .shared-metric-panel {
  padding-bottom: 98px !important;
}
#recordView.metric-open .shared-metric-panel {
  padding-bottom: 60px !important;
}
#recordView.color-open .shared-metric-panel .color-popover {
  top: 46px !important;
  min-height: 78px;
}
#recordView.metric-open .shared-metric-panel .metric-slider-slot {
  top: 46px !important;
  min-height: 50px;
}
#recordView.color-open .detail-section > .field-label:nth-of-type(2),
#recordView.metric-open .detail-section > .field-label:nth-of-type(2) {
  margin-top: 8px !important;
}
@media (max-width: 430px) {
  #recordView.color-open .shared-metric-panel {
    padding-bottom: 104px !important;
  }
  #recordView.metric-open .shared-metric-panel {
    padding-bottom: 62px !important;
  }
}

/* Stable expanded controls: use normal flow so following sections are pushed down */
#recordView.color-open .shared-metric-panel,
#recordView.metric-open .shared-metric-panel {
  padding-bottom: 0 !important;
}
#recordView .shared-metric-panel .color-popover,
#recordView .shared-metric-panel .metric-slider-slot {
  position: static !important;
  grid-column: 1 / -1 !important;
  grid-area: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  margin-top: 4px !important;
  z-index: auto !important;
}
#recordView.color-open .shared-metric-panel .color-popover {
  display: grid !important;
  min-height: 78px;
}
#recordView.metric-open .shared-metric-panel .metric-slider-slot {
  display: block !important;
  min-height: 48px;
  max-height: 52px;
  opacity: 1;
  transform: none;
  overflow: visible;
}
#recordView.color-open .detail-section > .field-label:nth-of-type(2),
#recordView.metric-open .detail-section > .field-label:nth-of-type(2) {
  margin-top: 12px !important;
}

/* Shared tray content: color picker now lives in metricSliderSlot full width */
#recordView.color-open .metric-slider-slot {
  display: block !important;
  min-height: 82px;
  max-height: 92px;
  opacity: 1;
  transform: none;
  overflow: visible;
}
#recordView #metricSliderSlot > .color-popover {
  position: static !important;
  display: grid !important;
  width: 100% !important;
  min-height: 78px;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
  align-items: center;
  justify-items: center;
  padding: 10px 18px !important;
  margin-top: 4px !important;
  border-radius: 22px;
}
#recordView #metricSliderSlot > .color-popover .color-dot {
  width: 24px !important;
  height: 24px !important;
}
#recordView.color-open .shared-metric-panel {
  padding-bottom: 0 !important;
}

/* Color picker overlap hotfix: support both old and new DOM positions */
#recordView .shared-metric-panel {
  position: relative !important;
}
#recordView.color-open .shared-metric-panel {
  padding-bottom: 112px !important;
}
#recordView.color-open #palette > .color-popover,
#recordView.color-open #metricSliderSlot > .color-popover {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 44px !important;
  width: 100% !important;
  min-width: 100% !important;
  min-height: 84px !important;
  z-index: 8 !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 11px 18px !important;
  margin: 0 !important;
  transform: none !important;
}
#recordView.color-open #palette > .color-popover .color-dot,
#recordView.color-open #metricSliderSlot > .color-popover .color-dot {
  width: 25px !important;
  height: 25px !important;
}
#recordView.color-open .detail-section > .field-label:nth-of-type(2) {
  margin-top: 16px !important;
}
@media (max-width: 430px) {
  #recordView.color-open .shared-metric-panel {
    padding-bottom: 118px !important;
  }
}

/* Other conditions menu: official tags in a compact expandable tray */
#recordView .condition-menu {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
#recordView .condition-toggle {
  width: 100%;
  min-height: 44px;
  padding: 7px 10px 7px 14px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: #6d7561;
  background:
    radial-gradient(circle at 20% 8%, rgba(255,255,255,.58), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.38), rgba(255,250,232,.16));
  border: 1px solid rgba(255,255,255,.62);
  box-shadow:
    0 6px 14px rgba(105,121,82,.055),
    -3px -4px 10px rgba(255,255,255,.58),
    inset 1px 1px 0 rgba(255,255,255,.74);
  text-align: left;
}
#recordView .condition-toggle span {
  font-size: 12px;
  font-weight: 850;
  color: #53624a;
}
#recordView .condition-toggle b {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: #8a806d;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#recordView .condition-toggle i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: #6f9f42;
}
#recordView .condition-tags {
  display: none !important;
  max-height: 112px;
  overflow: auto;
  padding: 9px;
  border-radius: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.42), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,250,232,.1));
  border: 1px solid rgba(255,255,255,.54);
  box-shadow:
    0 8px 18px rgba(105,121,82,.06),
    -3px -4px 10px rgba(255,255,255,.5),
    inset 1px 1px 0 rgba(255,255,255,.68);
  scrollbar-width: none;
}
#recordView .condition-tags::-webkit-scrollbar {
  display: none;
}
#recordView.condition-open .condition-tags {
  display: grid !important;
  animation: viewIn .18s ease both;
}
#recordView .condition-tags .text-tag {
  min-height: 28px;
  padding: 6px 5px !important;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 10.5px !important;
  line-height: 1.1;
}
#recordView.condition-open .custom-row {
  margin-top: 2px;
}
@media (max-width: 430px) {
  #recordView .condition-tags {
    max-height: 106px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px;
  }
  #recordView .condition-tags .text-tag {
    font-size: 10px !important;
  }
}

/* Stats page compaction: icon-first, low-text dashboard */
body #app #statsView .profile-grid {
  gap: 12px !important;
}
body #app #statsView .profile-card.wide {
  padding: 14px !important;
  border-radius: 26px !important;
}
body #app #statsView .profile-card.wide > .kicker {
  margin: 0 0 10px !important;
  font-size: 11px !important;
  letter-spacing: .08em !important;
  color: rgba(91, 129, 58, .78) !important;
}
body #app #statsView #healthStats.health-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
body #app #statsView .health-card.compact-stat {
  min-height: 74px !important;
  padding: 9px 6px 8px !important;
  border-radius: 20px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  text-align: center !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(243, 249, 231, .5)) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  box-shadow:
    8px 10px 22px rgba(100, 122, 70, .10),
    -7px -7px 18px rgba(255,255,255,.82),
    inset 0 1px 0 rgba(255,255,255,.9) !important;
}
body #app #statsView .health-card.compact-stat i {
  width: 25px !important;
  height: 25px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  font-style: normal !important;
  font-size: 13px !important;
  line-height: 1 !important;
  color: #5d803b !important;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.92), rgba(196, 222, 151, .62)) !important;
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.85),
    inset -2px -2px 4px rgba(93, 128, 59, .12),
    0 6px 12px rgba(93, 128, 59, .12) !important;
}
body #app #statsView .health-card.compact-stat strong {
  display: block !important;
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  letter-spacing: -.04em !important;
  color: #3b3328 !important;
}
body #app #statsView .health-card.compact-stat span {
  display: block !important;
  margin: 0 !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  color: rgba(105, 83, 61, .68) !important;
  white-space: nowrap !important;
}
body #app #statsView #colorStats.color-stat-list {
  gap: 7px !important;
}
body #app #statsView .color-stat {
  min-height: 32px !important;
  grid-template-columns: 20px 1fr minmax(48px, auto) !important;
  gap: 8px !important;
  padding: 5px 8px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.42) !important;
  box-shadow: inset 0 0 0 1px rgba(112, 143, 76, .06) !important;
}
body #app #statsView .color-stat-dot {
  width: 18px !important;
  height: 18px !important;
  border-radius: 7px !important;
}
body #app #statsView .color-stat-bar {
  height: 8px !important;
  background: rgba(224, 233, 205, .75) !important;
}
body #app #statsView .color-stat b {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: rgba(70, 55, 40, .72) !important;
  white-space: nowrap !important;
}
body #app #statsView #monthlyArchive.archive-list {
  gap: 7px !important;
}
body #app #statsView .archive-item {
  min-height: 46px !important;
  padding: 9px 11px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.43) !important;
  grid-template-columns: 1fr auto !important;
  box-shadow: inset 0 0 0 1px rgba(112, 143, 76, .06) !important;
}
body #app #statsView .archive-item b {
  font-size: 13px !important;
  line-height: 1.15 !important;
}
body #app #statsView .archive-item small,
body #app #statsView .archive-item time {
  font-size: 10.5px !important;
  line-height: 1.2 !important;
  color: rgba(105, 83, 61, .6) !important;
}
@media (max-width: 430px) {
  body #app #statsView #healthStats.health-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body #app #statsView .health-card.compact-stat {
    min-height: 66px !important;
    padding: 7px 4px !important;
    border-radius: 18px !important;
  }
  body #app #statsView .health-card.compact-stat i {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
  }
  body #app #statsView .health-card.compact-stat strong {
    font-size: 19px !important;
  }
  body #app #statsView .health-card.compact-stat span {
    font-size: 9.5px !important;
  }
}

/* Stats page: replace report bars with compact visual chips */
body #app #statsView #shapeStats.bar-list {
  display: block !important;
}
body #app #statsView .shape-chip-grid,
body #app #statsView .color-chip-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
body #app #statsView .color-chip-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
body #app #statsView .shape-chip,
body #app #statsView .color-chip {
  min-height: 64px !important;
  padding: 8px 6px !important;
  border-radius: 18px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  text-align: center !important;
  background: linear-gradient(145deg, rgba(255,255,255,.64), rgba(245, 250, 235, .44)) !important;
  border: 1px solid rgba(255,255,255,.66) !important;
  box-shadow:
    7px 8px 18px rgba(100, 122, 70, .08),
    -6px -6px 14px rgba(255,255,255,.72),
    inset 0 1px 0 rgba(255,255,255,.88) !important;
}
body #app #statsView .shape-chip img {
  width: 34px !important;
  height: 26px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 5px 8px rgba(93, 128, 59, .10)) !important;
}
body #app #statsView .shape-chip b,
body #app #statsView .color-chip b {
  font-size: 18px !important;
  line-height: 1 !important;
  letter-spacing: -.04em !important;
  color: #3b3328 !important;
}
body #app #statsView .shape-chip span,
body #app #statsView .color-chip span {
  font-size: 10px !important;
  line-height: 1.1 !important;
  color: rgba(105, 83, 61, .62) !important;
  white-space: nowrap !important;
}
body #app #statsView .color-chip i {
  width: 22px !important;
  height: 22px !important;
  border-radius: 9px !important;
  display: block !important;
  box-shadow:
    inset 2px 2px 3px rgba(255,255,255,.32),
    inset -4px -4px 7px rgba(0,0,0,.14),
    0 6px 10px rgba(74, 43, 22, .10) !important;
}
body #app #statsView #tagStats.settings-list {
  display: block !important;
}
body #app #statsView .tag-chip-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
}
body #app #statsView .tag-stat-pill {
  min-height: 28px !important;
  padding: 6px 9px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: rgba(72, 58, 43, .74) !important;
  background: rgba(255,255,255,.48) !important;
  box-shadow: inset 0 0 0 1px rgba(112, 143, 76, .08) !important;
}
body #app #statsView .tag-stat-pill b {
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: #5d803b !important;
  background: rgba(197, 225, 154, .48) !important;
  font-size: 10px !important;
}
body #app #statsView .tag-chip-grid .tag-stat-pill {
  border-radius: 999px !important;
  overflow: hidden !important;
}
body #app #statsView .tag-chip-grid .tag-stat-pill,
body #app #statsView .tag-chip-grid .tag-stat-pill b {
  box-sizing: border-box !important;
}
@media (max-width: 430px) {
  body #app #statsView .shape-chip-grid {
    gap: 6px !important;
  }
  body #app #statsView .color-chip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body #app #statsView .shape-chip,
  body #app #statsView .color-chip {
    min-height: 58px !important;
    padding: 7px 4px !important;
    border-radius: 16px !important;
  }
  body #app #statsView .shape-chip img {
    width: 30px !important;
    height: 22px !important;
  }
  body #app #statsView .shape-chip b,
  body #app #statsView .color-chip b {
    font-size: 16px !important;
  }
  body #app #statsView .shape-chip span,
  body #app #statsView .color-chip span {
    font-size: 9px !important;
  }
}

/* Other conditions: scrollable tray with persistent custom tags inside */
body #app #recordView .condition-tags {
  display: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-height: none !important;
}
body #app #recordView.condition-open .condition-tags {
  display: block !important;
  animation: none !important;
}
body #app #recordView .condition-scroll {
  height: 118px !important;
  max-height: 118px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 9px !important;
  border-radius: 20px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.42), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,250,232,.12)) !important;
  border: 1px solid rgba(255,255,255,.56) !important;
  box-shadow:
    0 8px 18px rgba(105,121,82,.06),
    -3px -4px 10px rgba(255,255,255,.5),
    inset 1px 1px 0 rgba(255,255,255,.68) !important;
  scrollbar-width: none !important;
}
body #app #recordView .condition-scroll::-webkit-scrollbar {
  display: none !important;
}
body #app #recordView .condition-scroll .text-tag {
  min-height: 44px !important;
  padding: 8px 6px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}
body #app #recordView .condition-custom-add {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 1fr 44px !important;
  gap: 7px !important;
  margin-top: 2px !important;
}
body #app #recordView .condition-custom-add input {
  min-width: 0 !important;
  height: 44px !important;
  border: 0 !important;
  outline: none !important;
  border-radius: 999px !important;
  padding: 0 13px !important;
  color: #5f6f4c !important;
  background: rgba(255,255,255,.5) !important;
  box-shadow: inset 0 0 0 1px rgba(112, 143, 76, .08) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}
body #app #recordView .condition-custom-add button {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  justify-self: end !important;
  color: #4f7137 !important;
  background: linear-gradient(145deg, rgba(222,242,177,.92), rgba(176,219,107,.8)) !important;
  box-shadow:
    0 8px 16px rgba(127,172,78,.15),
    inset 1px 1px 0 rgba(255,255,255,.56) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
}
body #app #recordView .condition-custom-list {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}
body #app #recordView .custom-saved-tag {
  min-height: 44px !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
  color: rgba(83, 98, 74, .78) !important;
  background: rgba(255,255,255,.48) !important;
  box-shadow: inset 0 0 0 1px rgba(112, 143, 76, .08) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}
body #app #recordView .detail-section > .field-label,
body #app #recordView .detail-section > .custom-row,
body #app #recordView .detail-section > #customTags {
  display: none !important;
}

/* Stable full-width tray: no more short collapsed color/slider flash */
body #app #recordView .shared-metric-panel {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) !important;
  grid-template-areas:
    "color switch"
    "tray tray" !important;
  align-items: center !important;
  gap: 8px !important;
  position: relative !important;
  padding-bottom: 0 !important;
}
body #app #recordView .shared-metric-panel #palette { grid-area: color !important; }
body #app #recordView .shared-metric-panel #metricSwitch { grid-area: switch !important; }
body #app #recordView .shared-metric-panel #metricSliderSlot {
  grid-area: tray !important;
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  transform: none !important;
  transition: opacity .14s ease !important;
}
body #app #recordView.color-open .shared-metric-panel,
body #app #recordView.metric-open .shared-metric-panel {
  padding-bottom: 0 !important;
}
body #app #recordView.color-open .shared-metric-panel #metricSliderSlot {
  max-height: 92px !important;
  min-height: 86px !important;
  overflow: visible !important;
  opacity: 1 !important;
}
body #app #recordView.metric-open .shared-metric-panel #metricSliderSlot {
  max-height: 52px !important;
  min-height: 48px !important;
  overflow: visible !important;
  opacity: 1 !important;
}
body #app #recordView #metricSliderSlot > .color-popover,
body #app #recordView.color-open #metricSliderSlot > .color-popover,
body #app #recordView.color-open #palette > .color-popover {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  width: 100% !important;
  min-width: 100% !important;
  min-height: 84px !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 10px 18px !important;
  margin: 0 !important;
  transform: none !important;
  animation: none !important;
  border-radius: 22px !important;
}
body #app #recordView .metric-slider-card.shared {
  width: 100% !important;
  min-width: 100% !important;
  min-height: 48px !important;
  padding: 0 13px 8px !important;
  overflow: visible !important;
  animation: none !important;
}
body #app #recordView .metric-slider-card.shared input[type="range"] {
  width: 100% !important;
  height: 28px !important;
  padding: 10px 0 !important;
}
@media (max-width: 430px) {
  body #app #recordView .condition-scroll {
    height: 112px !important;
    max-height: 112px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px !important;
  }
  body #app #recordView #metricSliderSlot > .color-popover,
  body #app #recordView.color-open #metricSliderSlot > .color-popover,
  body #app #recordView.color-open #palette > .color-popover {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* Bottom navigation custom image icons */
body #app .bottom-tabs .tab .nav-icon {
  position: relative !important;
  width: 30px !important;
  height: 30px !important;
  display: block !important;
  margin: 0 auto -1px !important;
  line-height: 0 !important;
  font-size: 0 !important;
}
body #app .bottom-tabs .tab .nav-icon img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;
  user-select: none !important;
  transition: opacity .16s ease, transform .16s ease, filter .16s ease !important;
}
body #app .bottom-tabs .tab .nav-icon .on {
  opacity: 0 !important;
  transform: scale(.92) !important;
}
body #app .bottom-tabs .tab .nav-icon .idle {
  opacity: .9 !important;
  transform: scale(1) !important;
}
body #app .bottom-tabs .tab.active .nav-icon .idle {
  opacity: 0 !important;
  transform: scale(.92) !important;
}
body #app .bottom-tabs .tab.active .nav-icon .on {
  opacity: 1 !important;
  transform: scale(1.06) !important;
  filter: drop-shadow(0 5px 9px rgba(108, 151, 71, .18)) !important;
}
body #app .bottom-tabs .tab b {
  margin-top: 1px !important;
}
@media (max-width: 430px) {
  body #app .bottom-tabs .tab .nav-icon {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Sampling header alignment + clearer background mascot */
body #app #recordView .main-recorder > .panel-head.mascot-head {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 132px !important;
}
body #app #recordView .main-recorder > .panel-head.mascot-head > div:first-child {
  width: 100% !important;
  display: block !important;
  text-align: left !important;
}
body #app #recordView .main-recorder > .panel-head.mascot-head .kicker {
  display: block !important;
  width: 100% !important;
  margin-left: 0 !important;
  text-align: left !important;
}
body #app #recordView .main-recorder > .panel-head.mascot-head .mascot-card {
  display: none !important;
}
body #app #recordView .main-recorder > img.record-alien.alien-sticker,
body #app #recordView .main-recorder > .record-alien.alien-sticker {
  opacity: .46 !important;
  filter:
    drop-shadow(0 15px 24px rgba(112, 143, 76, .2))
    drop-shadow(0 0 16px rgba(255,255,255,.88)) !important;
}
@media (max-width: 430px) {
  body #app #recordView .main-recorder > .panel-head.mascot-head {
    padding-right: 108px !important;
  }
  body #app #recordView .main-recorder > img.record-alien.alien-sticker,
  body #app #recordView .main-recorder > .record-alien.alien-sticker {
    opacity: .48 !important;
  }
}

/* Custom container artwork backgrounds */
body #app #containerView #stage.stage,
body #app #plazaView #plazaStage.stage {
  border: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 100% 100% !important;
  border-radius: 28px !important;
}
body #app #containerView #stage.stage {
  background-image: url('./assets/container-personal.png') !important;
}
body #app #plazaView #plazaStage.stage {
  background-image: url('./assets/container-mothership.png') !important;
}
body #app #containerView #stage .stage-glow,
body #app #containerView #stage .rim,
body #app #plazaView #plazaStage .stage-glow,
body #app #plazaView #plazaStage .rim {
  display: none !important;
}
body #app #containerView #stage .blocks-layer {
  inset: 12% 8% 8% 8% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 11% 8% 8% 8% !important;
}
body #app #containerView #stage .empty-state,
body #app #plazaView #plazaStage .empty-state {
  inset: 12% 8% 8% 8% !important;
}

/* Container controls after removing back-to-sampling */
body #app #containerView .controls.compact-controls {
  grid-template-columns: 1.25fr 1fr 1fr !important;
  max-width: 430px !important;
  gap: 8px !important;
}
@media (max-width: 420px) {
  body #app #containerView .controls.compact-controls {
    grid-template-columns: 1.15fr 1fr 1fr !important;
    gap: 6px !important;
  }
}

/* Enlarge container artwork and realign physics bounds to the visible inner tank */
body #app #containerView #stage.stage {
  background-size: 112% 108% !important;
  background-position: center 48% !important;
}
body #app #plazaView #plazaStage.stage {
  background-size: 114% 108% !important;
  background-position: center 48% !important;
}
body #app #containerView #stage .blocks-layer {
  inset: 10.5% 5.8% 6.2% 5.8% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 10% 5.5% 6.4% 5.5% !important;
}
body #app #containerView #stage .empty-state {
  inset: 10.5% 5.8% 6.2% 5.8% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 10% 5.5% 6.4% 5.5% !important;
}
@media (max-width: 430px) {
  body #app #containerView #stage.stage {
    background-size: 114% 109% !important;
  }
  body #app #plazaView #plazaStage.stage {
    background-size: 116% 109% !important;
  }
  body #app #containerView #stage .blocks-layer {
    inset: 10.2% 5.2% 5.8% 5.2% !important;
  }
  body #app #plazaView #plazaStage .blocks-layer {
    inset: 9.8% 5% 6% 5% !important;
  }
}

/* Wider tank pass: match the marked red width and expand virtual bounds */
body #app #containerView #stage.stage {
  background-size: 126% 110% !important;
  background-position: center 48% !important;
}
body #app #plazaView #plazaStage.stage {
  background-size: 126% 110% !important;
  background-position: center 48% !important;
}
body #app #containerView #stage .blocks-layer {
  inset: 10.2% 2.4% 5.8% 2.4% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 9.8% 2.2% 6% 2.2% !important;
}
body #app #containerView #stage .empty-state {
  inset: 10.2% 2.4% 5.8% 2.4% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 9.8% 2.2% 6% 2.2% !important;
}
@media (max-width: 430px) {
  body #app #containerView #stage.stage {
    background-size: 128% 111% !important;
  }
  body #app #plazaView #plazaStage.stage {
    background-size: 128% 111% !important;
  }
  body #app #containerView #stage .blocks-layer {
    inset: 10% 2% 5.5% 2% !important;
  }
  body #app #plazaView #plazaStage .blocks-layer {
    inset: 9.6% 1.8% 5.8% 1.8% !important;
  }
}

/* Mothership tank needs extra width to match the marked frame */
body #app #plazaView #plazaStage.stage {
  background-size: 138% 112% !important;
  background-position: center 48% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 9.4% .8% 5.6% .8% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 9.4% .8% 5.6% .8% !important;
}
@media (max-width: 430px) {
  body #app #plazaView #plazaStage.stage {
    background-size: 140% 112% !important;
  }
  body #app #plazaView #plazaStage .blocks-layer {
    inset: 9.2% .5% 5.5% .5% !important;
  }
}

/* Symmetry correction: compensate transparent margins in tank PNG assets */
body #app #containerView #stage.stage {
  background-position: 47.2% 48% !important;
}
body #app #plazaView #plazaStage.stage {
  background-position: 48.2% 48% !important;
}
body #app #containerView #stage .blocks-layer {
  inset: 10% 3.4% 5.5% 1.2% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 9.2% 1.5% 5.5% .4% !important;
}
body #app #containerView #stage .empty-state {
  inset: 10% 3.4% 5.5% 1.2% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 9.2% 1.5% 5.5% .4% !important;
}
@media (max-width: 430px) {
  body #app #containerView #stage.stage {
    background-position: 46.8% 48% !important;
  }
  body #app #plazaView #plazaStage.stage {
    background-position: 48% 48% !important;
  }
  body #app #containerView #stage .blocks-layer {
    inset: 9.8% 3.2% 5.4% 1% !important;
  }
  body #app #plazaView #plazaStage .blocks-layer {
    inset: 9.1% 1.4% 5.4% .4% !important;
  }
}

/* Crystal membrane block style: clean sample cubes wrapped in a translucent film */
body #app .poop-block {
  border-radius: 30% !important;
  overflow: hidden !important;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.52) 0 16%, rgba(255,255,255,.12) 17% 38%, transparent 39% 100%),
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.82) 0 10%, rgba(255,255,255,.2) 11% 18%, transparent 19%),
    linear-gradient(180deg, rgba(255,255,255,.26), transparent 34%, rgba(0,0,0,.16) 100%) !important;
  background-blend-mode: screen, screen, multiply !important;
  border: 1px solid rgba(255,255,255,.46) !important;
  box-shadow:
    inset 2px 2px 4px rgba(255,255,255,.58),
    inset -6px -7px 10px rgba(38, 42, 19, .22),
    inset 0 0 0 3px rgba(255,255,255,.11),
    0 2px 3px rgba(64, 62, 34, .15),
    0 8px 14px rgba(64, 62, 34, .13) !important;
  filter: saturate(1.06) contrast(1.04) !important;
}
body #app .poop-block::before {
  content: "" !important;
  position: absolute !important;
  inset: 4px !important;
  border-radius: 24% !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 42%),
    linear-gradient(90deg, rgba(0,0,0,.10), transparent 18%, transparent 78%, rgba(0,0,0,.12)) !important;
  box-shadow:
    inset 2px 2px 4px rgba(255,255,255,.24),
    inset -4px -5px 7px rgba(0,0,0,.16) !important;
  pointer-events: none !important;
}
body #app .poop-block::after {
  content: "" !important;
  position: absolute !important;
  left: 5px !important;
  top: 5px !important;
  width: 12px !important;
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.62) !important;
  box-shadow:
    13px 16px 0 -5px rgba(255,255,255,.24),
    1px 1px 2px rgba(255,255,255,.35) !important;
  transform: rotate(-18deg) !important;
  pointer-events: none !important;
}
body #app .poop-block.wet::before,
body #app .poop-block.sticky::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0) 42%),
    linear-gradient(90deg, rgba(0,0,0,.08), transparent 18%, transparent 78%, rgba(0,0,0,.1)),
    radial-gradient(ellipse at 60% 78%, rgba(96, 219, 219, .34), transparent 38%) !important;
}
body #app .poop-block.dry {
  filter: saturate(.96) contrast(1.08) !important;
}
body #app .poop-block.bloody {
  background-image:
    linear-gradient(118deg, transparent 0 26%, rgba(177, 22, 31, .54) 29% 33%, transparent 36% 100%),
    linear-gradient(135deg, rgba(255,255,255,.52) 0 16%, rgba(255,255,255,.12) 17% 38%, transparent 39% 100%),
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.82) 0 10%, rgba(255,255,255,.2) 11% 18%, transparent 19%),
    linear-gradient(180deg, rgba(255,255,255,.26), transparent 34%, rgba(0,0,0,.16) 100%) !important;
}
body #app #plazaBlocksLayer .poop-block {
  border-radius: 30% !important;
  border-width: .5px !important;
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.52),
    inset -2px -2px 4px rgba(38, 42, 19, .24),
    0 1px 2px rgba(64, 62, 34, .14) !important;
}
body #app #plazaBlocksLayer .poop-block::before {
  display: block !important;
  inset: 2px !important;
  border-radius: 24% !important;
}
body #app #plazaBlocksLayer .poop-block::after {
  display: block !important;
  left: 2px !important;
  top: 2px !important;
  width: 5px !important;
  height: 3px !important;
  box-shadow: 5px 6px 0 -2px rgba(255,255,255,.18) !important;
}

/* Mothership mascot: centered translucent figure inside the ship page */
body #app #plazaView .plaza-panel {
  position: relative !important;
}
body #app #plazaView .plaza-panel > img.plaza-alien.alien-sticker {
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  top: 52% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(58vw, 250px) !important;
  height: min(58vw, 250px) !important;
  transform: translate(-50%, -50%) !important;
  opacity: .26 !important;
  z-index: 2 !important;
  object-fit: contain !important;
  pointer-events: none !important;
  filter:
    drop-shadow(0 18px 26px rgba(93, 128, 59, .16))
    drop-shadow(0 0 18px rgba(255,255,255,.78)) !important;
}
body #app #plazaView .mothership-notice-row,
body #app #plazaView .plaza-stats,
body #app #plazaView #plazaStage {
  position: relative !important;
  z-index: 3 !important;
}
@media (max-width: 430px) {
  body #app #plazaView .plaza-panel > img.plaza-alien.alien-sticker {
    width: 235px !important;
    height: 235px !important;
    top: 52% !important;
    opacity: .28 !important;
  }
}

/* Put the mothership mascot inside the tank, above glass background but below blocks */
body #app #plazaView #plazaStage.stage::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 49% !important;
  width: min(58vw, 245px) !important;
  height: min(58vw, 245px) !important;
  transform: translate(-50%, -50%) !important;
  background: url('./assets/mascot-mothership-center.png') center / contain no-repeat !important;
  opacity: .28 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  filter:
    drop-shadow(0 18px 26px rgba(93, 128, 59, .12))
    drop-shadow(0 0 18px rgba(255,255,255,.66)) !important;
}
body #app #plazaView #plazaStage .blocks-layer,
body #app #plazaView #plazaStage .empty-state {
  z-index: 2 !important;
}
body #app #plazaView .plaza-panel > img.plaza-alien.alien-sticker {
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  top: 52% !important;
  transform: translate(-50%, -50%) !important;
  width: min(62vw, 280px) !important;
  height: min(62vw, 280px) !important;
  opacity: .5 !important;
  z-index: 2 !important;
  object-fit: contain !important;
  pointer-events: none !important;
  filter:
    drop-shadow(0 18px 26px rgba(93, 128, 59, .12))
    drop-shadow(0 0 18px rgba(255,255,255,.66)) !important;
}
@media (max-width: 430px) {
  body #app #plazaView #plazaStage.stage::after {
    width: 232px !important;
    height: 232px !important;
    opacity: .3 !important;
  }
}

/* New container assets are already centered; reset old transparent-margin compensation */
body #app #containerView #stage.stage {
  background-position: 50% 48% !important;
  background-size: 128% 111% !important;
}
body #app #plazaView #plazaStage.stage {
  background-position: 50% 48% !important;
  background-size: 140% 112% !important;
}
body #app #containerView #stage .blocks-layer {
  inset: 9.8% 2.2% 5.4% 2.2% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 9.1% .8% 5.4% .8% !important;
}
body #app #containerView #stage .empty-state {
  inset: 9.8% 2.2% 5.4% 2.2% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 9.1% .8% 5.4% .8% !important;
}

/* Mothership center mascot scale-up */
body #app #plazaView #plazaStage.stage::after {
  width: min(87vw, 368px) !important;
  height: min(87vw, 368px) !important;
}
@media (max-width: 430px) {
  body #app #plazaView #plazaStage.stage::after {
    width: 348px !important;
    height: 348px !important;
  }
}

/* Profile page UI refresh: soft card settings instead of table rows */
body #app #profileView.active {
  background:
    radial-gradient(circle at 82% 2%, rgba(199, 231, 143, .42), transparent 28%),
    radial-gradient(circle at 14% 58%, rgba(255, 247, 211, .8), transparent 34%);
}
body #app #profileView .settings-page {
  width: min(640px, 100%) !important;
  margin: 0 auto !important;
}
body #app #profileView .profile-single.panel {
  padding: 18px !important;
  border-radius: 34px !important;
  background:
    radial-gradient(circle at 86% 4%, rgba(194, 230, 126, .34), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.68), rgba(248, 253, 232, .48)) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  box-shadow:
    14px 18px 42px rgba(105, 126, 76, .14),
    -10px -10px 26px rgba(255,255,255,.72),
    inset 1px 1px 0 rgba(255,255,255,.86) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
}
body #app #profileView .profile-login-row {
  min-height: 86px !important;
  margin: 0 0 14px !important;
  padding: 13px 14px !important;
  border: 0 !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.78), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(242, 249, 223, .42)) !important;
  box-shadow:
    9px 10px 24px rgba(105, 126, 76, .1),
    -7px -7px 18px rgba(255,255,255,.72),
    inset 1px 1px 0 rgba(255,255,255,.86) !important;
}
body #app #profileView .avatar-dot {
  width: 56px !important;
  height: 56px !important;
  border-radius: 22px !important;
  color: #49772d !important;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,.9), transparent 34%),
    linear-gradient(145deg, rgba(221, 243, 165, .94), rgba(188, 225, 106, .78)) !important;
  box-shadow:
    0 10px 20px rgba(119, 165, 70, .16),
    inset 1px 1px 0 rgba(255,255,255,.78),
    inset -8px -8px 18px rgba(100, 150, 54, .1) !important;
  font-size: 23px !important;
}
body #app #profileView .profile-login-row h2 {
  margin: 0 !important;
  font-size: 24px !important;
  letter-spacing: -.04em !important;
  color: #3a3328 !important;
}
body #app #profileView .profile-login-row .soft-btn {
  min-height: 48px !important;
  padding: 0 24px !important;
  border-radius: 999px !important;
  color: #3d382f !important;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.78), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(250, 252, 240, .5)) !important;
  box-shadow:
    7px 9px 18px rgba(105, 126, 76, .1),
    -5px -5px 14px rgba(255,255,255,.72),
    inset 1px 1px 0 rgba(255,255,255,.88) !important;
}
body #app #profileView .profile-settings-list {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 28px !important;
  background: rgba(255,255,255,.26) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.46) !important;
}
body #app #profileView .profile-settings-list div,
body #app #profileView .profile-settings-list .settings-toggle {
  min-height: 54px !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 20px !important;
  display: grid !important;
  grid-template-columns: 34px 1fr auto !important;
  align-items: center !important;
  gap: 10px !important;
  background:
    radial-gradient(circle at 14% 12%, rgba(255,255,255,.7), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.58), rgba(246, 251, 232, .34)) !important;
  box-shadow:
    6px 7px 16px rgba(105, 126, 76, .075),
    -4px -4px 12px rgba(255,255,255,.64),
    inset 1px 1px 0 rgba(255,255,255,.82) !important;
  font-weight: 850 !important;
}
body #app #profileView .profile-settings-list div::before,
body #app #profileView .profile-settings-list .settings-toggle::before {
  width: 30px !important;
  height: 30px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
  color: #6f9f42 !important;
  background: linear-gradient(145deg, rgba(223, 244, 174, .7), rgba(255,255,255,.52)) !important;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.78), 0 5px 10px rgba(112, 151, 79, .08) !important;
  font-size: 14px !important;
}
body #app #profileView .profile-settings-list div:nth-child(1)::before { content: "☁"; }
body #app #profileView .profile-settings-list div:nth-child(2)::before { content: "↥"; }
body #app #profileView .profile-settings-list div:nth-child(3)::before { content: "↧"; }
body #app #profileView .profile-settings-list div:nth-child(4)::before { content: "◐"; }
body #app #profileView .profile-settings-list div:nth-child(5)::before { content: "文"; }
body #app #profileView .profile-settings-list div:nth-child(6)::before { content: "⏱"; }
body #app #profileView .profile-settings-list .settings-toggle::before { content: "◎"; }
body #app #profileView .profile-settings-list div:nth-of-type(7)::before { content: "§"; }
body #app #profileView .profile-settings-list div:nth-of-type(8)::before { content: "✉"; }
body #app #profileView .profile-settings-list div:nth-of-type(9)::before { content: "↗"; }
body #app #profileView .profile-settings-list b {
  min-width: 0 !important;
  color: #42382d !important;
  font-size: 15px !important;
  letter-spacing: -.02em !important;
}
body #app #profileView .profile-settings-list span {
  color: rgba(110, 115, 103, .72) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}
body #app #profileView .settings-toggle input {
  width: 24px !important;
  height: 24px !important;
  accent-color: #84bc45 !important;
}
body #app #profileView .about-fold {
  margin: 0 0 12px !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 92% 12%, rgba(190, 226, 119, .28), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(247, 252, 232, .36)) !important;
  border: 1px solid rgba(255,255,255,.62) !important;
  box-shadow:
    7px 9px 22px rgba(105, 126, 76, .08),
    -5px -5px 14px rgba(255,255,255,.62),
    inset 1px 1px 0 rgba(255,255,255,.78) !important;
}
body #app #profileView .about-fold summary {
  min-height: 54px !important;
  padding: 0 15px !important;
}
body #app #profileView .about-fold summary span {
  min-width: 34px !important;
  height: 30px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(213, 239, 157, .58) !important;
  color: #5d803b !important;
  font-size: 12px !important;
}
body #app #profileView .about-fold summary b {
  font-size: 14px !important;
  color: #42382d !important;
}
body #app #profileView .about-copy {
  max-height: 300px !important;
  overflow-y: auto !important;
  padding: 0 16px 16px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
body #app #profileView .about-copy::-webkit-scrollbar {
  display: none !important;
}
@media (max-width: 430px) {
  body #app #profileView .profile-single.panel {
    padding: 14px !important;
    border-radius: 30px !important;
  }
  body #app #profileView .profile-login-row {
    min-height: 78px !important;
    padding: 11px 12px !important;
  }
  body #app #profileView .avatar-dot {
    width: 50px !important;
    height: 50px !important;
    border-radius: 20px !important;
  }
  body #app #profileView .profile-login-row h2 {
    font-size: 21px !important;
  }
  body #app #profileView .profile-login-row .soft-btn {
    min-height: 42px !important;
    padding: 0 19px !important;
  }
  body #app #profileView .profile-settings-list div,
  body #app #profileView .profile-settings-list .settings-toggle {
    min-height: 50px !important;
    border-radius: 18px !important;
  }
}

/* Profile clickability + sampling-page decorative language */
body #app #profileView .profile-single.panel::before,
body #app #profileView .profile-single.panel::after {
  pointer-events: none !important;
  z-index: 0 !important;
}
body #app #profileView .profile-alien.alien-sticker {
  opacity: .4 !important;
  right: -34px !important;
  top: -18px !important;
  width: 156px !important;
  height: 156px !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
body #app #statsView .stats-alien.alien-sticker {
  opacity: .4 !important;
}
body #app #profileView .about-fold,
body #app #profileView .profile-login-row,
body #app #profileView .profile-settings-list {
  position: relative !important;
  z-index: 3 !important;
  pointer-events: auto !important;
}
body #app #profileView .profile-settings-list .settings-action,
body #app #profileView .profile-settings-list .settings-toggle {
  cursor: pointer !important;
  color: inherit !important;
  text-align: left !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
body #app #profileView .profile-settings-list .settings-action:active,
body #app #profileView .profile-login-row .soft-btn:active {
  transform: translateY(1px) scale(.992) !important;
  filter: brightness(.99) !important;
}
body #app #profileView .profile-settings-list .settings-action:focus-visible,
body #app #profileView .profile-login-row .soft-btn:focus-visible,
body #app #profileView .about-fold summary:focus-visible {
  outline: 2px solid rgba(132, 188, 69, .45) !important;
  outline-offset: 2px !important;
}
body #app #profileView .profile-settings-list .settings-action {
  width: 100% !important;
}
body #app #profileView .profile-settings-list .settings-action::before,
body #app #profileView .profile-settings-list .settings-toggle::before {
  content: "·";
}
body #app #profileView .profile-settings-list .settings-action:nth-of-type(1)::before { content: "☁"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(2)::before { content: "↥"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(3)::before { content: "↧"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(4)::before { content: "×"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(5)::before { content: "◐"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(6)::before { content: "文"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(7)::before { content: "⏱"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(8)::before { content: "§"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(9)::before { content: "私"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(10)::before { content: "✉"; }
body #app #profileView .profile-settings-list .settings-action:nth-of-type(11)::before { content: "↗"; }
body #app #profileView .profile-settings-list .settings-toggle::before { content: "◎"; }

/* Container controls: soft glass pill buttons matching sampling page */
body #app #containerView .controls.compact-controls {
  margin-top: 12px !important;
  padding: 7px !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.74), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(247, 252, 232, .34)) !important;
  border: 1px solid rgba(255,255,255,.68) !important;
  box-shadow:
    9px 12px 28px rgba(105, 126, 76, .12),
    -7px -7px 18px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.84) !important;
}
body #app #containerView .controls.compact-controls button {
  min-height: 48px !important;
  border-radius: 22px !important;
  padding: 0 10px !important;
  color: #4a4235 !important;
  background:
    radial-gradient(circle at 22% 10%, rgba(255,255,255,.72), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.66), rgba(246, 250, 232, .42)) !important;
  border: 1px solid rgba(255,255,255,.62) !important;
  box-shadow:
    5px 7px 16px rgba(105, 126, 76, .08),
    -4px -4px 12px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.84) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
body #app #containerView .controls.compact-controls #shakeBtn {
  color: #f8ffeb !important;
  background:
    radial-gradient(circle at 82% 20%, rgba(255,255,255,.38), transparent 26%),
    linear-gradient(160deg, rgba(159, 216, 84, .94), rgba(91, 151, 46, .9)) !important;
  box-shadow:
    0 10px 22px rgba(111, 159, 66, .22),
    0 0 18px rgba(190, 232, 118, .28),
    inset 1px 1px 0 rgba(255,255,255,.52) !important;
}
body #app #containerView .controls.compact-controls button:active {
  transform: translateY(1px) scale(.992) !important;
}

/* Lightweight toast for settings actions */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px) scale(.98);
  z-index: 90;
  max-width: min(320px, calc(100% - 44px));
  padding: 10px 14px;
  border-radius: 999px;
  color: #425334;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.68);
  box-shadow: 0 14px 32px rgba(83,112,48,.16), inset 1px 1px 0 rgba(255,255,255,.84);
  backdrop-filter: blur(18px) saturate(1.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  font-size: 13px;
  font-weight: 850;
}
.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* Profile settings action buttons: full visual parity after converting rows to buttons */
body #app #profileView .profile-settings-list > .settings-action,
body #app #profileView .profile-settings-list > .settings-toggle {
  width: 100% !important;
  min-height: 54px !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  border: 1px solid rgba(255,255,255,.62) !important;
  border-radius: 20px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  justify-content: initial !important;
  align-items: center !important;
  gap: 10px !important;
  color: inherit !important;
  text-align: left !important;
  background:
    radial-gradient(circle at 14% 12%, rgba(255,255,255,.76), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(246, 251, 232, .38)) !important;
  box-shadow:
    6px 7px 16px rgba(105, 126, 76, .08),
    -4px -4px 12px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.86) !important;
  font: inherit !important;
  font-weight: 850 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  overflow: hidden !important;
}
body #app #profileView .profile-settings-list > .settings-action::before,
body #app #profileView .profile-settings-list > .settings-toggle::before {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
  color: #6f9f42 !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.86), transparent 32%),
    linear-gradient(145deg, rgba(223, 244, 174, .76), rgba(255,255,255,.56)) !important;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.82), 0 5px 10px rgba(112, 151, 79, .08) !important;
  font-size: 14px !important;
  line-height: 1 !important;
}
body #app #profileView .profile-settings-list > .settings-action b,
body #app #profileView .profile-settings-list > .settings-toggle b {
  grid-column: 2 !important;
  min-width: 0 !important;
  color: #42382d !important;
  font-size: 15px !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body #app #profileView .profile-settings-list > .settings-action span {
  grid-column: 3 !important;
  color: rgba(110, 115, 103, .72) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}
body #app #profileView .profile-settings-list > .clear-data-action::before {
  color: #9b493f !important;
  background: linear-gradient(145deg, rgba(244, 214, 204, .82), rgba(255,255,255,.58)) !important;
}
body #app #profileView .profile-settings-list > .clear-data-action b,
body #app #profileView .profile-settings-list > .clear-data-action span {
  color: #9b493f !important;
}
body #app #profileView .profile-settings-list > .settings-toggle input {
  grid-column: 3 !important;
  justify-self: end !important;
}
body #app #profileView .profile-settings-list > .settings-action:hover,
body #app #profileView .profile-settings-list > .settings-toggle:hover {
  background:
    radial-gradient(circle at 14% 12%, rgba(255,255,255,.82), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.7), rgba(246, 252, 229, .46)) !important;
}
@media (max-width: 430px) {
  body #app #profileView .profile-settings-list > .settings-action,
  body #app #profileView .profile-settings-list > .settings-toggle {
    min-height: 50px !important;
    border-radius: 18px !important;
    padding: 9px 11px !important;
  }
}

/* Tank scale trial: shrink both container artworks by about 10% and tighten bounds */
body #app #containerView #stage.stage {
  background-size: 115% 100% !important;
  background-position: 50% 49% !important;
}
body #app #plazaView #plazaStage.stage {
  background-size: 126% 101% !important;
  background-position: 50% 49% !important;
}
body #app #containerView #stage .blocks-layer {
  inset: 12.2% 7% 9% 7% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 11.4% 5.5% 8.8% 5.5% !important;
}
body #app #containerView #stage .empty-state {
  inset: 12.2% 7% 9% 7% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 11.4% 5.5% 8.8% 5.5% !important;
}

/* Stats report header: remove unused action, make it feel like an alien sample report */
body #app #statsView #calendarPanel .profile-title-row {
  grid-template-columns: 46px 1fr !important;
  gap: 10px !important;
  align-items: center !important;
}
body #app #statsView #calendarPanel .profile-title-row h2 {
  text-align: left !important;
  font-size: 24px !important;
  letter-spacing: -.04em !important;
}
body #app #statsView #calendarPanel .profile-title-row::after {
  content: "研究对象 · 地球人" !important;
  grid-column: 2 !important;
  margin-top: -8px !important;
  color: rgba(93, 128, 59, .62) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: .08em !important;
}
body #app #statsView #calendarPanel .round-btn {
  width: 42px !important;
  height: 42px !important;
  font-size: 22px !important;
}
body #app #statsView .profile-card > .kicker {
  color: rgba(93, 128, 59, .82) !important;
}

/* Stats report header polish after removing the unused arrow button */
body #app #statsView #calendarPanel .profile-title-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
  margin-bottom: 12px !important;
}
body #app #statsView #calendarPanel .profile-title-row h2 {
  text-align: left !important;
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1.05 !important;
  color: #3b3328 !important;
}
body #app #statsView #calendarPanel .profile-title-row::after {
  grid-column: 1 !important;
  margin-top: 0 !important;
  content: "研究对象 · 地球人" !important;
}
body #app #statsView #calendarPanel .round-btn {
  display: none !important;
}
body #app #statsView #calendarPanel.profile-calendar.collapsed .calendar-grid {
  display: none !important;
}
body #app #statsView #calendarPanel.profile-calendar:not(.collapsed) .calendar-grid {
  display: grid !important;
}

/* Personal container: align the playable bounds to the visible inner chamber marked by the red guide */
body #app #containerView #stage.stage {
  background-size: 115% 100% !important;
  background-position: 50% 49% !important;
}
body #app #containerView #stage .blocks-layer,
body #app #containerView #stage .empty-state {
  inset: 15.4% 11.2% 11.8% 10.8% !important;
}

/* Keep container actions visible and centered under the tank */
body #app #containerView .game-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
}
body #app #containerView #stage.stage {
  min-height: 0 !important;
  height: min(62vh, 560px) !important;
  max-height: calc(100vh - 230px) !important;
}
body #app #containerView .controls.compact-controls {
  width: min(100%, 430px) !important;
  margin: 4px auto 0 !important;
  display: grid !important;
  grid-template-columns: minmax(118px, 1.15fr) minmax(86px, .9fr) minmax(104px, .95fr) !important;
  align-items: center !important;
}
body #app #containerView .controls.compact-controls #shakeBtn {
  justify-self: stretch !important;
  text-align: center !important;
}
@media (max-width: 430px) {
  body #app #containerView .game-panel {
    gap: 6px !important;
  }
  body #app #containerView #stage.stage {
    height: min(60vh, 520px) !important;
    max-height: calc(100vh - 210px) !important;
  }
  body #app #containerView #stage .blocks-layer,
  body #app #containerView #stage .empty-state {
    inset: 15.2% 10.8% 11.6% 10.6% !important;
  }
  body #app #containerView .controls.compact-controls {
    grid-template-columns: 1.08fr .82fr .94fr !important;
    max-width: 390px !important;
    margin-top: 2px !important;
  }
  body #app #containerView .controls.compact-controls button {
    min-height: 42px !important;
    font-size: 13px !important;
  }
}

/* Put the primary shake action in the visual center of the container controls */
body #app #containerView .controls.compact-controls #compactBtn {
  order: 1 !important;
}
body #app #containerView .controls.compact-controls #shakeBtn {
  order: 2 !important;
}
body #app #containerView .controls.compact-controls #saveShotBtn {
  order: 3 !important;
}

/* Mothership chamber: smaller particles and a bottom-heavy rounded playable mask */
body #app #plazaView #plazaStage .blocks-layer,
body #app #plazaView #plazaStage .empty-state {
  inset: 10.4% 7.8% 10.8% 7.6% !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  overflow: hidden !important;
  border-radius: 4.5% 4.5% 14% 14% / 5.5% 5.5% 18% 18% !important;
  clip-path: inset(0 round 4.5% 4.5% 14% 14%) !important;
}
body #app #plazaView #plazaBlocksLayer .poop-block {
  border-radius: 3px !important;
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.36),
    inset -2px -2px 3px rgba(0,0,0,.16),
    0 1px 3px rgba(50,24,8,.11) !important;
}
body #app #plazaView #plazaBlocksLayer .poop-block::before {
  inset: 1px !important;
  border-radius: 3px !important;
}
body #app #plazaView #plazaBlocksLayer .poop-block::after {
  width: 3px !important;
  height: 2px !important;
  left: 2px !important;
  top: 2px !important;
  border-radius: 999px !important;
}
@media (max-width: 430px) {
  body #app #plazaView #plazaStage .blocks-layer,
  body #app #plazaView #plazaStage .empty-state {
    inset: 10.2% 7.4% 10.6% 7.2% !important;
  }
}

/* Mothership shake control and stepped chamber mask */
body #app #plazaView .plaza-controls {
  order: 4 !important;
  width: min(210px, 54%) !important;
  margin: 8px auto 0 !important;
  padding: 6px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.74), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.54), rgba(247, 252, 232, .34)) !important;
  border: 1px solid rgba(255,255,255,.68) !important;
  box-shadow:
    9px 12px 28px rgba(105, 126, 76, .12),
    -7px -7px 18px rgba(255,255,255,.68),
    inset 1px 1px 0 rgba(255,255,255,.84) !important;
}
body #app #plazaView .plaza-controls #plazaShakeBtn {
  min-height: 42px !important;
  border-radius: 999px !important;
  color: #f8ffeb !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-align: center !important;
  background:
    radial-gradient(circle at 82% 20%, rgba(255,255,255,.38), transparent 26%),
    linear-gradient(160deg, rgba(159, 216, 84, .94), rgba(91, 151, 46, .9)) !important;
  border: 1px solid rgba(255,255,255,.62) !important;
  box-shadow:
    0 10px 22px rgba(111, 159, 66, .22),
    0 0 18px rgba(190, 232, 118, .28),
    inset 1px 1px 0 rgba(255,255,255,.52) !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  border-radius: 0 !important;
  clip-path: polygon(
    1% 0,
    99% 0,
    99% 82%,
    97% 82%,
    97% 90%,
    94% 90%,
    94% 100%,
    6% 100%,
    6% 90%,
    3% 90%,
    3% 82%,
    1% 82%
  ) !important;
}
@media (max-width: 430px) {
  body #app #plazaView .plaza-controls {
    width: min(190px, 58%) !important;
    margin-top: 6px !important;
  }
  body #app #plazaView .plaza-controls #plazaShakeBtn {
    min-height: 40px !important;
    font-size: 13px !important;
  }
}

/* Keep mothership ticker, tank and shake button in normal flow */
body #app #plazaView .plaza-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
}
body #app #plazaView .mothership-notice-row {
  flex: 0 0 auto !important;
}
body #app #plazaView #plazaStage.stage {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: min(62vh, 560px) !important;
  max-height: calc(100vh - 240px) !important;
}
@media (max-width: 430px) {
  body #app #plazaView #plazaStage.stage {
    height: min(60vh, 520px) !important;
    max-height: calc(100vh - 222px) !important;
  }
}


/* App shell consistency: keep every main page on the same visual width */
:root {
  --app-shell-width: 430px;
  --app-shell-gutter: 16px;
}
body #app {
  width: min(var(--app-shell-width), calc(100% - var(--app-shell-gutter))) !important;
  max-width: var(--app-shell-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body #app .view.active,
body #app #recordView.active,
body #app #containerView.active,
body #app #plazaView.active,
body #app #statsView.active,
body #app #profileView.active {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
body #app #recordView .main-recorder,
body #app #containerView .game-panel,
body #app #plazaView .plaza-panel,
body #app #statsView .profile-grid,
body #app #profileView .profile-grid,
body #app #statsView .profile-card,
body #app #profileView .profile-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
body #app .sample-top-row,
body #app .mothership-notice-row,
body #app .bottom-tabs {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
body #app .bottom-tabs {
  width: min(var(--app-shell-width), calc(100% - 18px)) !important;
}
@media (min-width: 760px) {
  :root {
    --app-shell-width: 430px;
    --app-shell-gutter: 24px;
  }
}
@media (max-width: 390px) {
  :root {
    --app-shell-gutter: 12px;
  }
}

/* Final mothership redesign: CSS-only ship shell + stable single-row bulletin */
body #app #plazaView .plaza-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  position: relative !important;
  overflow: hidden !important;
  padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
}

body #app #plazaView .plaza-panel > img.plaza-alien.alien-sticker {
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  top: 52% !important;
  transform: translate(-50%, -50%) !important;
  width: min(58vw, 250px) !important;
  height: min(58vw, 250px) !important;
  opacity: .4 !important;
  z-index: 2 !important;
  object-fit: contain !important;
  pointer-events: none !important;
  filter:
    drop-shadow(0 18px 26px rgba(93, 128, 59, .12))
    drop-shadow(0 0 18px rgba(255,255,255,.66)) !important;
}

body #app #plazaView .mothership-notice-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  margin-bottom: 0 !important;
  padding: 0 2px 6px !important;
}

body #app #plazaView .mothership-notice-row .kicker {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

body #app #plazaView .mothership-notice-row .ticker-feed {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body #app #plazaView #plazaStage.stage {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, rgba(220, 255, 246, .28), rgba(173, 219, 207, .18)),
    repeating-linear-gradient(
      90deg,
      rgba(161, 225, 213, .08) 0 2px,
      rgba(134, 198, 186, .04) 2px 8px
    ),
    linear-gradient(180deg, #cfece3 0%, #9ac4b8 44%, #6f9c92 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -22px 32px rgba(26, 63, 57, .18),
    0 16px 34px rgba(34, 72, 66, .2) !important;
  border: 2px solid rgba(225, 255, 249, .54) !important;
}

body #app #plazaView #plazaStage.stage::before {
  content: "" !important;
  position: absolute !important;
  inset: 9px !important;
  border-radius: 0 !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.24) 0 12%, transparent 12% 72%, rgba(255,255,255,.16) 72% 100%),
    linear-gradient(180deg, rgba(109, 154, 146, .3), rgba(77, 116, 109, .28));
  border: 1px solid rgba(217, 255, 248, .34) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -12px 18px rgba(22, 47, 44, .18) !important;
  pointer-events: none !important;
}

body #app #plazaView #plazaStage.stage::after {
  display: none !important;
}

body #app #plazaView #plazaStage .stage-glow,
body #app #plazaView #plazaStage .rim {
  display: none !important;
}

body #app #plazaView #plazaStage .blocks-layer,
body #app #plazaView #plazaStage .empty-state {
  z-index: 2 !important;
}

body #app #plazaView #plazaStage .blocks-layer {
  inset: 10% 2% 5.8% 2% !important;
}

body #app #plazaView #plazaStage .empty-state {
  inset: 10% 2% 5.8% 2% !important;
}

body #app #plazaView .plaza-stats {
  display: grid !important;
  z-index: 3 !important;
}

@media (max-width: 430px) {
  body #app #plazaView .plaza-panel > img.plaza-alien.alien-sticker {
    width: 255px !important;
    height: 255px !important;
    opacity: .5 !important;
  }
  body #app #plazaView .mothership-notice-row {
    gap: 7px !important;
  }
  body #app #plazaView .mothership-notice-row .kicker {
    font-size: 15px !important;
  }
  body #app #plazaView #plazaStage.stage::before {
    inset: 8px !important;
  }
}

/* Final sampling footer layout: submit first, sync directly below, other conditions open by default */
body #app #recordView .main-recorder > #addBtn.submit-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  order: 90 !important;
  width: min(286px, 76%) !important;
  min-height: 48px !important;
  margin: 8px auto 0 !important;
  padding: 0 18px !important;
  line-height: 1 !important;
  text-align: center !important;
  position: relative !important;
  transform: translateY(-6px) !important;
  z-index: 8 !important;
}

body #app #recordView .main-recorder > .record-public-row {
  order: 91 !important;
  width: max-content !important;
  min-width: 138px !important;
  max-width: 76% !important;
  min-height: 34px !important;
  margin: 0 auto 0 !important;
  padding: 6px 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  align-self: center !important;
  position: relative !important;
  transform: translateY(-4px) !important;
  z-index: 8 !important;
  border-radius: 999px !important;
  background: rgba(255, 253, 240, .58) !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 8px 18px rgba(141, 151, 95, .13) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: rgba(86, 100, 62, .84) !important;
}

body #app #recordView .main-recorder > .record-public-row input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  accent-color: #8fb766 !important;
}

body #app #recordView.condition-open .condition-scroll {
  height: 132px !important;
  max-height: 132px !important;
}

@media (max-height: 760px) {
  body #app #recordView.condition-open .condition-scroll {
    height: 112px !important;
    max-height: 112px !important;
  }
  body #app #recordView .main-recorder > #addBtn.submit-btn {
    min-height: 44px !important;
    margin-top: 6px !important;
    transform: translateY(-4px) !important;
  }
  body #app #recordView .main-recorder > .record-public-row {
    min-height: 32px !important;
    transform: translateY(-3px) !important;
  }
}

/* Mothership: revert to previous image design and square bottom corners */
body #app #plazaView #plazaStage.stage {
  border: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
  background-image: url('./assets/container-mothership.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 100% 100% !important;
  border-radius: 28px 28px 0 0 !important;
}
body #app #plazaView #plazaStage.stage::before,
body #app #plazaView #plazaStage.stage::after,
body #app #plazaView #plazaStage .stage-glow,
body #app #plazaView #plazaStage .rim {
  display: none !important;
}
body #app #plazaView #plazaStage .blocks-layer {
  inset: 11% 8% 8% 8% !important;
}
body #app #plazaView #plazaStage .empty-state {
  inset: 12% 8% 8% 8% !important;
}

/* Keep mothership sync centered under submit in normal block flow */
body #app #recordView .main-recorder > label.record-public-row {
  display: flex !important;
  width: 138px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: auto !important;
  right: auto !important;
}

body #app #recordView .main-recorder > button#addBtn.submit-btn {
  left: auto !important;
  right: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Sampling footer v2: restore original CTA feel, keep sync under it with a softer non-check marker */
body #app #recordView .main-recorder > button#addBtn.submit-btn {
  display: grid !important;
  grid-template-columns: 1fr 34px !important;
  align-items: center !important;
  justify-items: center !important;
  order: 90 !important;
  width: auto !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding-left: 50px !important;
  padding-right: 12px !important;
  position: absolute !important;
  inset: auto 12px 72px !important;
  transform: none !important;
  z-index: 14 !important;
  text-align: center !important;
}

body #app #recordView .main-recorder > button#addBtn.submit-btn::after {
  position: static !important;
  transform: none !important;
  grid-column: 2 !important;
}

body #app #recordView .main-recorder > label.record-public-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 3px 10px !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  z-index: 14 !important;
  border-radius: 999px !important;
  background: rgba(255, 253, 240, .42) !important;
  border: 1px solid rgba(255, 255, 255, .58) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.66), 0 6px 14px rgba(118, 136, 75, .08) !important;
  color: rgba(79, 97, 54, .7) !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
}

body #app #recordView .main-recorder > label.record-public-row input {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(119, 143, 82, .36) !important;
  background: rgba(255, 255, 255, .7) !important;
  box-shadow: inset 0 1px 2px rgba(74, 91, 50, .08) !important;
  display: inline-grid !important;
  place-items: center !important;
}

body #app #recordView .main-recorder > label.record-public-row input:checked {
  border-color: rgba(122, 164, 72, .62) !important;
  background: radial-gradient(circle at 50% 50%, #7fae4b 0 38%, rgba(255,255,255,.82) 42% 100%) !important;
}

body #app #recordView .main-recorder > label.record-public-row input:checked::before {
  content: "" !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: #fff9dc !important;
  box-shadow: 0 0 6px rgba(255, 255, 225, .9) !important;
}

/* Alien-style sync marker: tiny mothership with two antennae when selected */
body #app #recordView .main-recorder > label.record-public-row input {
  position: relative !important;
  overflow: visible !important;
  border-radius: 999px 999px 7px 7px !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease !important;
}

body #app #recordView .main-recorder > label.record-public-row input:checked {
  width: 18px !important;
  height: 14px !important;
  border-radius: 999px 999px 8px 8px !important;
  border-color: rgba(105, 145, 61, .52) !important;
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,235,.95) 0 14%, transparent 16%),
    linear-gradient(180deg, #9dc76b 0%, #719b42 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 0 10px rgba(142, 184, 83, .32),
    0 3px 7px rgba(89, 112, 57, .14) !important;
  transform: translateY(1px) !important;
}

body #app #recordView .main-recorder > label.record-public-row input:checked::before,
body #app #recordView .main-recorder > label.record-public-row input:checked::after {
  content: "" !important;
  position: absolute !important;
  top: -5px !important;
  width: 6px !important;
  height: 6px !important;
  border-top: 1.5px solid rgba(111, 144, 72, .78) !important;
  background: transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body #app #recordView .main-recorder > label.record-public-row input:checked::before {
  left: -2px !important;
  transform: rotate(-34deg) !important;
}

body #app #recordView .main-recorder > label.record-public-row input:checked::after {
  right: -2px !important;
  transform: rotate(34deg) !important;
}

/* Mothership final lock: use image skin and remove bottom corner radius */
body #app #plazaView #plazaStage.stage {
  background-image: url('./assets/container-mothership.png') !important;
  background-size: 138% 112% !important;
  background-position: 48.2% 48% !important;
  border-radius: 28px 28px 0 0 !important;
}

/* Mobile polish: switch pages and condition tags without placeholder flicker */
body #app .view.active {
  animation: none !important;
}

body #app #recordView.condition-open .condition-tags,
body #app #recordView.condition-open .condition-scroll {
  animation: none !important;
}

body #app #recordView .condition-tags,
body #app #recordView .condition-scroll,
body #app #recordView .condition-scroll .text-tag {
  backface-visibility: hidden !important;
  transform: translateZ(0) !important;
}

body #app #recordView .condition-scroll {
  contain: paint !important;
}

/* Mothership one-screen app layout: stretch tall phones, compact short phones, no extra scroll */
body[data-active-view="plaza"] {
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

body[data-active-view="plaza"] #app {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  padding-top: clamp(8px, 1.7vh, 18px) !important;
  padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body[data-active-view="plaza"] #app .hero {
  display: none !important;
}

body[data-active-view="plaza"] #app #plazaView.active {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  overflow: hidden !important;
}

body[data-active-view="plaza"] #app #plazaView .plaza-panel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: clamp(7px, 1.35vh, 15px) !important;
  padding: clamp(12px, 2vh, 18px) !important;
  padding-bottom: clamp(12px, 1.8vh, 18px) !important;
  overflow: hidden !important;
}

body[data-active-view="plaza"] #app #plazaView .mothership-notice-row,
body[data-active-view="plaza"] #app #plazaView .plaza-stats,
body[data-active-view="plaza"] #app #plazaView .plaza-controls {
  flex: 0 0 auto !important;
}

body[data-active-view="plaza"] #app #plazaView #plazaStage.stage {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

@media (max-height: 740px) {
  body[data-active-view="plaza"] #app {
    padding-top: 6px !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }

  body[data-active-view="plaza"] #app #plazaView .plaza-panel {
    gap: 6px !important;
    padding: 10px !important;
  }

  body[data-active-view="plaza"] #app #plazaView .mothership-notice-row {
    padding-bottom: 2px !important;
  }

  body[data-active-view="plaza"] #app #plazaView .plaza-stats {
    display: none !important;
  }

  body[data-active-view="plaza"] #app #plazaView .plaza-controls {
    margin-top: 0 !important;
  }
}

@media (min-height: 820px) {
  body[data-active-view="plaza"] #app #plazaView .plaza-panel {
    gap: clamp(12px, 2vh, 22px) !important;
    padding-top: clamp(16px, 2.5vh, 24px) !important;
    padding-bottom: clamp(16px, 2.2vh, 24px) !important;
  }
}

#recordView #volumeHint {
  display: none !important;
}

/* ===== Checkpoint 4: focus-visible, group titles, safe-area ===== */

/* Visible keyboard focus for all interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
label:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(132, 188, 69, .5) !important;
  outline-offset: 2px !important;
}

/* Profile settings group titles */
.settings-group-title {
  margin: 14px 0 4px !important;
  padding: 0 2px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #8a9a6a !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
}
.settings-group-title:first-child {
  margin-top: 4px !important;
}

/* Prevent horizontal overflow at narrow viewports */
@media (max-width: 430px) {
  #app { overflow-x: hidden; }
  .condition-toggle { max-width: 100% !important; }
  .range-tabs { max-width: 100% !important; }
}

/* ===== L03: History, Filter, Migration & Recovery ===== */

/* History panel - visible by default */
#statsView .history-panel {
  display: block;
  margin-top: 12px;
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

/* History summary row (compact mode) */
.history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 43, 22, .08);
  font-size: 13px;
  color: var(--muted);
}

/* View-all and collapse buttons */
.history-view-all-btn,
.history-collapse-btn,
.history-back-btn {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 250, 240, .72);
  color: #5b422e;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(74, 43, 22, .1);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.history-view-all-btn:hover,
.history-collapse-btn:hover,
.history-back-btn:hover {
  background: rgba(240, 223, 192, .8);
}

/* Filter controls */
.history-filter-controls {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(98, 132, 62, .14);
}
.history-filter-controls input[type="date"] {
  min-width: 0;
  height: 36px;
  border: 1px solid rgba(74, 43, 22, .15);
  border-radius: 12px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #4a3b2b;
  background: rgba(255, 255, 255, .8);
}
.filter-sep {
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}
.history-clear-filter {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(244, 223, 187, .68);
  color: #7a6048;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.history-clear-filter:hover {
  background: rgba(230, 200, 160, .7);
}

/* History card - clickable */
.history-card {
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.history-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(72, 45, 21, .14);
}
.history-card:focus-visible {
  outline: 2px solid rgba(132, 188, 69, .5);
  outline-offset: 2px;
}
.history-card:active {
  transform: translateY(1px) scale(.99);
}

/* Record meta badges */
.record-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.record-meta time {
  font-size: 12px;
  color: var(--muted);
}
.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(244, 223, 187, .72);
  color: #8a6043;
}
.tag-badge.public {
  background: rgba(111, 158, 69, .16);
  color: #497128;
}

/* History detail card */
.history-detail-slot {
  display: none;
  margin-bottom: 12px;
}
.history-detail-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(98, 132, 62, .14);
  box-shadow: 0 12px 28px rgba(78, 111, 43, .1);
}
.record-swatch.large {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: inset -8px -8px 0 rgba(0, 0, 0, .12);
}
.detail-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.detail-info p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #5a4a35;
}
.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-actions .soft-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}
.detail-actions .danger-btn {
  background: rgba(196, 69, 54, .12);
  color: #9b2c20;
}

/* Pagination */
.history-pagination-slot {
  margin-top: 8px;
}
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
}
.history-page-btn {
  min-width: 36px;
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(74, 43, 22, .12);
  background: rgba(255, 255, 255, .8);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  color: #5b422e;
}
.history-page-btn:disabled {
  opacity: .4;
  cursor: default;
}
.history-page-btn:not(:disabled):hover {
  background: rgba(240, 223, 192, .7);
}
.history-page-info {
  font-size: 13px;
  font-weight: 900;
  color: #7a6048;
}

/* Migration / Recovery notice */
.migration-notice {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 250, 240, .94), rgba(255, 244, 218, .88));
  border: 1px solid rgba(218, 165, 32, .28);
  box-shadow: 0 12px 28px rgba(180, 140, 40, .12);
}
.migration-notice h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #5b422e;
}
.migration-notice p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #604733;
}
.migration-notice a {
  color: var(--green-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.migration-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.migration-actions .primary-btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
}
.migration-actions .soft-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
}
.recovery-notice {
  border-color: rgba(196, 69, 54, .22);
  background: linear-gradient(180deg, rgba(255, 244, 238, .94), rgba(255, 235, 225, .88));
}
.recovery-notice h3 {
  color: #9b2c20;
}

/* Custom range inputs in stats view */
.custom-range-inputs {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(98, 132, 62, .14);
}
.custom-range-inputs input[type="date"] {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(74, 43, 22, .15);
  border-radius: 12px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #4a3b2b;
  background: rgba(255, 255, 255, .8);
}
.range-sep {
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}

/* Responsive: history panel */
@media (max-width: 760px) {
  #statsView .history-panel {
    max-height: 50vh;
    padding: 12px;
  }
  .history-detail-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .record-swatch.large {
    width: 40px;
    height: 40px;
  }
  .detail-actions {
    flex-direction: row;
  }
  .history-filter-controls {
    padding: 8px 10px;
    gap: 6px;
  }
  .history-filter-controls input[type="date"] {
    flex: 1;
    min-width: 100px;
    height: 34px;
    font-size: 12px;
  }
  .custom-range-inputs {
    padding: 8px 10px;
    gap: 6px;
  }
  .custom-range-inputs input[type="date"] {
    flex: 1;
    min-width: 100px;
    height: 34px;
    font-size: 12px;
  }
}
@media (max-width: 420px) {
  .history-summary {
    flex-direction: column;
    gap: 6px;
  }
  .history-detail-card {
    padding: 12px;
  }
  .migration-notice {
    padding: 14px;
  }
  .migration-actions {
    flex-direction: column;
    gap: 8px;
  }
}

.support-notice { margin: 8px 2px 2px; padding: 10px 12px; border-radius: 14px; background: rgba(74, 43, 22, .06); color: var(--muted); font-size: 13px; line-height: 1.55; }
.support-notice p { margin: 0 0 6px; }
.support-notice p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) {
  .view.active { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== Checkpoint 5: 触控目标补足（主要交互控件 ≥44px；L06 AC02）===== */
body #app .primary-btn,
body #app .soft-btn,
body #app .ghost-btn,
body #app .danger-btn,
body #app .history-view-all-btn,
body #app #palette .color-summary,
body #app #metricSwitch button {
  min-height: 44px;
}

/* 容器页/母舰页主操作按钮（局部规则特异性更高，单独列出） */
body #app #containerView #shakeBtn,
body #app #containerView #compactBtn,
body #app #containerView #saveShotBtn,
body #app #plazaView #plazaShakeBtn {
  min-height: 44px !important;
}

/* 母舰页摇一摇主按钮：覆盖窄屏 40px 局部规则，保证 390 宽下 ≥44px */
body #app #plazaView .plaza-controls #plazaShakeBtn {
  min-height: 44px !important;
}

/* ===== UI-A1: Sampling page four-step visual hierarchy ===== */

.step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 1000;
  color: #355d2a;
  letter-spacing: .01em;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(160deg, #6fa43c, #416b22);
  color: #f5ffe0;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(71,104,33,.22);
}
#recordView .step-label {
  position: relative;
  z-index: 2;
}
#recordView .record-step-group {
  display: grid;
  gap: 6px;
}

/* Smoothness and duration icons */
#metricSwitch button .smooth-icon,
#metricSwitch button .duration-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
}
#metricSwitch button .smooth-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 14px;
  height: 8px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 50% 50%;
}
#metricSwitch button .duration-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid currentColor;
}
#metricSwitch button .duration-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 1px;
  height: 5px;
  background: currentColor;
  transform-origin: bottom;
}

@media (max-width: 760px) {
  .step-label {
    font-size: 14px;
    gap: 6px;
    margin: 4px 0 3px;
  }
  .step-num {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  #metricSwitch button .smooth-icon,
  #metricSwitch button .duration-icon {
    width: 16px;
    height: 16px;
  }
  #metricSwitch button .smooth-icon::before {
    left: 1px;
    top: 4px;
    width: 12px;
    height: 7px;
    border-width: 2px;
  }
  #metricSwitch button .duration-icon::before {
    left: 2px;
    top: 1px;
    width: 10px;
    height: 10px;
    border-width: 2px;
  }
  #metricSwitch button .duration-icon::after {
    left: 6px;
    top: 3px;
    width: 1px;
    height: 4px;
  }
}

@media (min-width: 761px) {
  body #app #recordView .main-recorder {
    height: min(calc(100svh - 94px), 820px);
  }
}

/* Expanded conditions need real document flow: the fixed one-screen footer otherwise
   paints over the scroll tray and makes its last row impossible to reach. */
body #app #recordView.condition-open .main-recorder {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 16px !important;
}
body #app #recordView.condition-open .main-recorder > .record-grid {
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
}
body #app #recordView.condition-open .main-recorder > button#addBtn.submit-btn {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  margin: 10px 12px 0 !important;
}
body #app #recordView.condition-open .main-recorder > label.record-public-row {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  margin: 4px auto 0 !important;
}

/* ===== UI-A3B.O003.CONTAINER.GEOMETRY =====
   Final override for the Owner-selected O003 family. Keep the artwork aspect
   ratio intact and align the DOM physics layers with the visible flat cavity. */
body #app #containerView #stage.stage {
  background-size: contain !important;
  background-position: center center !important;
  border-radius: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 390 / 523;
}
body #app #plazaView #plazaStage.stage {
  background-size: contain !important;
  background-position: center center !important;
  border-radius: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 372 / 528;
}
body #app #containerView #stage .blocks-layer,
body #app #containerView #stage .empty-state {
  inset: 21% 32.5% 27.5% 32.5% !important;
}
body #app #plazaView #plazaStage .blocks-layer,
body #app #plazaView #plazaStage .empty-state {
  inset: 19.5% 29% 26.5% 29% !important;
}

/* ===== UI-A4.MOBILE.LAYOUT =====
   Final mobile layout contract: aligned sampling controls, a stable footer,
   and viewport-filling O003 chambers without stretching their artwork. */
#recordView .amount-slider-card {
  display: grid !important;
  grid-template-rows: auto 24px !important;
  align-content: center !important;
  gap: 0 !important;
  min-height: 54px !important;
  height: 54px !important;
  padding: 3px 14px 12px !important;
}
#recordView .amount-slider-card .amount-slider-value {
  align-self: end !important;
  margin-bottom: -1px !important;
}
#recordView .amount-slider-card input[type="range"] {
  align-self: start !important;
  height: 24px !important;
  padding: 7px 0 !important;
  transform: translateY(-10px) !important;
}

#recordView .shared-metric-panel .metric-switch button {
  grid-template-columns: 28px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 7px !important;
  row-gap: 1px !important;
  align-items: center !important;
  justify-items: start !important;
  text-align: left !important;
  padding: 6px 8px !important;
}
#recordView .shared-metric-panel .metric-switch button .metric-icon {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  justify-self: center !important;
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 3px 5px rgba(91, 116, 54, .14)) !important;
}
#recordView .shared-metric-panel .metric-switch button span,
#recordView .shared-metric-panel .metric-switch button b {
  grid-column: 2 !important;
  justify-self: start !important;
  text-align: left !important;
}

body #app #recordView.condition-open .main-recorder {
  height: min(calc(100svh - 94px), 820px) !important;
  max-height: 820px !important;
  overflow: hidden !important;
  padding-bottom: 66px !important;
}
body #app #recordView.condition-open .main-recorder > .record-grid {
  max-height: calc(100% - 112px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding-bottom: 4px !important;
}
body #app #recordView.condition-open .main-recorder > button#addBtn.submit-btn {
  position: absolute !important;
  inset: auto 12px 72px !important;
  width: auto !important;
  margin: 0 !important;
  transform: none !important;
}
body #app #recordView.condition-open .main-recorder > label.record-public-row {
  position: absolute !important;
  inset: auto auto 14px 50% !important;
  width: max-content !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
}
body #app #recordView.condition-open .condition-scroll {
  height: 60px !important;
  max-height: 60px !important;
}
@media (max-width: 430px) {
  body #app #recordView.condition-open .main-recorder {
    height: min(calc(100svh - 92px), 744px) !important;
    max-height: 744px !important;
  }
}

body[data-active-view="container"],
body[data-active-view="plaza"] {
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
body[data-active-view="container"] #app,
body[data-active-view="plaza"] #app {
  width: min(430px, 100%) !important;
  max-width: 430px !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 6px 0 calc(88px + env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
body[data-active-view="container"] #app .hero,
body[data-active-view="plaza"] #app .hero {
  display: none !important;
}
body[data-active-view="container"] #app #containerView.active,
body[data-active-view="plaza"] #app #plazaView.active {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  overflow: hidden !important;
}
body[data-active-view="container"] #app #containerView .game-panel,
body[data-active-view="plaza"] #app #plazaView .plaza-panel {
  position: relative !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 6px 2px !important;
  gap: 2px !important;
  overflow: hidden !important;
}
body[data-active-view="container"] #app #containerView .game-panel {
  display: flex !important;
  flex-direction: column !important;
}
body[data-active-view="container"] #app #containerView .container-top-row,
body[data-active-view="plaza"] #app #plazaView .mothership-notice-row {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 12px 4px !important;
  position: relative !important;
  z-index: 8 !important;
}
body[data-active-view="container"] #app #containerView #stage.stage,
body[data-active-view="plaza"] #app #plazaView #plazaStage.stage {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background-size: 140% auto !important;
  background-position: center center !important;
}
body[data-active-view="container"] #app #containerView .controls.compact-controls,
body[data-active-view="plaza"] #app #plazaView .controls.plaza-controls {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  z-index: 10 !important;
  margin: 0 !important;
  padding: 5px !important;
  background: rgba(255, 255, 244, .68) !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(85, 115, 50, .18), inset 0 1px 0 rgba(255,255,255,.9) !important;
  backdrop-filter: blur(12px) !important;
}
body[data-active-view="container"] #app #containerView .controls.compact-controls {
  width: min(342px, calc(100% - 32px)) !important;
  grid-template-columns: 1fr 1.1fr 1fr !important;
}
body[data-active-view="plaza"] #app #plazaView .controls.plaza-controls {
  width: min(168px, 46%) !important;
}
body[data-active-view="plaza"] #app #plazaView .plaza-stats {
  position: absolute !important;
  top: 45px !important;
  left: 14px !important;
  right: 14px !important;
  z-index: 8 !important;
  pointer-events: none !important;
}
body #app #containerView #stage .blocks-layer,
body #app #containerView #stage .empty-state {
  inset: 14% 23.5% 25% 23.5% !important;
}
body #app #plazaView #plazaStage .blocks-layer,
body #app #plazaView #plazaStage .empty-state {
  inset: 13% 23% 20% 23% !important;
}

@media (max-height: 700px) {
  body[data-active-view="container"] #app,
  body[data-active-view="plaza"] #app {
    padding-top: 3px !important;
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
  body[data-active-view="container"] #app #containerView .container-top-row,
  body[data-active-view="plaza"] #app #plazaView .mothership-notice-row {
    padding-bottom: 2px !important;
  }
  body[data-active-view="container"] #app #containerView .controls.compact-controls,
  body[data-active-view="plaza"] #app #plazaView .controls.plaza-controls {
    bottom: 8px !important;
  }
}

/* ===== UI-A5.COMPACT.SUBMIT =====
   Merge the local mothership consent into the primary submit capsule and use
   the recovered vertical space for a clearly scrollable, two-row condition tray. */
body #app #recordView .main-recorder {
  padding-bottom: 76px !important;
}
body #app #recordView.condition-open .main-recorder > .record-grid {
  max-height: calc(100% - 78px) !important;
}
body #app #recordView .main-recorder > .submit-dock {
  position: absolute !important;
  inset: auto 12px 12px !important;
  z-index: 14 !important;
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 132px !important;
  align-items: stretch !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #83b74d, #a9d568) !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  box-shadow: 0 14px 28px rgba(91, 139, 52, .24), inset 0 1px 0 rgba(255,255,255,.62) !important;
}
body #app #recordView .submit-dock > #addBtn.submit-btn {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 10px 0 22px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 30px !important;
  align-items: center !important;
  justify-items: center !important;
  border-radius: 999px 0 0 999px !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
body #app #recordView .submit-dock > #addBtn.submit-btn::after {
  content: "→" !important;
  position: static !important;
  grid-column: 2 !important;
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px !important;
  color: rgba(69,105,36,.9) !important;
  background: rgba(255,255,255,.38) !important;
  transform: none !important;
}
body #app #recordView .submit-dock > label.record-public-row {
  position: static !important;
  inset: auto !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 0 !important;
  border-left: 1px solid rgba(255,255,255,.42) !important;
  border-radius: 0 999px 999px 0 !important;
  color: rgba(67,92,42,.9) !important;
  background: rgba(255,255,241,.42) !important;
  box-shadow: inset 1px 0 0 rgba(92,125,53,.08) !important;
  transform: none !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  text-align: left !important;
}
body #app #recordView .submit-dock > label.record-public-row input {
  flex: 0 0 auto !important;
}
body #app #recordView .submit-dock .record-public-copy {
  display: block !important;
  max-width: 82px !important;
  font-weight: 850 !important;
}

body #app #recordView.condition-open .condition-tags {
  position: relative !important;
}
body #app #recordView.condition-open .condition-scroll {
  height: 112px !important;
  max-height: 112px !important;
  padding-bottom: 6px !important;
  scroll-padding-bottom: 6px !important;
}
body #app #recordView.condition-open.condition-scroll-cue .condition-tags::after {
  content: "↕ 上下滑动查看更多" !important;
  position: absolute !important;
  left: 10px !important;
  right: 10px !important;
  bottom: 4px !important;
  height: 24px !important;
  display: grid !important;
  place-items: center !important;
  pointer-events: none !important;
  border-radius: 999px !important;
  color: rgba(79, 103, 54, .76) !important;
  background: linear-gradient(180deg, rgba(249,251,230,.18), rgba(244,248,220,.94) 42%) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: .04em !important;
  animation: conditionCue 1s ease both !important;
}

@media (max-width: 360px) {
  body #app #recordView .main-recorder > .submit-dock {
    grid-template-columns: minmax(0, 1fr) 118px !important;
  }
  body #app #recordView .submit-dock > label.record-public-row {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    padding: 0 7px !important;
  }
}

/* ===== UI-A6.ONE.SCREEN =====
   The sampling page is a fixed one-screen instrument. Only the condition tray
   may scroll; quantity and basic information share one compact rhythm. */
@keyframes conditionCue {
  0%, 62% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(4px); }
}
body #app #recordView.condition-open.condition-scroll-cue .condition-tags::after {
  animation: conditionCue 1s ease both !important;
}

body[data-active-view="record"] {
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
body[data-active-view="record"] #app {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body[data-active-view="record"] #app #recordView.active {
  min-height: 0 !important;
  overflow: hidden !important;
}
body[data-active-view="record"] #app #recordView .main-recorder,
body[data-active-view="record"] #app #recordView.condition-open .main-recorder {
  overflow: hidden !important;
}
body[data-active-view="record"] #app #recordView .record-grid,
body[data-active-view="record"] #app #recordView.condition-open .record-grid {
  overflow: hidden !important;
}
body[data-active-view="record"] #app #recordView .condition-scroll,
body[data-active-view="record"] #app #recordView.condition-open .condition-scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: none !important;
}
body[data-active-view="record"] #app #recordView .condition-scroll::-webkit-scrollbar {
  display: none !important;
}

body[data-active-view="container"] #app #containerView .game-panel {
  max-height: none !important;
}

@media (max-width: 430px) and (max-height: 700px) {
  body[data-active-view="record"] #app {
    width: min(430px, 100%) !important;
    max-width: 430px !important;
    padding: 3px 6px calc(76px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body[data-active-view="record"] #app .hero {
    display: none !important;
  }
  body[data-active-view="record"] #app #recordView.active {
    flex: 1 1 auto !important;
    height: auto !important;
    display: flex !important;
  }
  body[data-active-view="record"] #app #recordView .main-recorder,
  body[data-active-view="record"] #app #recordView.condition-open .main-recorder {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 4px 10px 66px !important;
  }
  body[data-active-view="record"] #app #recordView .mascot-head {
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 0 2px !important;
  }
  body[data-active-view="record"] #app #recordView .mascot-head .kicker {
    margin: 0 !important;
  }
  body[data-active-view="record"] #app #recordView .mascot-head .mascot-card {
    transform: scale(.7) !important;
    transform-origin: right center !important;
  }
  body[data-active-view="record"] #app #recordView .record-grid,
  body[data-active-view="record"] #app #recordView.condition-open .record-grid {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    gap: 3px !important;
  }
  body[data-active-view="record"] #app #recordView .record-grid > div {
    gap: 3px !important;
  }
  body[data-active-view="record"] #app #recordView .record-section {
    padding: 3px 8px !important;
    gap: 3px !important;
  }
  body[data-active-view="record"] #app #recordView .record-step-group {
    gap: 3px !important;
  }
  body[data-active-view="record"] #app #recordView .step-label {
    min-height: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    line-height: 24px !important;
  }
  body[data-active-view="record"] #app #recordView .step-num {
    width: 22px !important;
    height: 22px !important;
  }
  body[data-active-view="record"] #app #recordView .shape-grid {
    min-height: 56px !important;
    height: 56px !important;
    gap: 6px !important;
  }
  body[data-active-view="record"] #app #recordView .shape-grid button {
    min-height: 54px !important;
    height: 54px !important;
    padding: 3px !important;
  }
  body[data-active-view="record"] #app #recordView .shape-section .record-step-group:nth-child(2),
  body[data-active-view="record"] #app #recordView .detail-section .record-step-group:nth-child(1) {
    min-height: 73px !important;
    height: 73px !important;
  }
  body[data-active-view="record"] #app #recordView .amount-grid,
  body[data-active-view="record"] #app #recordView .shared-metric-panel {
    min-height: 46px !important;
    height: 46px !important;
  }
  body[data-active-view="record"] #app #recordView .amount-slider-card {
    width: calc(100% - 28px) !important;
    min-height: 46px !important;
    height: 46px !important;
    margin-inline: auto !important;
    padding: 0 12px 8px !important;
    grid-template-rows: 22px 22px !important;
  }
  body[data-active-view="record"] #app #recordView .amount-slider-card input[type="range"] {
    transform: translateY(-7px) !important;
  }
  body[data-active-view="record"] #app #recordView .volume-hint,
  body[data-active-view="record"] #app #recordView .metric-slider-slot,
  body[data-active-view="record"] #app #recordView .palette {
    display: none !important;
  }
  body[data-active-view="record"] #app #recordView .shared-metric-panel .metric-switch {
    height: 46px !important;
    min-height: 46px !important;
  }
  body[data-active-view="record"] #app #recordView .shared-metric-panel .metric-switch button {
    min-height: 44px !important;
    height: 44px !important;
    padding-block: 2px !important;
  }
  body[data-active-view="record"] #app #recordView .condition-toggle {
    min-height: 42px !important;
    height: 42px !important;
    padding-block: 0 !important;
  }
  body[data-active-view="record"] #app #recordView.condition-open .condition-scroll {
    height: 100px !important;
    max-height: 100px !important;
    padding: 5px !important;
  }
  body[data-active-view="record"] #app #recordView .condition-scroll button {
    min-height: 44px !important;
    height: 44px !important;
  }
  body[data-active-view="record"] #app #recordView .main-recorder > .submit-dock {
    inset: auto 10px 7px !important;
    min-height: 54px !important;
  }
  body[data-active-view="record"] #app #recordView .submit-dock > #addBtn.submit-btn,
  body[data-active-view="record"] #app #recordView .submit-dock > label.record-public-row {
    min-height: 54px !important;
  }
}

/* ===== UI-A7.CONSISTENCY =====
   Replace hard split controls and legacy rectangular empty states with the
   same soft glass language used by the rest of the app. */
body #app #recordView .main-recorder > .submit-dock {
  grid-template-columns: minmax(0, 1fr) 126px !important;
  gap: 6px !important;
  padding: 4px !important;
  border: 0 !important;
  background: linear-gradient(135deg, rgba(126, 183, 73, .96), rgba(169, 213, 104, .94)) !important;
  box-shadow: 0 14px 28px rgba(91, 139, 52, .22), inset 0 1px 0 rgba(255,255,255,.5) !important;
}
body #app #recordView .submit-dock > #addBtn.submit-btn {
  min-height: 50px !important;
  padding-left: 16px !important;
  border-radius: 999px !important;
  background: rgba(105, 164, 54, .28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22) !important;
}
body #app #recordView .submit-dock > label.record-public-row {
  width: 126px !important;
  min-width: 126px !important;
  max-width: 126px !important;
  min-height: 50px !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,241,.34) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.46), 0 3px 10px rgba(70,108,38,.08) !important;
}

body #app #statsView .tag-empty-state {
  min-height: 52px !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: rgba(70, 86, 52, .66) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(236,246,213,.18)) !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.56), 0 8px 20px rgba(88,115,58,.05) !important;
  backdrop-filter: blur(10px) !important;
}
body #app #statsView .tag-empty-state b {
  font-weight: 850 !important;
  color: rgba(63, 87, 41, .72) !important;
}
body #app #statsView .tag-empty-state span {
  font-size: 12px !important;
  color: rgba(100, 112, 85, .55) !important;
}

body #app #profileView .support-notice {
  margin: 7px 0 3px !important;
  padding: 12px !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  align-items: center !important;
  color: #526143 !important;
  background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(236,247,211,.4)) !important;
  border: 1px solid rgba(255,255,255,.68) !important;
  box-shadow: 6px 8px 20px rgba(91,118,61,.08), inset 1px 1px 0 rgba(255,255,255,.82) !important;
}
body #app #profileView .support-notice[hidden] {
  display: none !important;
}
body #app #profileView .support-copy {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  padding: 0 !important;
  gap: 3px !important;
}
body #app #profileView .support-copy b {
  width: auto !important;
  min-width: 0 !important;
  white-space: normal !important;
  color: #405633 !important;
}
body #app #profileView .support-copy span {
  width: auto !important;
  min-width: 0 !important;
  white-space: normal !important;
  color: rgba(82, 97, 67, .7) !important;
  line-height: 1.45 !important;
}
body #app #profileView .support-email {
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #568931 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}
body #app #profileView .support-copy-btn {
  width: 100% !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #4d7331 !important;
  background: rgba(219, 241, 178, .7) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72) !important;
  font-weight: 850 !important;
}

/* 首次采样后的短暂来信提示；未读状态不占用导航栏空间。 */
body #app .bottom-tabs #profileTab {
  position: relative !important;
  overflow: visible !important;
}
body #app .bottom-tabs #profileTab .letter-tab-hint {
  display: none !important;
  position: absolute !important;
  right: -3px !important;
  bottom: calc(100% + 16px) !important;
  width: max-content !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(132, 188, 69, .65) !important;
  border-radius: 14px !important;
  color: #3d5932 !important;
  background: #fffdf3 !important;
  box-shadow: 0 12px 30px rgba(68, 99, 45, .18) !important;
  font-size: var(--text-sm) !important;
  line-height: 1.3 !important;
  pointer-events: none !important;
}
body #app .bottom-tabs #profileTab .letter-tab-hint::after {
  content: '';
  position: absolute;
  right: 27px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(132, 188, 69, .65);
  border-bottom: 1px solid rgba(132, 188, 69, .65);
  background: #fffdf3;
  transform: rotate(45deg);
}
body #app .bottom-tabs #profileTab.letter-nudge-visible {
  box-shadow: 0 0 0 2px rgba(132, 188, 69, .72), 0 0 14px rgba(131, 187, 75, .28) !important;
  animation: letterTabCall 1.3s ease-in-out 2;
}
body #app .bottom-tabs #profileTab.letter-nudge-visible .letter-tab-hint { display: block !important; }
@keyframes letterTabCall {
  50% { box-shadow: 0 0 0 4px rgba(132, 188, 69, .8), 0 0 24px rgba(131, 187, 75, .45); }
}
body #app #profileView .letter-summary-hint { display: none !important; }
body #app #profileView.letter-pending #welcomeLetter {
  border-color: rgba(132, 188, 69, .82) !important;
  box-shadow: 0 0 0 2px rgba(132, 188, 69, .35), 0 8px 24px rgba(105, 126, 76, .14) !important;
  animation: letterCardCall 1.7s ease-in-out 3;
}
body #app #profileView.letter-pending .letter-summary-hint {
  display: inline !important;
  margin-left: 5px !important;
  color: #537b35 !important;
  font-size: var(--text-min) !important;
  font-style: normal !important;
}
body #app #profileView.letter-pending .profile-alien.alien-sticker {
  opacity: .85 !important;
  filter: drop-shadow(0 6px 14px rgba(88, 135, 54, .25)) !important;
}
@keyframes letterCardCall {
  50% { box-shadow: 0 0 0 4px rgba(132, 188, 69, .55), 0 8px 24px rgba(105, 126, 76, .18); }
}

/* ===== L06-R1.SCALE.TOKENS：最小可缩放字体 token（L06-R1 / F-L06-001）=====
   目标：把本卡触及且用户实际可读的固定 12–13px 关键文字改为 rem 方案，
   使真实 Chromium 根字号放大（200%）时正文实际变大，同时不改动其余大量 !important 版式。
   100% 时视觉尺寸保持接近原值；仅装饰性 mascot 探边不在本块范围内（已审定为非交互缺陷）。 */
:root {
  --text-min: 0.8125rem; /* 13px：标签、说明、时间戳等最小可读字号 */
  --text-sm: 0.875rem;   /* 14px：轻提示与支持声明 */
  --text-md: 0.9375rem;  /* 15px：表单标签等主要说明文字 */
  --text-lg: 1.0625rem;  /* 17px：次级标题 */
}

/* 底部 tablist 文字 */
body #app .bottom-tabs .tab b { font-size: var(--text-min) !important; }

/* 记录页：表单标签、容量提示、自定义标签、形状/用量选择文字、图标标签 */
body #app #recordView .field-label { font-size: var(--text-min) !important; }
body #app #recordView .volume-hint { font-size: var(--text-min) !important; }
body #app #recordView .tag,
body #app #recordView .text-tag,
body #app #recordView #feelingTags .text-tag,
body #app #recordView .condition-tags .text-tag,
body #app #recordView .condition-scroll .text-tag { font-size: var(--text-min) !important; }
body #app #recordView .visual-choice b,
body #app #recordView .amount-choice.visual-amount b { font-size: var(--text-min) !important; }
body #app #recordView .icon-tag b { font-size: var(--text-min) !important; }

/* 通用标签、记录时间戳、统计与月历卡片说明 */
body #app .tag { font-size: var(--text-min) !important; }
body #app .record time,
body #app .record-meta time { font-size: var(--text-min) !important; }
body #app .stats-grid span { font-size: var(--text-min) !important; }
body #app .month-card span { font-size: var(--text-min) !important; }
body #app #statsView .health-card span { font-size: var(--text-min) !important; }
/* 紧凑健康卡：窄屏 4 列 + nowrap 时，放大根字号会让标签宽于卡片并越界；
   改为允许换行（配合卡片 min-height 自然增高），保证 200% 下无横向溢出 */
body #app #statsView .health-card.compact-stat span {
  font-size: var(--text-min) !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.15 !important;
}
body #app #statsView .health-card.compact-stat { min-width: 0 !important; }
body #app .choice span { font-size: var(--text-min) !important; }

/* 设置分组标题、提示正文、支持声明、轻提示 */
body #app .settings-group-title { font-size: var(--text-min) !important; }
body #app .notice,
body #app .notice p { font-size: var(--text-min) !important; }
body #app .support-notice,
body #app .support-notice p { font-size: var(--text-min) !important; }
/* toast 挂在 body 下（不在 #app 内），需用全局选择器命中 */
.app-toast { font-size: var(--text-sm) !important; }
