:root {
  --ink: #171717;
  --paper: #ffffff;
  --panel: #f1f2f2;
  --panel-2: #e4e8e8;
  --muted: #626869;
  --line: #171717;
  --petrol: #35c759;
  --petrol-soft: #dff8e5;
  --diesel: #3478f6;
  --diesel-soft: #e1ebff;
  --yellow: #f4d34a;
  --orange: #ff7144;
  --frame: 11px;
}

* { box-sizing: border-box; }
html { background: #eef0f1; }
body { margin: 0; min-width: 320px; min-height: 100dvh; color: var(--ink); background: #eef0f1; font-family: "DM Sans", "Noto Sans Devanagari", "Segoe UI", sans-serif; font-weight: 500; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { touch-action: manipulation; }

.kiosk-shell { width: min(calc(100% - 24px), 720px); min-height: calc(100dvh - 24px); margin: 12px auto; padding: clamp(22px,4vw,38px); overflow: hidden; border: var(--frame) solid var(--ink); border-radius: 52px; background: var(--paper); box-shadow: 0 14px 0 rgba(0,0,0,.05); }
.screen-card { min-height: calc(100dvh - 94px); outline: 0; }

.screen { min-height: calc(100dvh - 94px); display: flex; flex-direction: column; padding-top: clamp(12px,3vh,30px); animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.screen-head { margin-bottom: clamp(30px,6vh,58px); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem,6vw,3.45rem); font-weight: 600; line-height: 1.08; letter-spacing: -.045em; }
h2 { font-weight: 650; letter-spacing: -.02em; }
.selection-summary { margin: 8px 0 0; color: var(--ink); opacity: .48; font-size: .88rem; font-weight: 600; line-height: 1.35; }
.subhead { margin: 11px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }

.language-screen .screen-head { margin-bottom: 14px; text-align: center; }
.language-screen .screen-head h1 { max-width: 540px; margin-inline: auto; }
.landing-illustration { width: min(46vw, 230px); max-height: 260px; object-fit: contain; margin: 0 auto 18px; display: block; }

.choices { width: 100%; margin: auto; display: grid; gap: 16px; }
.choice-button { position: relative; min-height: 78px; padding: 18px 24px; border: 3px solid transparent; border-radius: 18px; color: var(--ink); background: var(--panel); cursor: pointer; font-size: 1.08rem; font-weight: 650; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.choice-button:hover { transform: translateY(-2px); }
.choice-button.selected { border-color: var(--ink); background: white; box-shadow: 0 6px 0 var(--ink); }
.choice-button.selected::after { content: "✓"; position: absolute; top: 14px; right: 15px; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; color: white; background: var(--ink); font-weight: 800; }
.choice-button small { display: block; margin-top: 5px; color: var(--ink); opacity: .5; font-size: .8rem; font-weight: 550; }
.language-grid { grid-template-columns: 1fr 1fr; }
.language-grid .choice-button { min-height: 112px; }
.language-grid strong { display: block; font-size: 1.18rem; }

.fuel-screen .choices { grid-template-columns: 1fr 1fr; }
.fuel-screen .choice-button { min-height: 210px; padding-top: 116px; overflow: hidden; }
.fuel-screen .choice-button::before { content: ""; position: absolute; top: 32px; left: 50%; width: 62px; height: 70px; transform: translateX(-50%) rotate(-8deg); border: 4px solid var(--ink); border-radius: 24px 24px 16px 16px; }
.fuel-screen .choice-button::after { content: ""; position: absolute; top: 49px; left: calc(50% + 16px); width: 29px; height: 38px; border: 4px solid var(--ink); border-left: 0; border-radius: 0 18px 18px 0; }
.fuel-screen .choice-button.selected::after { top: 14px; right: 15px; left: auto; width: 28px; height: 28px; transform: none; border: 2px solid var(--ink); border-radius: 50%; }
.fuel-swatch { position: absolute; top: 55px; left: calc(50% - 12px); width: 24px; height: 28px; border-radius: 10px 10px 7px 7px; }
.choice-button.petrol { background: var(--petrol-soft); }
.choice-button.petrol .fuel-swatch { background: var(--petrol); }
.choice-button.petrol.selected { border-color: var(--petrol); }
.choice-button.diesel { background: var(--diesel-soft); }
.choice-button.diesel .fuel-swatch { background: var(--diesel); }
.choice-button.diesel.selected { border-color: var(--diesel); }

.fill-screen .choices { grid-template-columns: repeat(3,1fr); }
.fill-screen .choice-button { min-height: 150px; padding: 75px 16px 18px; }
.fill-screen .choice-button::before { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); font-size: 2rem; font-weight: 600; }
.fill-screen .choice-button:nth-child(1)::before { content: "₹"; color: var(--petrol); }
.fill-screen .choice-button:nth-child(2)::before { content: "L"; color: var(--diesel); }
.fill-screen .choice-button:nth-child(3)::before { content: "●"; color: var(--orange); }
.fill-screen .choice-button.selected::after { top: 12px; right: 12px; left: auto; transform: none; font-size: 1rem; }

.action-row { display: flex; justify-content: center; align-items: center; gap: 13px; margin-top: clamp(28px,5vh,48px); }
.nav-button { width: 54px; height: 54px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 14px; color: var(--ink); background: white; cursor: pointer; font-size: 1.7rem; font-weight: 700; }
.primary-button { min-width: 150px; min-height: 56px; padding: 14px 26px; border: 3px solid var(--ink); border-radius: 14px; color: white; background: var(--ink); cursor: pointer; font-weight: 700; }
.primary-button.dark { color: white; background: var(--ink); }
.primary-button:disabled { color: #979b9c; border-color: var(--panel-2); background: var(--panel); cursor: not-allowed; }
.link-button { min-height: 48px; border: 0; color: var(--ink); background: transparent; cursor: pointer; font-weight: 650; text-decoration: underline; text-underline-offset: 5px; }
.choice-button:focus-visible, .nav-button:focus-visible, .primary-button:focus-visible, .key:focus-visible, .link-button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }

.amount-presets { grid-template-columns: 1fr 1fr; }
.amount-presets .choice-button { min-height: 100px; }
.amount-presets .choice-button:last-child { grid-column: 1 / -1; min-height: 70px; }
.preset-relation { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.preset-relation strong { font-size: 1.18rem; }
.choice-button.lime { background: #fff7d1; }
.rate-line { width: min(100%,460px); margin: -20px auto 18px; color: var(--muted); text-align: center; font-size: .92rem; font-weight: 600; }
.display { width: min(100%,460px); margin: 0 auto 18px; padding: 18px 22px; border: 3px solid var(--ink); border-radius: 16px; background: white; text-align: right; }
.display strong { font-size: clamp(1.8rem,6vw,2.45rem); font-weight: 650; letter-spacing: -.03em; }
.display span { display: block; margin-top: 3px; color: var(--ink); opacity: .46; font-size: .82rem; font-weight: 600; }
.keypad { width: min(100%,460px); margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.key { min-height: 62px; border: 0; border-radius: 14px; color: var(--ink); background: var(--panel); cursor: pointer; font-size: 1.12rem; font-weight: 650; }
.key:hover { background: var(--panel-2); }
.key.erase { font-size: 1.25rem; }
.key.zero { grid-column: 2; }

.payment-screen .choices { grid-template-columns: 1fr 1fr; }
.payment-screen .choice-button { min-height: 180px; padding-top: 104px; }
.payment-screen .choice-button::before { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); font-size: 2.6rem; }
.payment-screen .choice-button:first-child::before { content: "▦"; color: var(--diesel); }
.payment-screen .choice-button:nth-child(2)::before { content: "▭"; color: var(--petrol); }
.payment-screen .choice-button.selected::after { top: 12px; right: 12px; left: auto; transform: none; font-size: 1rem; }

.scan-layout { width: min(100%,440px); margin: auto; text-align: center; }
.timer-line { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; color: var(--muted); font-size: .9rem; }
.scan-timer { justify-content: space-between; text-align: left; }
.scan-timer .timer-track { flex: 0 0 110px; }
.timer-track { flex: 1; height: 9px; overflow: hidden; border: 2px solid var(--ink); border-radius: 999px; background: white; }
.timer-fill { display: block; width: var(--progress,100%); height: 100%; background: var(--petrol); transition: width 1s linear; }
.qr-panel, .card-panel, .tutorial-panel, .fuel-panel { border-radius: 22px; background: var(--panel); }
.scan-layout .qr-panel { padding: 24px; }
.qr-code { aspect-ratio: 1; width: min(100%,290px); margin: auto; padding: 16px; display: grid; grid-template-columns: repeat(11,1fr); gap: 2px; border: 4px solid var(--ink); border-radius: 10px; background: white; }
.qr-code i { background: transparent; }
.qr-code i.on { background: var(--ink); }
.scan-total { margin: 22px 0 26px; font-size: clamp(1.7rem,6vw,2.35rem); font-weight: 650; letter-spacing: -.04em; }
.card-panel { padding: 34px; text-align: center; }
.payment-card { width: min(100%,440px); margin: auto; }
.card-icon { width: 102px; height: 70px; margin: 0 auto 26px; border: 4px solid var(--ink); border-radius: 11px; background: var(--diesel-soft); position: relative; }
.card-icon::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 10px; background: var(--diesel); }
.pulse { animation: pulse 1.25s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.035); } }

.success-screen, .receipt-success { flex: 1; min-height: calc(100dvh - 250px); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: clamp(30px,7vw,58px); border-radius: 24px; color: var(--ink); background: #edf8ef; text-align: center; }
.success-badge { width: 118px; height: 118px; display: grid; place-items: center; margin-bottom: 25px; border: 5px solid var(--ink); border-radius: 34px; color: var(--ink); background: var(--petrol); font-size: 3.8rem; transform: rotate(-4deg); }
.success-badge span { transform: rotate(4deg); }
.success-screen h1, .receipt-success h1 { color: var(--ink); font-size: clamp(2rem,7vw,3rem); }
.verified-meta { margin: 8px 0 0; opacity: .5; font-size: .92rem; font-weight: 600; }
.success-screen .continue-button { margin-top: 30px; }

.tutorial-panel { width: min(100%,520px); margin: auto; overflow: hidden; touch-action: pan-y; user-select: none; cursor: grab; }
.tutorial-panel:active { cursor: grabbing; }
.tutorial-visual { min-height: 250px; display: grid; place-items: center; padding: 28px; color: var(--ink); background: #fff7d1; text-align: center; }
.tutorial-visual .pump-symbol { margin-bottom: 16px; font-family: "Segoe UI Symbol", sans-serif; font-size: 4.2rem; }
.tutorial-copy { padding: 23px 25px 25px; background: var(--panel); }
.tutorial-copy strong { display: block; margin-bottom: 7px; font-size: 1.12rem; }
.tutorial-copy p { margin: 0; color: var(--muted); line-height: 1.5; }
.tutorial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.tutorial-dots i { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: white; }
.tutorial-dots i.active { width: 30px; border-radius: 999px; background: var(--yellow); }

.nozzle-grid { width: min(100%,520px); margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nozzle { min-height: 220px; display: grid; place-items: center; padding: 24px; border: 3px solid transparent; border-radius: 22px; background: var(--panel); text-align: center; }
.nozzle-icon { font-family: "Segoe UI Symbol", sans-serif; font-size: 3.4rem; }
.nozzle strong { display: block; margin-top: 12px; }
.petrol-nozzle.active { border-color: var(--petrol); background: var(--petrol-soft); box-shadow: 0 0 0 5px rgba(53,199,89,.16); }
.diesel-nozzle.active { border-color: var(--diesel); background: var(--diesel-soft); box-shadow: 0 0 0 5px rgba(52,120,246,.16); }
.nozzle.active { animation: blink 1.15s ease-in-out infinite; }
@keyframes blink { 50% { transform: translateY(-4px); } }

.fuel-panel { margin: auto 0; padding: clamp(28px,5vw,44px); text-align: center; }
.fuel-panel.petrol { background: var(--petrol-soft); }
.fuel-panel.diesel { background: var(--diesel-soft); }
.live-amount { margin: 8px 0 5px; font-size: clamp(3.5rem,13vw,6.3rem); font-weight: 650; line-height: 1; letter-spacing: -.07em; }
.live-litres { color: var(--muted); font-size: 1.18rem; font-weight: 650; }
.progress-shell { height: 20px; margin: 30px 0 18px; overflow: hidden; border: 3px solid var(--ink); border-radius: 999px; background: white; }
.progress-bar { width: var(--progress); height: 100%; background: var(--petrol); transition: width .35s linear; }
.fuel-panel.diesel .progress-bar { background: var(--diesel); }
.instruction { margin: 30px 0 0; padding: 16px; border: 2px solid var(--ink); border-radius: 13px; background: white; font-weight: 650; }

.complete-screen { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.complete-card { padding: clamp(28px,6vw,48px); border-radius: 24px; background: #edf8ef; }
.check-circle { width: 96px; height: 96px; display: grid; place-items: center; margin: 0 auto 20px; border: 4px solid var(--ink); border-radius: 32px; color: var(--ink); background: var(--petrol); font-size: 3rem; transform: rotate(-4deg); }
.complete-card h1 { margin-bottom: 10px; }
.final-amount { margin: 23px 0 5px; font-size: clamp(2.4rem,8vw,4.1rem); font-weight: 650; letter-spacing: -.05em; }
.compact-meta { opacity: .5; font-size: .9rem; font-weight: 600; }
.receipt-choice { width: min(100%,390px); margin: 26px auto 0; padding-top: 22px; border-top: 2px solid #b9cfbd; }
.receipt-choice h2 { margin-bottom: 6px; font-size: 1.22rem; }
.receipt-choice p { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }
.receipt-choice .primary-button { display: block; width: 100%; margin-top: 12px; }
.receipt-choice .receipt-button { color: var(--ink); background: white; }
.receipt-choice .link-button { display: block; margin: 16px auto 0; }

.phone-panel { width: min(100%,460px); margin: auto; }
.phone-display { min-height: 78px; display: flex; align-items: center; gap: 13px; padding: 16px 20px; border: 3px solid var(--ink); border-radius: 16px; background: white; }
.phone-display span { font-size: 1.35rem; font-weight: 700; }
.phone-display strong { flex: 1; font-size: clamp(1.35rem,5vw,1.8rem); letter-spacing: .06em; }
.phone-hint { margin: 9px 2px 17px; color: var(--muted); font-size: .9rem; }
.phone-keypad { width: 100%; }
.receipt-success p { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.receipt-success p strong { color: var(--ink); font-size: 1.18rem; }
.receipt-summary { margin: 20px 0 30px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 12px; background: white; font-weight: 700; }
.receipt-success .primary-button { min-width: 190px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 30; transform: translateX(-50%); padding: 14px 20px; border: 3px solid var(--ink); border-radius: 13px; color: white; background: var(--ink); font-size: .95rem; font-weight: 650; animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%,8px); } }
@media (max-width: 620px) {
  :root { --frame: 7px; }
  .kiosk-shell { width: calc(100% - 12px); min-height: calc(100dvh - 12px); margin: 6px auto; padding: 20px 16px; border-radius: 34px; }
  .screen-card { min-height: calc(100dvh - 66px); }
  .screen { min-height: calc(100dvh - 66px); }
  .screen-head { margin-bottom: 30px; }
  .fill-screen .choices { grid-template-columns: 1fr; }
  .fill-screen .choice-button { min-height: 84px; padding: 20px 20px 20px 74px; text-align: left; }
  .fill-screen .choice-button::before { top: 50%; left: 32px; transform: translateY(-50%); }
  .qr-code { max-width: 230px; }
  .nozzle { min-height: 180px; padding: 16px 10px; }
}

@media (max-width: 430px) {
  .language-grid, .fuel-screen .choices, .payment-screen .choices { grid-template-columns: 1fr; }
  .landing-illustration { width: 150px; max-height: 170px; }
  .fuel-screen .choice-button, .payment-screen .choice-button { min-height: 120px; padding: 22px 22px 22px 108px; text-align: left; }
  .fuel-screen .choice-button::before { top: 27px; left: 53px; transform: rotate(-8deg); }
  .fuel-screen .choice-button::after { top: 44px; left: 70px; }
  .fuel-screen .choice-button.selected::after, .payment-screen .choice-button.selected::after { top: 12px; right: 12px; left: auto; transform: none; }
  .fuel-swatch { top: 50px; left: 40px; }
  .payment-screen .choice-button::before { top: 50%; left: 53px; transform: translate(-50%,-50%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
