/* home.css — home screen, planner, week runner */
.home-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,4,22,.45) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 70%, rgba(14,4,22,.55) 100%); pointer-events: none; }
.home-hud { position: absolute; left: 10px; top: 10px; }
.girl-shadow { position: absolute; left: 50%; top: 562px; width: 190px; height: 26px; margin-left: -95px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.55), rgba(0,0,0,0) 70%); }
.girl { position: absolute; left: 50%; width: 240px; margin-left: -120px; bottom: 129px; display: flex; justify-content: center; align-items: flex-end; background: none; border: 0; padding: 0; cursor: pointer; transform-origin: bottom; }
.girl img { display: block; max-width: none; pointer-events: none; transform-origin: bottom; animation: breathe 3s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.girl.bounce { animation: girlBounce .5s cubic-bezier(.3,1.6,.5,1); }
.girl.kfocus { transform: none; }
.gbadge { position: absolute; width: 48px; height: 48px; border-radius: 50%; background: rgba(24,10,30,.8); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); animation: pop .4s cubic-bezier(.3,1.6,.5,1) both; }
.gbadge img { width: 36px; height: 36px; object-fit: contain; }
.hairchip { position: absolute; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; background: radial-gradient(circle at 35% 30%, #d8405a, #7a1428); border: 2px solid var(--gold2); text-shadow: 0 1px 2px #000; }
.bubble { position: absolute; left: 150px; top: 130px; width: 226px; padding: 8px 12px; border-radius: 14px; background: rgba(255,247,234,.95); color: #3a1428; font-weight: 800; font-size: 14px; line-height: 1.4; box-shadow: 0 3px 10px rgba(0,0,0,.4); animation: pop .25s cubic-bezier(.3,1.6,.5,1); z-index: 5; transition: opacity .4s; pointer-events: none; }
.bubble.out { opacity: 0; }

.nameplate { position: absolute; left: 10px; top: 46px; width: 200px; min-height: 46px; padding: 4px 12px; border-radius: 12px; background: rgba(20,8,26,.72); border: 1px solid rgba(243,210,122,.6); text-shadow: var(--outline); animation: drop .3s both; }
.np-top { display: flex; align-items: baseline; gap: 8px; }
.np-name { font-size: 18px; font-weight: 900; color: var(--gold); } .np-life { font-size: 13px; }
.np-title { font-size: 13px; color: var(--pink); min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebar { position: absolute; left: 10px; top: 102px; width: 150px; height: 26px; border-radius: 13px; background: rgba(20,8,26,.8); border: 1.5px solid rgba(243,210,122,.7); overflow: hidden; }
.ebar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #4f9a6a, #b9e36a); transition: width .3s; }
.ebar.low .ebar-fill { background: linear-gradient(90deg, #8a1428, #ff5a6a); }
.ebar-text { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 9px; font-size: 14px; font-weight: 800; text-shadow: var(--outline); }
.recover-btn { position: absolute; left: 166px; top: 93px; }

.stats-card { position: absolute; left: 8px; top: 150px; width: 150px; padding: 6px 8px 4px; border-radius: 12px; background: rgba(20,8,26,.68); border: 1px solid rgba(243,210,122,.5); color: var(--text); font-family: var(--font); text-align: left; cursor: pointer; display: block; animation: slideL .35s cubic-bezier(.3,1.4,.5,1) both; }
.sc-row { position: relative; height: 30px; display: flex; align-items: center; gap: 6px; }
.seal { flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 900; color: #fff; border: 1.5px solid rgba(255,230,160,.9); text-shadow: 0 1px 2px #000; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.seal.s20 { width: 22px; height: 22px; font-size: 12px; } .seal.s28 { width: 28px; height: 28px; font-size: 15px; flex: none; } .seal.s36 { width: 36px; height: 36px; font-size: 19px; }
.sc-name { font-size: 13px; font-weight: 700; text-shadow: var(--outline); flex: 1; white-space: nowrap; overflow: hidden; }
.sc-val { font-size: 16px; font-weight: 800; text-shadow: var(--outline); }
.sc-bar { position: absolute; left: 28px; right: 0; bottom: 1px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.18); }
.sc-bar i { display: block; height: 100%; border-radius: 2px; transition: width .3s; }

.ribbon { position: absolute; left: 50%; top: 554px; transform: translateX(-50%); max-width: 360px; padding: 4px 22px; background: linear-gradient(90deg, #7a1428, #b3243a, #7a1428); border: 1.5px solid var(--gold); border-radius: 4px; font-size: 14px; font-weight: 800; text-shadow: var(--outline); white-space: nowrap; animation: drop .4s .2s cubic-bezier(.3,1.6,.5,1) both; }
.main-btn { position: absolute; left: 48px; right: 48px; top: 588px; font-size: 19px; }
.banner { position: absolute; left: 0; right: 0; top: 230px; text-align: center; z-index: 50; pointer-events: none; animation: slam .5s cubic-bezier(.3,1.7,.5,1) both; transition: opacity .5s; }
.banner.out { opacity: 0; }
.banner b { display: block; font-size: 96px; line-height: 1.1; color: var(--gold); text-shadow: var(--outline), 0 0 24px rgba(255,150,190,.9); }
.banner span { font-size: 22px; font-weight: 800; text-shadow: var(--outline); }

/* dialogs */
.rec-opt { width: 100%; }
.rec-opt .btn-label { white-space: normal; text-align: center; }
.det-sec { font-size: 15px; font-weight: 800; color: var(--gold); text-shadow: var(--outline); margin-top: 4px; }
.det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 14px; text-shadow: var(--outline); }
.det-grid div { display: flex; justify-content: space-between; gap: 6px; }
.det-grid b { font-weight: 800; }

/* planner / runner: own lacquer frame (CSS-drawn, so content always sits inside it) */
.planner, .runner { border: 2px solid var(--gold2); border-image: none; border-radius: 16px; background: linear-gradient(180deg, rgba(38,16,48,.97), rgba(18,8,26,.97)); box-shadow: inset 0 0 0 3px rgba(18,8,26,.9), inset 0 0 0 4px rgba(243,210,122,.4), 0 8px 24px rgba(0,0,0,.6); }
.planner { width: 384px; height: 696px; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 5px; }
.pl-title { height: 26px; text-align: center; font-size: 19px; font-weight: 900; color: var(--gold); text-shadow: var(--outline); flex: none; }
.pl-head { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 3px; font-size: 12px; text-align: center; color: var(--gold); text-shadow: var(--outline); height: 16px; flex: none; }
.pl-grid { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 3px; flex: none; }
.pl-day { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; color: var(--gold); text-shadow: var(--outline); }
.pcell { height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 6px; border-radius: 8px; background: rgba(60,30,70,.55); border: 1.5px solid rgba(243,210,122,.45); color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 800; text-shadow: var(--outline); cursor: pointer; text-align: left; transition: transform .1s; min-width: 0; }
.pcell.empty { background: rgba(255,255,255,.05); border: 1.5px dashed rgba(243,210,122,.5); }
.pcell:active { transform: scale(.94); }
.pcell.pop2 { animation: rpop .25s cubic-bezier(.3,1.7,.5,1); }
.pcell span.nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-pal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; flex: none; margin-top: 3px; }
.chip { height: 44px; display: flex; align-items: center; gap: 5px; padding: 0 5px; border-radius: 8px; background: rgba(40,20,50,.8); border: 1.5px solid rgba(255,255,255,.2); color: var(--text); font-family: var(--font); text-align: left; cursor: pointer; transition: transform .1s; min-width: 0; }
.chip.on { border-color: var(--gold); background: rgba(120,50,70,.85); box-shadow: 0 0 10px rgba(243,210,122,.7); transform: scale(1.04); }
.chip:active { transform: scale(.94); }
.chip-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.chip-n { font-size: 12.5px; font-weight: 800; text-shadow: var(--outline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-c { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 3px; text-shadow: var(--outline); white-space: nowrap; }
.chip-c img { width: 12px; height: 12px; } .c-en { color: #8fe0ff; } .c-up { color: #9be07a; } .c-dn { color: #ffb0a0; }
.pl-proj { min-height: 30px; flex: none; text-align: center; font-size: 13.5px; font-weight: 800; text-shadow: var(--outline); line-height: 1.25; display: flex; flex-direction: column; justify-content: center; }
.pl-proj .bad { color: #ff7a8a; } .pl-proj .hintline { font-size: 12px; color: var(--pink); font-weight: 700; }
.pl-btns { display: flex; gap: 4px; flex: none; } .pl-btns .btn { flex: 1; min-width: 0; padding: 2px 4px; }
.pl-start { width: 100%; flex: none; }

/* runner */
.runner { position: absolute; left: 8px; right: 8px; top: 428px; height: 208px; padding: 8px 12px; z-index: 10; display: flex; flex-direction: column; gap: 4px; animation: slideUp .3s cubic-bezier(.3,1.4,.5,1) both; }
.r-head { display: flex; align-items: center; gap: 6px; height: 44px; flex: none; }
.r-day { flex: 1; font-size: 16px; font-weight: 900; color: var(--gold); text-shadow: var(--outline); white-space: nowrap; }
.r-head .btn { min-width: 56px; }
.rslot { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 2px 4px; border-radius: 8px; background: rgba(255,255,255,.06); }
.rslot.act .seal { animation: rpop .35s cubic-bezier(.3,1.8,.5,1); }
.r-body { flex: 1; min-width: 0; } .r-nm { font-size: 14px; font-weight: 800; text-shadow: var(--outline); }
.r-res { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; font-weight: 800; text-shadow: var(--outline); min-height: 17px; }
.r-chip { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; } .r-chip img { width: 14px; height: 14px; }
.sum { display: flex; flex-direction: column; gap: 4px; flex: 1; align-items: stretch; }
.sum-title { text-align: center; font-size: 18px; font-weight: 900; color: var(--gold); text-shadow: var(--outline); }
.sum-list { display: flex; flex-wrap: wrap; gap: 2px 14px; justify-content: center; font-size: 14px; font-weight: 800; text-shadow: var(--outline); }
.sum .btn { align-self: center; margin-top: auto; }

@keyframes breathe { 0%,100% { transform: scaleY(1) rotate(-.4deg); } 50% { transform: scaleY(1.012) rotate(.4deg); } }
@keyframes girlBounce { 0% { transform: translateY(0) scale(1,1); } 30% { transform: translateY(-18px) scale(.97,1.04); } 60% { transform: translateY(0) scale(1.04,.95); } 100% { transform: none; } }
@keyframes slideL { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rpop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
@keyframes slam { 0% { transform: scale(2.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
