#tab-ideas { max-width: 520px; margin: 0 auto; }
html.discovery-open,html.discovery-open body { overflow: hidden; overscroll-behavior: none; }
html.discovery-open #tab-ideas.active { position: fixed; top: var(--discovery-top,160px); left: 0; right: 0; width: min(520px,calc(100% - 24px)); height: calc(var(--discovery-height,calc(100dvh - 180px)) - env(safe-area-inset-bottom,0px)); max-width: none; margin: 0 auto; padding: 0; min-height: 0; overflow: visible; animation:discovery-screen-in .16s ease-out; }
html.discovery-open #tab-ideas.active {z-index:1;}
@keyframes discovery-screen-in {from{opacity:0;}to{opacity:1;}}
#tab-ideas > .card { border: 0; padding: 0; background: transparent; box-shadow: none; }
.discovery-shell { position: relative; display:flex;flex-direction:column;gap:8px;height:100%;min-height:0;padding:0; }
.discovery-card { position: relative;display:flex;flex-direction:column;flex:1 1 0;min-height:0; border: 1px solid var(--zg-border); border-radius: 24px; overflow: hidden; background: var(--zg-surface); box-shadow: var(--zg-material-shadow); touch-action: none; user-select: none; transform-origin: 50% 85%;transition:transform .18s ease-out; }
.discovery-card.is-dragging {transition:none;}
.discovery-media { position: relative;flex:1 1 0;min-height:0;overflow:hidden;background: var(--zg-soft); }
.discovery-media img { position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;object-fit:cover; }
.discovery-media img[hidden] {display:none;}
.discovery-image-missing > span {position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:12px;}
.discovery-image-missing { color: var(--zg-muted); font-size: 13px; }
.discovery-ad { position: absolute; top: 12px; left: 12px; min-height: 32px; padding: 6px 12px; border: 1px solid var(--zg-border); border-radius: 20px; background: var(--zg-surface); color: var(--zg-muted); font: inherit; font-size: 12px; }
.discovery-copy { flex:0 0 auto;min-width:0;padding:12px 16px; }
.discovery-copy h2 { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:0;font-size:clamp(17px,4.7vw,21px);line-height:1.25;font-weight:600;letter-spacing:-.4px;overflow-wrap:anywhere; }
.discovery-copy > p { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:6px 0 8px;color:var(--zg-muted);font-size:13px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere; }
.discovery-copy > p:empty { display: none; }
.discovery-product-bottom { display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:12px;min-width:0; }
.discovery-price { flex:1 1 auto;min-width:0;white-space:nowrap;font-size:clamp(18px,5vw,26px);line-height:1.2; }
.discovery-shop { display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;gap:6px;width:auto;max-width:none;white-space:nowrap;overflow-wrap:normal;margin:0;padding:8px 0 8px 4px;min-height:38px;border:0;background:transparent;color:var(--zg-accent);font-size:13px;line-height:1.2;text-decoration:none;box-shadow:none; }
.discovery-shop > span {white-space:nowrap;}
.discovery-shop .zg-icon { width: 16px; height: 16px; }
.discovery-reactions { display:flex;align-items:center;justify-content:center;flex:0 0 auto;gap:28px;margin:0; }
.discovery-reaction { display: grid; justify-items: center; gap: 5px; min-width: 90px; padding: 0; border: 0; background: transparent; color: var(--zg-muted); font: inherit; font-size: 12px; }
.discovery-reaction > span:first-child {display:grid;place-items:center;box-sizing:border-box;width:80px;height:80px;border:1px solid var(--zg-border);border-radius:50%;background:var(--zg-glass);box-shadow:var(--zg-material-shadow);}
.discovery-reaction .zg-icon { width: 26px; height: 26px; }
.discovery-reaction.discovery-like > span:first-child {border:0;background:linear-gradient(115deg,#6243b6,#9a409a);color:#ffffff;}
.discovery-media .discovery-reactions {position:absolute;bottom:16px;left:12px;right:12px;z-index:2;justify-content:center;gap:clamp(24px,7vw,36px);margin:0;pointer-events:none;}
.discovery-media .discovery-reaction {position:relative;display:grid;place-items:center;min-width:80px;width:80px;min-height:80px;height:80px;padding:0;pointer-events:auto;}
.discovery-media .discovery-reaction > span:first-child {width:80px;height:80px;box-shadow:0 5px 18px #00000038;}
.discovery-media .discovery-reaction .zg-icon {width:36px;height:36px;}
.discovery-media .discovery-skip > span:first-child {background:var(--zg-surface);color:var(--zg-text);border:1px solid var(--zg-border);}
.discovery-media .discovery-reaction > span:last-child {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
:root[data-zg-theme="dark"] .discovery-reaction.discovery-like > span:first-child { background: linear-gradient(115deg,#d0b4ff,#f3a9d2); color: #302041; }
.discovery-destination {display:flex;align-items:center;justify-content:center;flex:0 0 auto;gap:4px;min-height:32px;max-width:100%;min-width:0;margin:0 auto;padding:0 4px;color:var(--zg-muted);font:inherit;font-size:12px;line-height:20px;}
.discovery-destination > span {flex:0 0 auto;white-space:nowrap;}
.discovery-destination button {appearance:none;border:0;background:transparent;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;}
.discovery-destination-name {min-width:0;min-height:32px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px 3px;color:var(--zg-accent);font-weight:600!important;}
.discovery-destination-change {display:grid;place-items:center;flex:0 0 32px;width:32px;min-height:32px;padding:0;border-radius:9px;color:var(--zg-muted);}
.discovery-destination-change .zg-icon {width:16px;height:16px;}
.discovery-destination button:hover {color:var(--zg-accent);}
.discovery-destination-change:hover {background:var(--zg-soft);}
.discovery-destination button:disabled {opacity:.55;cursor:default;}
.discovery-stamp {position:absolute;top:18%;left:15px;z-index:3;max-width:calc(100% - 30px);white-space:nowrap;padding:8px 11px;border:2px solid currentColor;border-radius:10px;background:var(--zg-surface);color:var(--zg-good);font-size:clamp(14px,4vw,18px);font-weight:600;transform:rotate(-9deg);opacity:0;pointer-events:none;}
.discovery-stamp[data-direction="skip"] { left: auto; right: 15px; color: var(--zg-bad); transform: rotate(9deg); }
.discovery-leave-like { animation: discovery-like .26s ease-in forwards; }
.discovery-leave-skip { animation: discovery-skip .26s ease-in forwards; }
@keyframes discovery-like {from{transform:var(--discovery-release-transform,translateX(0) rotate(0deg));}to{transform:translateX(calc(100vw + 100%)) rotate(18deg);}}
@keyframes discovery-skip {from{transform:var(--discovery-release-transform,translateX(0) rotate(0deg));}to{transform:translateX(calc(-100vw - 100%)) rotate(-18deg);}}
.discovery-empty { display:grid;justify-items:center;align-content:center;flex:1;min-height:0;padding:16px;text-align:center; }
.discovery-empty h2 { margin: 18px 0 0; font-size: 25px; }
.discovery-empty p { max-width: 320px; margin: 12px 0 20px; color: var(--zg-muted); font-size: 14px; line-height: 1.6; }
.discovery-empty .btn { width: min(100%,280px); }
.discovery-empty-mark { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 26px; background: var(--zg-soft); color: var(--zg-accent); }
.discovery-empty-mark .zg-icon { width: 34px; height: 34px; }
.discovery-inline-error { color: var(--zg-bad); font-size: 13px; line-height: 1.5; margin: 10px 0; }
.discovery-dialog { width: min(440px,calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 0; margin: auto; border: 1px solid var(--zg-border); border-radius: 24px; background: var(--zg-surface); color: var(--zg-text); overflow: auto; overscroll-behavior: contain; box-shadow: var(--zg-shadow); }
.discovery-dialog:focus { outline: none; }
.discovery-dialog::backdrop { background: #0715198c; backdrop-filter: blur(4px); }
.discovery-dialog-body { padding: 0 18px 18px; }
.discovery-dialog .btn { width: 100%; margin: 12px 0 0; }
.discovery-choices { display: grid; gap: 4px; margin-top: 12px; }
.discovery-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; width: 100%; padding: 12px; border: 0; border-radius: 13px; background: transparent; color: var(--zg-text); text-align: left; font: inherit; }
.discovery-choice strong { display: block; font-size: 14px; font-weight: 600; }
.discovery-choice small { display: block; color: var(--zg-muted); font-size: 12px; margin-top: 3px; }
.discovery-choice[aria-pressed="true"] { color: var(--zg-accent); background: var(--zg-soft); }
.discovery-choice[aria-pressed="true"]::after { content: '✓'; flex-shrink: 0; }
.discovery-tutorial {position:relative;inset:auto;z-index:6;flex:0 0 auto;pointer-events:none;}
.discovery-tutorial-hand {position:absolute;top:32%;left:calc(50% - 22px);z-index:1;width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--zg-glass-edge);border-radius:50%;background:var(--zg-glass);color:var(--zg-accent);pointer-events:none;animation:discovery-teach-right 1.8s ease-in-out infinite;}
.discovery-tutorial-hand .zg-icon{width:26px;height:26px;}
.discovery-tutorial-hand[data-step="1"]{animation-name:discovery-teach-left;}
.discovery-tutorial-hand[data-step="1"] .zg-icon{transform:rotate(180deg);}
.discovery-tutorial-bubble {position:relative;padding:10px 12px;border:1px solid var(--zg-border);border-radius:16px;background:var(--zg-surface);box-shadow:var(--zg-shadow);}
.discovery-training-label{color:var(--zg-muted);font-size:12px;}
.discovery-teaching .discovery-copy>p{display:none;}
.discovery-wrong{animation:discovery-wrong .28s ease-out;}
@keyframes discovery-wrong{0%,100%{transform:translateX(0);}25%{transform:translateX(-10px) rotate(-1deg);}65%{transform:translateX(9px) rotate(1deg);}}
.discovery-tutorial-bubble h3 {margin:0;font-size:15px;line-height:1.3;}
.discovery-tutorial-bubble p {margin:5px 0 8px;color:var(--zg-muted);font-size:12px;line-height:1.4;}
.discovery-tutorial-bubble button {pointer-events:auto;}
.discovery-tutorial button:disabled {opacity:1;}
.discovery-dialog-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.discovery-dialog-actions {margin-top:8px;}
.discovery-dialog-actions .btn {width:100%;margin:0;padding:5px 8px;min-height:30px;font-size:12px;line-height:18px;}
@media(max-height:700px){.discovery-tutorial-bubble p{display:none;}.discovery-copy > p{-webkit-line-clamp:2;}.discovery-copy{padding:10px 12px;}}
@media(max-height:480px){html.discovery-open .header .app-tagline{display:none;}.discovery-shell{gap:6px;}.discovery-copy{padding:8px 12px;}.discovery-copy h2{font-size:16px;-webkit-line-clamp:1;}.discovery-copy>p{font-size:11px;-webkit-line-clamp:1;margin:4px 0;}.discovery-reaction{display:flex;align-items:center;gap:7px;}.discovery-reaction .zg-icon{width:22px;height:22px;}.discovery-destination{min-height:24px;line-height:16px;font-size:11px;}.discovery-tutorial-bubble{padding:8px;}.discovery-tutorial-bubble h3{font-size:13px;}.discovery-dialog-actions .btn{min-height:26px;padding:3px 6px;font-size:11px;}}
@media(max-height:480px){.discovery-media .discovery-reactions{bottom:10px;}}
@keyframes discovery-teach-right{0%,10%{transform:translateX(-32px);opacity:0;}24%{opacity:1;}68%{transform:translateX(32px);opacity:1;}85%,100%{transform:translateX(32px);opacity:0;}}
@keyframes discovery-teach-left{0%,10%{transform:translateX(32px);opacity:0;}24%{opacity:1;}68%{transform:translateX(-32px);opacity:1;}85%,100%{transform:translateX(-32px);opacity:0;}}
.discovery-empty-suggestion { margin-top: 16px; padding: 18px; border: 1px solid var(--zg-border); border-radius: 20px; background: var(--zg-soft); }
.discovery-empty-suggestion p { color: var(--zg-muted); font-size: 13px; }
.discovery-empty-suggestion[hidden] { display: none; }
@media(prefers-reduced-motion:reduce) { .discovery-card,.discovery-tutorial-hand { animation:none!important;transition:none!important; } }
