/* Medkiro — illustrated scenes: niche cards, 3-step story, 6 tool tiles */

/* Niche cards (photo when available, illustration fallback) */
.niches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 64px; }
.niche { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-l); overflow: hidden; display: flex; align-items: flex-end; padding: 16px; color: #fff; box-shadow: var(--shadow-1); max-width: 100%; transition: transform 0.4s var(--ease); }
.niche:hover { transform: translateY(-3px); }
.niche img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.niche::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55)); }
.niche b { position: relative; z-index: 1; font-size: 17px; }
.niche-ic { position: absolute; top: 16px; left: 16px; z-index: 1; }
.n-dental { background: radial-gradient(120% 90% at 80% 10%, #9fd0ff, #2f7fe0); }
.n-spa { background: radial-gradient(120% 90% at 80% 10%, #ffc2d6, #e0507a); }
.n-pt { background: radial-gradient(120% 90% at 80% 10%, #b6f0c6, #2fae5c); }
.n-chiro { background: radial-gradient(120% 90% at 80% 10%, #ffd9a3, #f08a1c); }
.niche:not(:has(img))::before { content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; border: 26px solid rgba(255, 255, 255, 0.18); }
@media (max-width: 860px) { .niches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Shared mini phone */
.mini-phone { width: 210px; height: 300px; border-radius: 34px; padding: 10px; background: #111; box-shadow: var(--shadow-2), inset 0 0 0 2px #2c2c2e; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.mini-phone::before { content: ""; position: absolute; top: 8px; left: 50%; width: 64px; height: 18px; margin-left: -32px; background: #000; border-radius: 12px; z-index: 3; }

/* Story */
.story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.story-step { display: grid; gap: 18px; align-content: start; }
.scene { height: 340px; border-radius: var(--r-xl); display: grid; place-items: center; overflow: hidden; position: relative; }
.scene-find { background: linear-gradient(160deg, #e3f0ff, #d2f5ee); }
.scene-book { background: linear-gradient(160deg, #e9e4ff, #dbe9ff); }
.scene-back { background: linear-gradient(160deg, #fff3dc, #ffe3ea); }
@media (prefers-color-scheme: dark) {
  .scene-find { background: linear-gradient(160deg, #10233d, #0e3330); }
  .scene-book { background: linear-gradient(160deg, #1d1838, #10223d); }
  .scene-back { background: linear-gradient(160deg, #33280f, #3a1820); }
}
.story-text { display: grid; gap: 6px; }
.story-text h3 { font-size: 21px; }
.story-text p { color: var(--text-2); font-size: 16px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* Scene 1: map + result */
.map { flex: 1; border-radius: 24px 24px 12px 12px; background: #e8eef3; position: relative; overflow: hidden; }
.road { position: absolute; background: #fff; }
.r1 { left: -10%; right: -10%; top: 42%; height: 12px; transform: rotate(-12deg); }
.r2 { top: -10%; bottom: -10%; left: 58%; width: 10px; transform: rotate(8deg); }
.r3 { left: -10%; right: -10%; top: 75%; height: 7px; transform: rotate(4deg); }
.park { position: absolute; left: 10%; top: 12%; width: 60px; height: 44px; border-radius: 14px; background: #cfeccf; }
.pin { position: absolute; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.p-other { background: #a1a1a6; }
.p1 { left: 22%; top: 58%; } .p2 { left: 72%; top: 22%; }
.p-main { left: 44%; top: 26%; width: 30px; height: 30px; background: #ff3b30; box-shadow: 0 6px 14px rgba(255, 59, 48, 0.4); animation: pinBounce 2.4s var(--ease) infinite; }
.p-main i { position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.p-main::after { content: ""; position: absolute; left: -12px; top: 18px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 59, 48, 0.5); transform: rotate(45deg); animation: ping 2.4s ease-out infinite; }
@keyframes pinBounce { 0%, 100% { transform: rotate(-45deg) translate(0, 0); } 50% { transform: rotate(-45deg) translate(4px, -4px); } }
@keyframes ping { from { opacity: 0.9; transform: rotate(45deg) scale(0.4); } to { opacity: 0; transform: rotate(45deg) scale(2.2); } }
.result { background: #fff; color: #1d1d1f; border-radius: 16px; padding: 10px 12px; display: grid; gap: 1px; position: relative; font-size: 12px; }
.result b { font-size: 13.5px; }
.result .stars { color: #ff9500; font-weight: 700; }
.result small { color: #6e6e73; }
.result .go { position: absolute; right: 10px; top: 50%; margin-top: -13px; height: 26px; padding: 0 12px; border-radius: 13px; background: #007aff; color: #fff; font-weight: 700; display: grid; place-items: center; }

/* Scene 2: night booking */
.mini-phone.night { background: linear-gradient(180deg, #1c2448, #0d1124); }
.night-top { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 15px; }
.moon { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset -5px -2px 0 0 #ffd60a; }
.book-card { background: #fff; color: #1d1d1f; border-radius: 16px; padding: 12px; display: grid; gap: 6px; font-size: 12.5px; }
.book-card small { color: #6e6e73; margin-top: -4px; }
.toast-ok { margin-top: auto; background: rgba(52, 199, 89, 0.95); color: #fff; font-weight: 700; font-size: 13px; border-radius: 14px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; animation: toastIn 3.2s var(--ease) infinite; }
.toast-ok span { width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #34c759; display: grid; place-items: center; font-size: 12px; }
@keyframes toastIn { 0%, 25% { opacity: 0; transform: translateY(14px); } 35%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Scene 3: SMS + stars */
.scene-back .mini-phone { background: #f2f2f7; padding-top: 38px; }
.sms { max-width: 86%; padding: 8px 11px; border-radius: 16px; font-size: 12px; line-height: 1.35; }
.sms small { display: block; font-size: 10px; opacity: 0.6; }
.sms.in { background: #e5e5ea; color: #1d1d1f; align-self: flex-start; border-bottom-left-radius: 5px; }
.sms.out { background: #34c759; color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; font-weight: 700; }
.star-row { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.star-row span { font-size: 24px; color: #ffcc00; animation: starPop 2.6s var(--ease) infinite; }
.star-row span:nth-child(2) { animation-delay: 0.12s; } .star-row span:nth-child(3) { animation-delay: 0.24s; }
.star-row span:nth-child(4) { animation-delay: 0.36s; } .star-row span:nth-child(5) { animation-delay: 0.48s; }
@keyframes starPop { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.3); } }

/* Tool tiles */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool { background: var(--bg-elev); border-radius: var(--r-xl); box-shadow: var(--shadow-1); padding: 16px 16px 22px; display: grid; gap: 8px; align-content: start; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tool h3 { font-size: 20px; padding: 6px 6px 0; }
.tool p { color: var(--text-2); font-size: 15px; padding: 0 6px; }
.result-chip { justify-self: start; margin: 6px 6px 0; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(52, 199, 89, 0.14); color: #1f9d48; }
@media (prefers-color-scheme: dark) { .result-chip { color: var(--green); } }
.tool-art { height: 190px; border-radius: 22px; background: var(--bg-grouped); padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 8px; overflow: hidden; font-size: 12.5px; }
@media (max-width: 1000px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tools { grid-template-columns: 1fr; } }

.art-site { padding: 14px; gap: 0; }
.b-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: var(--bg-elev); border-radius: 12px 12px 0 0; border-bottom: 0.5px solid var(--sep); }
.b-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); }
.b-bar span { margin-left: 8px; flex: 1; text-align: center; font-size: 10.5px; color: var(--text-3); }
.b-body { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; padding: 12px; background: var(--bg-elev); border-radius: 0 0 12px 12px; align-items: center; }
.b-hero { display: grid; gap: 6px; }
.b-hero .h { height: 12px; width: 90%; border-radius: 6px; background: var(--text); opacity: 0.85; }
.b-hero .l { height: 7px; width: 100%; border-radius: 4px; background: var(--fill-2); }
.b-hero .l.s { width: 65%; }
.btn-mini { justify-self: start; margin-top: 4px; font-size: 10px; font-weight: 700; color: #fff; background: #007aff; padding: 5px 10px; border-radius: 10px; }
.b-pic { height: 92px; border-radius: 10px; background: linear-gradient(135deg, #9fd0ff, #7be0c8); }

.art-book .cal-head { display: flex; justify-content: space-between; font-size: 13px; }
.art-book .cal-head span { color: var(--blue); font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.cal-grid span { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.cal-grid i { font-style: normal; font-weight: 600; padding: 5px 0; border-radius: 50%; }
.cal-grid i.on { background: var(--blue); color: #fff; }
.tool-art .slot-grid span { font-size: 12px; padding: 7px 0; }

.art-chat .bub { max-width: 82%; padding: 8px 12px; border-radius: 16px; line-height: 1.35; }
.art-chat .bub.in { background: var(--bg-elev); align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: var(--shadow-1); }
.art-chat .bub.out { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }

.art-call { background: linear-gradient(160deg, #1e2a3a, #0f1620); color: #fff; align-items: stretch; }
.call-top { display: flex; align-items: center; gap: 12px; }
.call-top b { display: block; font-size: 14px; }
.call-top small { opacity: 0.6; }
.ring { width: 44px; height: 44px; border-radius: 50%; background: #34c759; position: relative; flex: none; }
.ring span, .ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #34c759; animation: ringOut 1.8s ease-out infinite; }
.ring::after { animation-delay: 0.9s; }
@keyframes ringOut { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.8); opacity: 0; } }
.wave { display: flex; align-items: center; gap: 4px; height: 44px; justify-content: center; }
.wave i { width: 5px; border-radius: 3px; background: #5ac8fa; height: 30%; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: 0.15s; } .wave i:nth-child(3n) { animation-delay: 0.3s; } .wave i:nth-child(4n) { animation-delay: 0.45s; }
@keyframes wave { 50% { height: 95%; } }
.call-note { text-align: center; opacity: 0.75; }

.notif-mini { display: grid; grid-template-columns: 30px 1fr; gap: 10px; background: var(--bg-elev); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-1); line-height: 1.35; }
.notif-mini b { display: block; }
.ic-mini { width: 30px; height: 30px; border-radius: 8px; }
.confirm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.confirm-row .ok { font-weight: 700; color: #1f9d48; background: rgba(52, 199, 89, 0.14); padding: 4px 10px; border-radius: 999px; }
.confirm-row .cnt { color: var(--text-3); }

.rating-big { display: flex; align-items: baseline; gap: 10px; }
.rating-big b { font: 800 40px/1 var(--font-display); letter-spacing: -0.03em; }
.rating-big span { color: #ffb800; font-size: 18px; letter-spacing: 2px; }
.bars-mini { display: grid; gap: 4px; }
.bars-mini i { height: 7px; border-radius: 4px; background: #ffcc00; display: block; }
.bars-mini i:nth-child(n+2) { background: var(--fill-2); }
.req { color: var(--text-3); }

/* Also available */
.also { margin-top: 30px; padding: 22px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-1); display: grid; gap: 14px; }
.also h3 { font-size: 17px; }
.also-list { display: flex; flex-wrap: wrap; gap: 10px; }
.also-list > span { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--bg-grouped); font-weight: 600; font-size: 14.5px; }
@media (max-width: 560px) {
  .niche { aspect-ratio: 1 / 1; padding: 12px; }
  .niche b { font-size: 15px; line-height: 1.25; }
  .niche-ic { top: 12px; left: 12px; }
}
