:root { --ink: #141419; --blue: #3458ff; --acid: #e9ff5b; --pink: #ff76b5; --paper: #f6f1e8; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #15151a; color: var(--ink); }
body { font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }

.france-app { min-height: 100svh; display: grid; place-items: start center; background: #15151a; }
.france-phone { width: min(100%, 460px); min-height: 100svh; overflow: hidden; position: relative; padding: max(18px, env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); background: var(--paper); }
.france-phone::before { content: ''; position: absolute; width: 150px; height: 150px; right: -92px; top: 114px; border-radius: 50%; background: var(--acid); opacity: .68; }
.france-phone > audio { display: none; }

.france-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.france-header h1 { min-width: 0; margin: 0; white-space: nowrap; font: 900 clamp(24px, 7vw, 31px)/1 Arial, "PingFang SC", sans-serif; letter-spacing: -.065em; }
.france-header button { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: white; background: var(--ink); font-size: 19px; font-weight: 900; cursor: pointer; box-shadow: none; }
.france-header button.music-on { color: white; background: var(--ink); }
.music-icon { position: relative; display: block; width: 16px; height: 16px; margin: auto; }
.music-icon.is-play::before { content: ''; position: absolute; top: 1px; left: 4px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid white; }
.music-icon.is-pause::before, .music-icon.is-pause::after { content: ''; position: absolute; top: 1px; width: 4px; height: 14px; border-radius: 1px; background: white; }
.music-icon.is-pause::before { left: 2px; }
.music-icon.is-pause::after { right: 2px; }

.countdown { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: end; gap: 4px; margin: 0 0 18px; }
.countdown div { display: flex; align-items: baseline; justify-content: center; min-width: 0; }
.countdown strong { font: 900 clamp(29px, 9vw, 41px)/1 Arial, sans-serif; letter-spacing: -.09em; }
.countdown span { margin-left: 4px; font-size: 17px; font-weight: 900; line-height: 1; }
.countdown b { padding-bottom: 5px; color: var(--pink); font: 900 22px/1 Arial, sans-serif; }

.dog-stage { position: relative; z-index: 1; width: calc(100% + 36px); height: min(50svh, 480px); margin: 0 -18px 18px; overflow: hidden; background: #ddd; }
.dog-stage img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.82) contrast(1.07); animation: photo-in .26s ease-out; }
.dog-stage figcaption { position: absolute; left: 18px; right: 18px; bottom: 16px; color: white; text-shadow: 0 2px 14px rgba(0,0,0,.75); }
.dog-stage figcaption small { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.dog-stage figcaption strong { display: block; max-width: 360px; font: 900 clamp(24px, 7.6vw, 34px)/1.02 Arial, "PingFang SC", sans-serif; letter-spacing: -.05em; }
.dog-stage::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.dog-stage figcaption, .emotion-meter { z-index: 2; }
.emotion-meter { position: absolute; top: 15px; right: 14px; padding: 7px 9px 6px; color: var(--ink); background: var(--acid); font-size: 11px; font-weight: 900; transform: rotate(2deg); }
.mood-corgi-run .dog-stage img, .mood-corgi-spin .dog-stage img, .mood-corgi-max .dog-stage img { animation: photo-in .2s ease-out, tiny-shake .19s infinite alternate; }

.scrubber { position: relative; z-index: 2; padding: 0 0 13px; }
.slider-line { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 11px; }
.slider-line input { --position: 0%; width: 100%; height: 34px; margin: 0; appearance: none; background: transparent; touch-action: pan-y; }
.slider-line input::-webkit-slider-runnable-track { height: 7px; border: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue) 0 var(--position), #d7d1c8 var(--position) 100%); }
.slider-line input::-webkit-slider-thumb { appearance: none; width: 29px; height: 29px; margin-top: -11px; border: 0; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px var(--paper); }
.slider-line input::-moz-range-track { height: 7px; border: 0; border-radius: 999px; background: #d7d1c8; }
.slider-line input::-moz-range-progress { height: 7px; border-radius: 999px; background: var(--blue); }
.slider-line input::-moz-range-thumb { width: 29px; height: 29px; border: 5px solid var(--paper); border-radius: 50%; background: var(--blue); }
.slider-line output { min-width: 62px; color: var(--blue); font: 900 18px/1 Arial, "PingFang SC", sans-serif; text-align: right; }
.slider-labels { display: flex; justify-content: space-between; margin-top: 1px; font-size: 10px; font-weight: 800; }

.interaction { position: relative; z-index: 2; margin: 5px 0 17px; text-align: center; }
.interaction p { margin: 0 0 8px; font-size: 13px; font-weight: 800; }
.interaction p strong { display: inline-block; color: var(--blue); font: 900 23px/1 Arial, sans-serif; vertical-align: -2px; }
.interaction button { width: 100%; min-height: 48px; padding: 11px 16px; border: 0; border-radius: 12px; color: white; background: var(--ink); font-size: 16px; font-weight: 900; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.interaction button span { margin-left: 5px; color: var(--acid); }
.interaction button:active { transform: translateY(2px) scale(.985); }
.interaction button.is-done { color: var(--ink); background: var(--acid); cursor: default; }
.interaction button.is-done span { color: var(--ink); }
.interaction small { display: block; min-height: 14px; margin-top: 6px; color: #66636a; font-size: 10px; font-weight: 700; }
.interaction.is-popping p strong { animation: count-pop .34s ease-out; }

.route-footer { position: relative; z-index: 2; margin-top: 0; padding-bottom: 2px; }
.route-line { display: flex; align-items: center; justify-content: space-between; gap: 9px; font: 900 22px/1 Arial, sans-serif; }
.route-line span { flex: 1; color: var(--blue); text-align: center; letter-spacing: .03em; }
.route-footer p { margin: 10px 0 0; color: #5e5d62; font: 800 15px/1 Arial, sans-serif; text-align: center; letter-spacing: .08em; }

@keyframes photo-in { from { opacity: .35; transform: scale(1.035); filter: blur(8px) saturate(.7); } }
@keyframes tiny-shake { from { transform: translate(-1px, 0) rotate(-.25deg); } to { transform: translate(1px, -1px) rotate(.25deg); } }
@keyframes count-pop { 0% { transform: scale(1); } 45% { transform: scale(1.5) rotate(-4deg); } 100% { transform: scale(1); } }
@media (min-width: 461px) { .france-phone { min-height: calc(100svh - 40px); margin: 20px 0; border-radius: 26px; } }
@media (max-width: 340px) { .france-header h1 { font-size: 23px; } .france-header button { width: 36px; height: 36px; } .countdown span { font-size: 15px; } }
@media (max-height: 760px) { .dog-stage { height: 350px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
