* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif; color: #17306b; user-select: none; -webkit-user-select: none; touch-action: none; }
body { background: #2a7bd8; }
#sea { position: fixed; inset: 0; background: radial-gradient(120% 80% at 50% 0%, #bdf0ff 0%, #6cc6f5 28%, #2f86d9 62%, #173e8c 100%); overflow: hidden; }
#sea .ray { position: absolute; top: -20%; width: 22vw; height: 140%; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0)); filter: blur(18px); transform-origin: top center; animation: sway 9s ease-in-out infinite alternate; mix-blend-mode: screen; }
#sea .r1 { left: 18%; transform: rotate(14deg); }
#sea .r2 { left: 46%; width: 14vw; transform: rotate(4deg); animation-duration: 12s; opacity: .7; }
#sea .r3 { left: 70%; width: 18vw; transform: rotate(-10deg); animation-duration: 10s; opacity: .8; }
@keyframes sway { from { transform: rotate(-8deg) translateX(-3vw); } to { transform: rotate(10deg) translateX(3vw); } }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }

#title { position: fixed; left: 22px; top: 16px; pointer-events: none; text-shadow: 0 2px 0 rgba(255,255,255,.6); }
#title .logo { font-size: 28px; font-weight: 900; letter-spacing: 1px; color: #fff; -webkit-text-stroke: 1.5px #1d4fb3; text-shadow: 0 3px 0 #1d4fb3, 0 6px 14px rgba(10,40,120,.35); }
#title .logo b { color: #ffe066; margin: 0 2px; }
#title .sub { margin-top: 4px; font-size: 13px; color: #e8f7ff; text-shadow: 0 1px 2px rgba(0,30,90,.5); }

#toolbar { position: fixed; left: 22px; top: 92px; display: flex; flex-direction: column; gap: 10px; }
button { font: inherit; cursor: pointer; border: none; }
.round { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.88); color: #1d4fb3; font-weight: 800; font-size: 13px; box-shadow: 0 4px 0 #9cc7f2, 0 8px 18px rgba(10,40,120,.25); transition: transform .12s; }
.round:hover { transform: translateY(-2px); }
.round:active { transform: translateY(2px); box-shadow: 0 2px 0 #9cc7f2; }
.round.on { background: #ffe066; color: #7a4b00; box-shadow: 0 4px 0 #e0a800, 0 8px 18px rgba(120,80,0,.25); }

#panel { position: fixed; right: 18px; top: 16px; bottom: 16px; width: 286px; display: flex; flex-direction: column; background: rgba(255,255,255,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 22px; box-shadow: 0 10px 30px rgba(10,40,120,.25), inset 0 0 0 3px rgba(255,255,255,.7); overflow: hidden; }
#tabs { display: flex; padding: 8px; gap: 6px; background: linear-gradient(180deg, #e8f5ff, #d3ebff); }
#tabs button { flex: 1; padding: 9px 0; border-radius: 12px; background: transparent; color: #3c67b8; font-weight: 800; font-size: 15px; }
#tabs button.on { background: #fff; color: #1d4fb3; box-shadow: 0 3px 0 #a9d2fa; }
.page { display: none; flex: 1; overflow-y: auto; padding: 12px; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.page.on { display: grid; }
.page::-webkit-scrollbar { width: 6px; } .page::-webkit-scrollbar-thumb { background: #b7d8f7; border-radius: 3px; }
.btn { position: relative; padding: 12px 6px 10px; border-radius: 16px; background: #fff; color: #1d3f86; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 #c6e0fa, 0 6px 14px rgba(20,60,140,.12); transition: transform .1s, box-shadow .1s; text-align: center; }
.btn small { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: #7d95c4; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #c6e0fa, 0 8px 18px rgba(20,60,140,.16); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #c6e0fa; }
.btn .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.btn.wide { grid-column: span 2; }
.btn.sel { background: #fff7d1; box-shadow: 0 4px 0 #f3cf5b, 0 6px 14px rgba(140,100,0,.15); }
.swatch { height: 64px; border-radius: 12px; margin-bottom: 8px; background-size: cover; background-position: center 30%; }
.section { grid-column: span 2; font-size: 12px; font-weight: 800; color: #6f8fc9; letter-spacing: 1px; margin: 4px 2px -2px; }

#bubble { position: fixed; left: 0; top: 0; max-width: 300px; padding: 12px 16px; background: #fff; color: #1d3f86; font-size: 17px; font-weight: 800; line-height: 1.45; border-radius: 18px; box-shadow: 0 6px 0 #b9dcfb, 0 10px 24px rgba(10,40,120,.28); pointer-events: none; transform: translate(-50%, -100%); transition: opacity .2s; z-index: 5; }
#bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; margin-left: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
#bubble.hide { opacity: 0; }

#hint { position: fixed; left: 50%; bottom: 14px; transform: translateX(calc(-50% - 150px)); padding: 8px 16px; border-radius: 999px; background: rgba(10,40,110,.35); color: #eaf6ff; font-size: 13px; pointer-events: none; white-space: nowrap; }
#toast { position: fixed; left: 50%; top: 22px; transform: translate(calc(-50% - 150px), 0); padding: 10px 18px; border-radius: 14px; background: #fff7d1; color: #7a4b00; font-weight: 800; box-shadow: 0 4px 0 #f3cf5b; transition: opacity .3s, transform .3s; z-index: 6; }
#toast.hide { opacity: 0; transform: translate(calc(-50% - 150px), -12px); }

#loader { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 10%, #c9f3ff, #4aa9ee 55%, #1b4aa1); z-index: 10; transition: opacity .6s; }
#loader.gone { opacity: 0; pointer-events: none; }
#loader .card { width: min(380px, 88vw); padding: 26px 26px 22px; text-align: center; background: rgba(255,255,255,.9); border-radius: 28px; box-shadow: 0 12px 0 #9fd0fa, 0 20px 40px rgba(10,40,120,.3); }
#loader .avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: #dff3ff; box-shadow: 0 0 0 6px #fff, 0 6px 18px rgba(10,40,120,.25); animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
#loader h1 { margin: 16px 0 4px; font-size: 24px; color: #1d4fb3; }
#loader .tip { margin: 0 0 16px; font-size: 13px; color: #6f8fc9; }
#loader .bar { height: 14px; border-radius: 7px; background: #e3f1ff; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0,40,120,.12); }
#loader .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6fd3ff, #3b8cff); border-radius: 7px; transition: width .2s; }
#loadText { margin: 10px 0 0; font-size: 14px; color: #3c67b8; }
#btnStart { margin-top: 14px; padding: 14px 26px; border-radius: 16px; background: linear-gradient(180deg, #ffe680, #ffc93c); color: #6b3d00; font-size: 18px; font-weight: 900; box-shadow: 0 5px 0 #e0a100, 0 10px 20px rgba(120,80,0,.25); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.hide { display: none; }
#bubble.hide { display: block; }

@media (max-width: 760px) {
  #title { left: 14px; top: 10px; } #title .logo { font-size: 21px; } #title .sub { font-size: 11px; }
  #toolbar { left: 14px; right: auto; top: 62px; flex-direction: row; gap: 6px; }
  .round { width: 44px; height: 44px; font-size: 11px; }
  #panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: 36vh; border-radius: 18px; }
  .page { grid-template-columns: 1fr 1fr 1fr; gap: 7px; padding: 9px; }
  .section, .btn.wide { grid-column: span 3; }
  .btn { padding: 9px 4px 7px; font-size: 13px; border-radius: 13px; }
  .btn small { display: none; }
  .swatch { height: 46px; }
  #hint { display: none; }
  #toast { transform: translate(-50%, 0); top: 64px; } #toast.hide { transform: translate(-50%, -12px); }
  #bubble { max-width: 70vw; font-size: 15px; }
}

/* —— Live3D 新增 —— */
#love { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(10,40,110,.5); }
#love .hearts { position: relative; width: 120px; height: 12px; border-radius: 8px; background: rgba(255,255,255,.28); overflow: hidden; box-shadow: inset 0 1px 3px rgba(10,40,110,.25); }
#love .hearts i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; background: linear-gradient(90deg, #ff9fc0, #ff4f8b); transition: width .5s cubic-bezier(.3,1.6,.5,1); }
#love em { font-style: normal; font-weight: 700; }
#c.grab { cursor: grab; } #c.grabbing { cursor: grabbing; } #c.poke { cursor: pointer; }
