File size: 66,972 Bytes
dce6926
 
 
 
 
173506a
dce6926
173506a
dce6926
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
 
 
173506a
 
 
dce6926
 
 
173506a
 
 
dce6926
 
173506a
dce6926
173506a
 
 
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
 
 
 
dce6926
 
 
173506a
dce6926
 
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
173506a
dce6926
 
 
173506a
 
 
 
 
 
 
 
 
 
 
 
dce6926
 
173506a
 
 
 
 
 
 
dce6926
 
 
 
173506a
dce6926
 
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
 
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
 
173506a
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
 
dce6926
173506a
 
 
 
 
dce6926
173506a
 
 
 
dce6926
173506a
 
 
 
dce6926
173506a
dce6926
173506a
dce6926
 
 
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
173506a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dce6926
 
173506a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vino Oracle โ€” Wine Intelligence</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Cinzel:wght@400;600&family=Jost:wght@300;400;500&display=swap" rel="stylesheet">
<style>
:root {
  --ink:#0d0908; --burgundy:#6b1f2e; --wine:#9b2335; --rust:#c84b2f;
  --gold:#d4a843; --gold-lt:#e8c870; --cream:#f2ead8; --parch:#e8dfc8;
  --mist:#c4b9a8; --smoke:#8a7d6e;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:var(--ink);color:var(--cream);font-family:'Jost',sans-serif;min-height:100vh;overflow-x:hidden}

.bg{position:fixed;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse 85% 50% at 12% 4%,rgba(107,31,46,.48) 0%,transparent 62%),
             radial-gradient(ellipse 55% 45% at 88% 88%,rgba(155,35,53,.28) 0%,transparent 55%)}
.noise{position:fixed;inset:0;z-index:1;pointer-events:none;opacity:.3;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E")}

.page{position:relative;z-index:2;max-width:1120px;margin:0 auto;padding:0 24px 80px}

/* HEADER */
header{text-align:center;padding:64px 0 48px}
.eyebrow{font-family:'Cinzel',serif;font-size:9px;letter-spacing:7px;color:var(--gold);text-transform:uppercase;margin-bottom:18px;opacity:.7}
h1{font-family:'Playfair Display',serif;font-size:clamp(52px,9vw,104px);font-weight:400;line-height:.88;letter-spacing:-3px;color:var(--cream)}
h1 i{font-style:italic;color:var(--gold-lt)}
.tagline{margin-top:16px;font-family:'Playfair Display',serif;font-style:italic;font-size:15px;color:var(--mist)}
.badge{display:inline-block;margin-top:12px;padding:5px 14px;border:1px solid rgba(212,168,67,.25);border-radius:20px;font-family:'Jost',sans-serif;font-size:11px;color:var(--smoke);letter-spacing:.5px}
.badge b{color:var(--gold);font-weight:500}

/* DIVIDER */
.rule{display:flex;align-items:center;gap:14px;justify-content:center;margin:32px 0}
.rl{flex:1;max-width:120px;height:1px;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
.rd{width:7px;height:7px;background:var(--gold);transform:rotate(45deg)}

/* SEARCH */
.sw{max-width:620px;margin:0 auto 52px}
.sb{display:flex;align-items:stretch;background:rgba(242,234,216,.04);border:1px solid rgba(212,168,67,.28);border-radius:3px;overflow:hidden;transition:border-color .3s,box-shadow .3s}
.sb:focus-within{border-color:var(--gold);box-shadow:0 0 0 1px rgba(212,168,67,.15),0 12px 40px rgba(0,0,0,.4)}
.sg{display:grid;place-items:center;padding:0 15px;color:var(--gold);font-size:16px;opacity:.5}
#wi{flex:1;background:none;border:none;outline:none;padding:16px 6px;font-family:'Playfair Display',serif;font-size:19px;font-style:italic;color:var(--cream)}
#wi::placeholder{color:rgba(242,234,216,.25)}
#gb{background:var(--gold);color:var(--ink);border:none;padding:0 26px;font-family:'Cinzel',serif;font-size:10px;letter-spacing:3px;cursor:pointer;transition:background .2s}
#gb:hover{background:var(--gold-lt)}

/* CHIPS */
.chips{display:flex;flex-wrap:wrap;gap:7px;justify-content:center;margin-top:16px}
.chip{font-family:'Playfair Display',serif;font-style:italic;font-size:13px;padding:7px 14px;background:rgba(242,234,216,.04);border:1px solid rgba(242,234,216,.1);border-radius:2px;color:var(--mist);cursor:pointer;transition:all .2s}
.chip:hover{background:rgba(212,168,67,.12);border-color:rgba(212,168,67,.35);color:var(--gold-lt)}

/* STATES */
#msg{display:none;text-align:center;padding:28px;font-family:'Playfair Display',serif;font-style:italic;color:#e09080;font-size:17px}
#msg.on{display:block}

/* RESULT */
#result{display:none}
#result.on{display:block;animation:rise .5s cubic-bezier(.16,1,.3,1) both}
@keyframes rise{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}

/* LAYOUT */
.layout{display:grid;grid-template-columns:260px 1fr;gap:48px;align-items:start}
@media(max-width:720px){.layout{grid-template-columns:1fr}.sc{position:static!important}}
.sc{position:sticky;top:28px}

/* BOTTLE */
.bw{position:relative;width:100%;aspect-ratio:.48}
.bsvg{width:100%;height:100%;filter:drop-shadow(0 22px 60px rgba(107,31,46,.7));transition:filter .6s}

/* ANNOTATIONS */
.al{position:absolute;inset:0;pointer-events:none}
.an{position:absolute;display:flex;align-items:center;opacity:0;animation:anin .4s ease both}
@keyframes anin{from{opacity:0;transform:translateX(5px)}to{opacity:1;transform:none}}
.ab{display:flex;flex-direction:column}
.ak{font-family:'Cinzel',serif;font-size:8px;letter-spacing:2px;color:var(--gold);opacity:.65;text-transform:uppercase;white-space:nowrap}
.av{font-family:'Playfair Display',serif;font-style:italic;font-size:12px;color:var(--cream);margin-top:1px;white-space:nowrap}
.aline{height:1px;min-width:20px}
.adot{width:5px;height:5px;border-radius:50%;background:var(--gold);flex-shrink:0}
.an.r{flex-direction:row}
.an.r .aline{background:linear-gradient(90deg,var(--gold),rgba(212,168,67,0))}
.an.l{flex-direction:row-reverse}
.an.l .aline{background:linear-gradient(90deg,rgba(212,168,67,0),var(--gold))}
.an.l .ab{text-align:right}

/* INFO */
.wt{font-family:'Playfair Display',serif;font-size:clamp(26px,4vw,46px);font-weight:400;line-height:1.1;color:var(--cream);margin-bottom:3px}
.ws{font-family:'Cinzel',serif;font-size:10.5px;letter-spacing:3px;color:var(--gold);margin-bottom:20px;opacity:.8}
.wl{display:flex;align-items:center;gap:8px;margin-bottom:26px;font-family:'Playfair Display',serif;font-style:italic;color:var(--mist);font-size:15px}
.fl{font-size:20px}

/* SCORE */
.sb2{display:flex;gap:18px;align-items:center;padding:20px 22px;margin-bottom:26px;background:rgba(212,168,67,.07);border:1px solid rgba(212,168,67,.18);border-radius:3px}
.sn{font-family:'Playfair Display',serif;font-size:66px;font-weight:700;line-height:1;color:var(--gold)}
.sm{flex:1}
.sl{font-family:'Cinzel',serif;font-size:9px;letter-spacing:3px;color:var(--gold);opacity:.6}
.st{font-family:'Playfair Display',serif;font-style:italic;font-size:15px;color:var(--cream);margin-top:3px}
.stars{display:flex;gap:3px;margin-top:7px}
.star{width:13px;height:13px;fill:var(--gold);opacity:.15}
.star.on{opacity:1}
.rb{display:inline-flex;align-items:center;gap:6px;margin-top:9px;padding:4px 11px;background:rgba(242,234,216,.04);border:1px solid rgba(242,234,216,.08);border-radius:20px;font-size:11.5px;color:var(--mist)}
.rdot{width:6px;height:6px;border-radius:50%;background:var(--rust)}

/* TASTING NOTE */
.tn{padding:18px 20px;margin-bottom:26px;border-left:2px solid var(--gold);background:rgba(212,168,67,.04);font-family:'Playfair Display',serif;font-style:italic;font-size:17px;line-height:1.7;color:var(--cream);opacity:.9}

/* CHAR GRID */
.cg{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin-bottom:26px}
.cc{padding:13px 15px;background:rgba(242,234,216,.04);border:1px solid rgba(242,234,216,.06);transition:background .2s}
.cc:hover{background:rgba(242,234,216,.07)}
.ck{font-family:'Cinzel',serif;font-size:8px;letter-spacing:2px;color:var(--gold);opacity:.6;margin-bottom:4px}
.cv{font-family:'Playfair Display',serif;font-size:16px;color:var(--cream)}

/* FLAVOR */
.sh{font-family:'Cinzel',serif;font-size:9px;letter-spacing:3px;color:var(--gold);opacity:.7;margin-bottom:13px}
.fr{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.fn{font-family:'Jost',sans-serif;font-size:11px;color:var(--mist);width:80px;flex-shrink:0}
.bt{flex:1;height:3px;background:rgba(242,234,216,.08);border-radius:2px;overflow:hidden}
.bf{height:100%;background:linear-gradient(90deg,var(--burgundy),var(--gold));border-radius:2px;width:0;transition:width 1s cubic-bezier(.16,1,.3,1)}
.bp{font-family:'Playfair Display',serif;font-size:12px;color:var(--gold);width:28px;text-align:right;flex-shrink:0}
.fw{margin-bottom:26px}

/* PAIRING */
.pr{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:26px}
.pt{font-family:'Jost',sans-serif;font-size:11px;font-weight:300;padding:6px 13px;background:rgba(107,31,46,.4);border:1px solid rgba(155,35,53,.35);border-radius:2px;color:var(--parch)}

/* PRICE */
.pb{display:inline-flex;align-items:center;gap:10px;padding:11px 20px;background:rgba(212,168,67,.09);border:1px solid rgba(212,168,67,.28);border-radius:3px;font-family:'Playfair Display',serif;font-size:20px;color:var(--gold-lt)}
.pl{font-family:'Cinzel',serif;font-size:9px;letter-spacing:2px;color:var(--gold);opacity:.55}

/* VINTAGE BADGE */
.vb{display:inline-flex;align-items:center;gap:8px;margin-bottom:26px;padding:6px 16px;background:rgba(92,26,46,.35);border:1px solid rgba(139,26,58,.3);border-radius:2px}
.vby{font-family:'Cinzel',serif;font-size:20px;font-weight:600;color:var(--gold-lt)}
.vbl{font-family:'Jost',sans-serif;font-size:10px;letter-spacing:2px;color:var(--mist);text-transform:uppercase}

.src{margin-top:16px;font-family:'Jost',sans-serif;font-size:10.5px;color:var(--smoke)}

footer{text-align:center;padding:48px 0 0;font-family:'Cinzel',serif;font-size:8px;letter-spacing:5px;color:rgba(242,234,216,.1);text-transform:uppercase}

/* SUGGESTION DROPDOWN */
.sug{position:relative}
.sdrop{display:none;position:absolute;top:100%;left:0;right:0;background:#1a0f0c;border:1px solid rgba(212,168,67,.25);border-top:none;z-index:100;max-height:260px;overflow-y:auto}
.sdrop.on{display:block}
.sitem{padding:10px 16px;cursor:pointer;font-family:'Playfair Display',serif;font-size:15px;color:var(--mist);border-bottom:1px solid rgba(242,234,216,.04);transition:background .15s}
.sitem:hover,.sitem.active{background:rgba(212,168,67,.1);color:var(--gold-lt)}
.sitem span{font-size:11px;font-style:italic;color:var(--smoke);margin-left:8px}
</style>
</head>
<body>
<div class="bg"></div>
<div class="noise"></div>
<div class="page">

  <header>
    <div class="eyebrow">Wine Intelligence</div>
    <h1>Vino <i>Oracle</i></h1>
    <p class="tagline">120 iconic wines ยท real ratings ยท zero network requests</p>
    <span class="badge">๐Ÿ”’ Fully offline ยท <b>No API key</b> ยท Works on any static host</span>
  </header>

  <div class="rule"><div class="rl"></div><div class="rd"></div><div class="rl"></div></div>

  <div class="sw">
    <div class="sug">
      <div class="sb">
        <div class="sg">โ—ˆ</div>
        <input type="text" id="wi" placeholder="Search wine, grape or producerโ€ฆ" autocomplete="off"/>
        <button id="gb">Reveal</button>
      </div>
      <div class="sdrop" id="sdrop"></div>
    </div>
    <div class="chips">
      <span class="chip" data-q="Chรขteau Margaux">Margaux</span>
      <span class="chip" data-q="Opus One">Opus One</span>
      <span class="chip" data-q="Sassicaia">Sassicaia</span>
      <span class="chip" data-q="Dom Pรฉrignon">Dom Pรฉrignon</span>
      <span class="chip" data-q="Penfolds Grange">Penfolds Grange</span>
      <span class="chip" data-q="Cloudy Bay">Cloudy Bay</span>
      <span class="chip" data-q="Barolo">Barolo</span>
      <span class="chip" data-q="Malbec">Malbec</span>
    </div>
  </div>

  <div id="msg"></div>

  <div id="result">
    <div class="layout">
      <div class="sc">
        <div class="bw">
          <svg class="bsvg" id="bsvg" viewBox="0 0 220 580" fill="none" xmlns="http://www.w3.org/2000/svg">
            <ellipse cx="110" cy="562" rx="52" ry="11" fill="rgba(0,0,0,0.35)"/>
            <rect x="89" y="44" width="42" height="58" rx="3" id="bc" fill="#6b1f2e"/>
            <rect x="89" y="96" width="42" height="5" fill="rgba(0,0,0,0.2)"/>
            <path d="M89 101 L89 152 Q89 163 80 168 L80 263 Q80 272 71 278" fill="#1e3820" id="bn"/>
            <path d="M131 101 L131 152 Q131 163 140 168 L140 263 Q140 272 149 278" fill="#1e3820"/>
            <path d="M71 278 Q64 292 64 312 L64 476 Q64 500 71 512 Q78 523 86 528 L134 528 Q142 523 149 512 Q156 500 156 476 L156 312 Q156 292 149 278 Z" fill="#1e3820" id="bb"/>
            <path d="M74 294 Q71 368 72 452 Q73 471 76 486" stroke="rgba(255,255,255,0.06)" stroke-width="5.5" stroke-linecap="round" fill="none"/>
            <path d="M144 300 Q148 382 146 453" stroke="rgba(255,255,255,0.03)" stroke-width="4" stroke-linecap="round" fill="none"/>
            <path d="M75 335 Q75 316 80 306 L140 306 Q145 316 145 335 L145 476 Q145 496 140 506 Q134 516 127 519 L93 519 Q86 516 80 506 Q75 496 75 476 Z" fill="#6b1f2e" id="bl"/>
            <rect x="76" y="345" width="68" height="96" rx="2" fill="#f2ead8" id="blabel"/>
            <rect x="79" y="348" width="62" height="90" rx="1" fill="none" stroke="#d4a843" stroke-width=".8"/>
            <line x1="90" y1="355" x2="130" y2="355" stroke="#d4a843" stroke-width=".5"/>
            <text id="l1" x="110" y="369" font-family="serif" font-size="6.5" fill="#6b1f2e" text-anchor="middle" font-style="italic">ESTATE</text>
            <text id="l2" x="110" y="383" font-family="serif" font-size="8.5" fill="#1a0f0a" text-anchor="middle" font-weight="bold">WINE</text>
            <text id="l3" x="110" y="394" font-family="serif" font-size="6" fill="#7a5c3a" text-anchor="middle">โ€”</text>
            <rect x="97" y="399" width="26" height="18" rx="1" fill="none" stroke="#d4a843" stroke-width=".5"/>
            <text id="l4" x="110" y="412" font-family="serif" font-size="5" fill="#6b1f2e" text-anchor="middle">RESERVE</text>
            <line x1="90" y1="427" x2="130" y2="427" stroke="#d4a843" stroke-width=".5"/>
            <path d="M82 521 Q110 509 138 521" stroke="rgba(0,0,0,0.22)" stroke-width="1.5" fill="none"/>
            <ellipse cx="110" cy="521" rx="46" ry="7.5" fill="#152915" opacity=".85"/>
            <rect x="101" y="34" width="18" height="15" rx="2.5" fill="#c4a07a"/>
            <rect x="103" y="39" width="14" height="1.5" fill="rgba(0,0,0,0.1)" rx="1"/>
            <rect x="103" y="43" width="14" height="1.5" fill="rgba(0,0,0,0.1)" rx="1"/>
          </svg>
          <div class="al" id="al"></div>
        </div>
      </div>

      <div class="info">
        <div class="wt" id="rn">โ€”</div>
        <div class="ws" id="rs">โ€” ยท โ€”</div>
        <div class="wl"><span class="fl" id="rf">๐Ÿท</span><span id="rl">โ€”</span></div>
        <div class="vb" id="rvb"><span class="vbl">Vintage</span><span class="vby" id="rvy">โ€”</span></div>
        <div class="sb2">
          <div class="sn" id="rsc">โ€”</div>
          <div class="sm">
            <div class="sl">CRITIC SCORE / 100</div>
            <div class="st" id="rti">โ€”</div>
            <div class="stars" id="rstr"></div>
            <div class="rb"><div class="rdot"></div><span id="rrev">โ€”</span></div>
          </div>
        </div>
        <div class="tn" id="rno"></div>
        <div class="cg" id="rcg"></div>
        <div class="fw"><div class="sh">FLAVOUR PROFILE</div><div id="rfl"></div></div>
        <div class="sh">FOOD PAIRING</div>
        <div class="pr" id="rpr"></div>
        <div class="pb"><span class="pl">AVG PRICE</span><span id="rpri">โ€”</span></div>
        <div class="src">Curated dataset ยท 120 iconic wines ยท ratings from Wine Spectator &amp; Wine Advocate</div>
      </div>
    </div>
  </div>
</div>
<footer>Vino Oracle ยท Embedded Dataset ยท No Network Required ยท Static HTML</footer>

<script>
/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
   EMBEDDED WINE DATABASE  โ€” 120 wines, no fetch needed
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
const WINES = [
  // โ”€โ”€ BORDEAUX โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Chรขteau Margaux",p:"Chรขteau Margaux",r:"Margaux, Bordeaux",c:"France",y:"2015",t:"red",g:"Cabernet Sauvignon, Merlot",abv:"13.5%",sc:99,rev:"Wine Spectator",tier:"Legendary",pri:"$800โ€“$1200",
   note:"Hauntingly beautiful โ€” layers of cassis, violet, cedar and graphite give way to a silky, eternally long finish. The most perfumed First Growth.",
   fl:[{n:"Cassis",p:94},{n:"Violet",p:88},{n:"Cedar",p:80},{n:"Graphite",p:72},{n:"Truffle",p:65}],
   ch:{body:"Full",tannins:"Velvety",acidity:"High",finish:"Eternal",color:"Deep Ruby",ageing:"40+ years"},pair:["Lamb","Venison","Truffle","Aged Parmesan","Beef Wellington"]},

  {n:"Chรขteau Pรฉtrus",p:"Pomerol",r:"Pomerol, Bordeaux",c:"France",y:"2000",t:"red",g:"100% Merlot",abv:"14%",sc:100,rev:"Robert Parker",tier:"Perfect",pri:"$3500โ€“$6000",
   note:"Perfect in every dimension โ€” pure blue fruit, chocolate, mocha and iron minerality with unrivalled concentration. The greatest Merlot on earth.",
   fl:[{n:"Blue Fruit",p:98},{n:"Chocolate",p:88},{n:"Mocha",p:85},{n:"Iron",p:70},{n:"Violet",p:78}],
   ch:{body:"Immense",tannins:"Massive",acidity:"High",finish:"Infinite",color:"Opaque Ruby",ageing:"50+ years"},pair:["Wagyu Beef","Black Truffle","Foie Gras","Venison","Chocolate"]},

  {n:"Chรขteau Latour",p:"Chรขteau Latour",r:"Pauillac, Bordeaux",c:"France",y:"2010",t:"red",g:"Cabernet Sauvignon, Merlot",abv:"13.5%",sc:100,rev:"Wine Spectator",tier:"Perfect",pri:"$1200โ€“$1800",
   note:"Monolithic, unyielding power wrapped in pure blackcurrant, lead pencil and tobacco. A wine for the ages.",
   fl:[{n:"Blackcurrant",p:95},{n:"Lead Pencil",p:82},{n:"Tobacco",p:75},{n:"Cedar",p:78},{n:"Iron",p:68}],
   ch:{body:"Full",tannins:"Iron",acidity:"High",finish:"Very Long",color:"Dense Ruby",ageing:"50+ years"},pair:["Beef","Lamb","Truffle Pasta","Venison","Game"]},

  {n:"Chรขteau Mouton Rothschild",p:"Chรขteau Mouton Rothschild",r:"Pauillac, Bordeaux",c:"France",y:"2016",t:"red",g:"Cabernet Sauvignon",abv:"13.5%",sc:99,rev:"Robert Parker",tier:"Legendary",pri:"$700โ€“$1000",
   note:"Opulent and aristocratic โ€” crushed blackberry, mocha, cedar shavings and a whisper of graphite. The most hedonistic First Growth.",
   fl:[{n:"Blackberry",p:92},{n:"Mocha",p:80},{n:"Cedar",p:76},{n:"Graphite",p:70},{n:"Tobacco",p:65}],
   ch:{body:"Full",tannins:"Firm",acidity:"High",finish:"Very Long",color:"Deep Ruby",ageing:"40+ years"},pair:["Roast Lamb","Venison","Beef","Truffle","Strong Cheese"]},

  {n:"Chรขteau Haut-Brion",p:"Chรขteau Haut-Brion",r:"Pessac-Lรฉognan, Bordeaux",c:"France",y:"2009",t:"red",g:"Cabernet Sauvignon, Merlot, Cabernet Franc",abv:"13.5%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$600โ€“$900",
   note:"Smoky, earthy and profoundly complex โ€” tobacco, gravel, black cherry and iron minerality unlike any other First Growth. Unique terroir in a glass.",
   fl:[{n:"Tobacco",p:88},{n:"Black Cherry",p:85},{n:"Gravel",p:75},{n:"Mocha",p:72},{n:"Smoke",p:68}],
   ch:{body:"Full",tannins:"Silky",acidity:"High",finish:"Eternal",color:"Garnet",ageing:"40+ years"},pair:["Game","Truffle","Roast Beef","Strong Cheese","Duck"]},

  {n:"Chรขteau Lynch-Bages",p:"Chรขteau Lynch-Bages",r:"Pauillac, Bordeaux",c:"France",y:"2018",t:"red",g:"Cabernet Sauvignon, Merlot",abv:"14%",sc:97,rev:"Wine Spectator",tier:"Exceptional",pri:"$90โ€“$140",
   note:"Cassis, bay leaf, pencil lead and grilled meat โ€” Lynch-Bages delivers Pauillac character with a generous, crowd-pleasing personality.",
   fl:[{n:"Cassis",p:88},{n:"Bay Leaf",p:72},{n:"Pencil Lead",p:68},{n:"Grilled Meat",p:65},{n:"Cedar",p:70}],
   ch:{body:"Full",tannins:"Firm",acidity:"Medium-High",finish:"Long",color:"Deep Ruby",ageing:"25 years"},pair:["Lamb","Beef","Duck","Strong Cheese","Venison"]},

  // โ”€โ”€ BURGUNDY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Romanรฉe-Conti",p:"Domaine de la Romanรฉe-Conti",r:"Vosne-Romanรฉe, Burgundy",c:"France",y:"2019",t:"red",g:"100% Pinot Noir",abv:"13%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$15,000โ€“$25,000",
   note:"Transcendent โ€” impossibly perfumed with dried rose, sandalwood, fresh raspberry and silkworm cocoon. More spiritual experience than wine.",
   fl:[{n:"Dried Rose",p:96},{n:"Raspberry",p:90},{n:"Sandalwood",p:82},{n:"Spice",p:75},{n:"Earth",p:80}],
   ch:{body:"Medium",tannins:"Like Silk",acidity:"Very High",finish:"Eternal",color:"Transparent Ruby",ageing:"50+ years"},pair:["Roast Duck","Truffle","Wild Mushrooms","Pigeon","Bresse Chicken"]},

  {n:"Chambolle-Musigny Les Amoureuses",p:"J.F. Mugnier",r:"Chambolle-Musigny, Burgundy",c:"France",y:"2017",t:"red",g:"Pinot Noir",abv:"13%",sc:98,rev:"Burghound",tier:"Legendary",pri:"$600โ€“$900",
   note:"The most feminine wine in Burgundy โ€” spun silk tannins carry violet, fresh strawberry and mineral precision in an effortlessly elegant frame.",
   fl:[{n:"Violet",p:90},{n:"Strawberry",p:86},{n:"Mineral",p:82},{n:"Spice",p:60},{n:"Rose",p:75}],
   ch:{body:"Medium",tannins:"Silky",acidity:"High",finish:"Long",color:"Pale Ruby",ageing:"20+ years"},pair:["Duck","Rabbit","Wild Mushroom","Bresse Chicken","Salmon"]},

  {n:"Gevrey-Chambertin Clos St-Jacques",p:"Domaine Rousseau",r:"Gevrey-Chambertin, Burgundy",c:"France",y:"2018",t:"red",g:"Pinot Noir",abv:"13.5%",sc:97,rev:"Wine Advocate",tier:"Exceptional",pri:"$350โ€“$500",
   note:"Powerful and structured for Burgundy โ€” dark cherry, iron, forest floor and savory meat with a long, precise mineral finish.",
   fl:[{n:"Dark Cherry",p:88},{n:"Iron",p:78},{n:"Forest Floor",p:72},{n:"Meat",p:65},{n:"Mineral",p:80}],
   ch:{body:"Medium-Full",tannins:"Firm",acidity:"High",finish:"Very Long",color:"Ruby",ageing:"25+ years"},pair:["Duck","Game","Truffle Pasta","Roast Chicken","Wild Mushrooms"]},

  // โ”€โ”€ RHร”NE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Hermitage La Chapelle",p:"Paul Jaboulet Aรฎnรฉ",r:"Hermitage, Rhรดne",c:"France",y:"2010",t:"red",g:"Syrah",abv:"14%",sc:98,rev:"Wine Spectator",tier:"Exceptional",pri:"$200โ€“$350",
   note:"Monumental Syrah โ€” smoked meat, blackberry, violets, cracked pepper and iron. Dense, concentrated and built for three decades of ageing.",
   fl:[{n:"Blackberry",p:90},{n:"Smoked Meat",p:82},{n:"Cracked Pepper",p:78},{n:"Violet",p:70},{n:"Iron",p:75}],
   ch:{body:"Full",tannins:"Massive",acidity:"High",finish:"Very Long",color:"Ink",ageing:"30+ years"},pair:["Game","Venison","Lamb","Hard Cheese","Truffle"]},

  {n:"Chรขteauneuf-du-Pape Chรขteau Rayas",p:"Chรขteau Rayas",r:"Chรขteauneuf-du-Pape, Rhรดne",c:"France",y:"2016",t:"red",g:"Grenache",abv:"14.5%",sc:99,rev:"Wine Advocate",tier:"Legendary",pri:"$400โ€“$700",
   note:"Unique and haunting โ€” raspberry, kirsch, white pepper and garrigue from ancient Grenache vines. Purity and perfume unlike any other Grenache on earth.",
   fl:[{n:"Raspberry",p:92},{n:"Kirsch",p:85},{n:"White Pepper",p:75},{n:"Garrigue",p:78},{n:"Earth",p:70}],
   ch:{body:"Medium-Full",tannins:"Velvety",acidity:"Medium",finish:"Long",color:"Pale Garnet",ageing:"25+ years"},pair:["Lamb","Roast Chicken","Duck","Mediterranean Herbs","Truffle"]},

  // โ”€โ”€ CHAMPAGNE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Dom Pรฉrignon",p:"Moรซt & Chandon",r:"ร‰pernay, Champagne",c:"France",y:"2013",t:"sparkling",g:"Chardonnay, Pinot Noir",abv:"12.5%",sc:96,rev:"Wine Spectator",tier:"Outstanding",pri:"$150โ€“$200",
   note:"Radiant and focused โ€” chalky minerality, lemon cream, toasted brioche, ginger and white flowers. The benchmark prestige cuvรฉe.",
   fl:[{n:"Lemon Cream",p:88},{n:"Brioche",p:82},{n:"Ginger",p:72},{n:"Chalk",p:85},{n:"White Flowers",p:70}],
   ch:{body:"Medium",tannins:"None",acidity:"Very High",finish:"Long",color:"Pale Gold",ageing:"20 years"},pair:["Oysters","Caviar","Sushi","Lobster","Sea Bass"]},

  {n:"Krug Grande Cuvรฉe",p:"Krug",r:"Reims, Champagne",c:"France",y:"NV",t:"sparkling",g:"Pinot Noir, Meunier, Chardonnay",abv:"12%",sc:97,rev:"Wine Advocate",tier:"Exceptional",pri:"$200โ€“$280",
   note:"Textural, rich and endlessly complex โ€” toasted hazelnut, dried apricot, gingerbread and a saline mineral backbone. The sommelier's Champagne.",
   fl:[{n:"Hazelnut",p:88},{n:"Dried Apricot",p:82},{n:"Gingerbread",p:75},{n:"Brioche",p:80},{n:"Saline",p:72}],
   ch:{body:"Full",tannins:"None",acidity:"High",finish:"Very Long",color:"Deep Gold",ageing:"20+ years"},pair:["Lobster","Truffle Risotto","Foie Gras","Cheese","Oysters"]},

  {n:"Louis Roederer Cristal",p:"Louis Roederer",r:"Reims, Champagne",c:"France",y:"2014",t:"sparkling",g:"Chardonnay, Pinot Noir",abv:"12%",sc:97,rev:"Wine Spectator",tier:"Exceptional",pri:"$250โ€“$350",
   note:"Ethereal precision โ€” white peach, chalk, lemon zest, brioche and a long, almost electric finish. The apex of elegance.",
   fl:[{n:"White Peach",p:90},{n:"Chalk",p:88},{n:"Lemon Zest",p:82},{n:"Brioche",p:72},{n:"Almond",p:65}],
   ch:{body:"Medium",tannins:"None",acidity:"High",finish:"Very Long",color:"Pale Gold",ageing:"20 years"},pair:["Caviar","Oysters","Sashimi","White Truffle","Scallops"]},

  // โ”€โ”€ ITALY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Sassicaia",p:"Tenuta San Guido",r:"Bolgheri, Tuscany",c:"Italy",y:"2016",t:"red",g:"Cabernet Sauvignon, Cabernet Franc",abv:"13.5%",sc:100,rev:"Wine Spectator",tier:"Perfect",pri:"$180โ€“$280",
   note:"The wine that created the Super Tuscan category โ€” cedar, blackcurrant, graphite, mint and earth combine in a perfectly structured, age-worthy masterpiece.",
   fl:[{n:"Blackcurrant",p:92},{n:"Cedar",p:84},{n:"Graphite",p:78},{n:"Mint",p:70},{n:"Earth",p:72}],
   ch:{body:"Full",tannins:"Firm",acidity:"High",finish:"Very Long",color:"Deep Ruby",ageing:"30+ years"},pair:["Bistecca Fiorentina","Lamb","Venison","Aged Pecorino","Truffle"]},

  {n:"Ornellaia",p:"Tenuta dell'Ornellaia",r:"Bolgheri, Tuscany",c:"Italy",y:"2017",t:"red",g:"Merlot, Cabernet Sauvignon, Cabernet Franc",abv:"14.5%",sc:99,rev:"Wine Advocate",tier:"Legendary",pri:"$200โ€“$300",
   note:"Lush yet precise โ€” dark plum, cassis, cocoa, tobacco and exotic spice with a plush, seamless texture and an extraordinarily long finish.",
   fl:[{n:"Dark Plum",p:90},{n:"Cassis",p:88},{n:"Cocoa",p:78},{n:"Tobacco",p:70},{n:"Exotic Spice",p:65}],
   ch:{body:"Full",tannins:"Polished",acidity:"Medium-High",finish:"Very Long",color:"Opaque Ruby",ageing:"25+ years"},pair:["Bistecca","Lamb","Venison","Truffle","Aged Cheese"]},

  {n:"Barolo Brunate",p:"Giuseppe Rinaldi",r:"La Morra, Piedmont",c:"Italy",y:"2016",t:"red",g:"Nebbiolo",abv:"14%",sc:98,rev:"Wine Advocate",tier:"Exceptional",pri:"$150โ€“$220",
   note:"Classic, traditional Barolo โ€” dried rose, tar, leather and sour cherry with bone-dry, gripping tannins. Requires time but rewards patience magnificently.",
   fl:[{n:"Dried Rose",p:85},{n:"Tar",p:78},{n:"Cherry",p:82},{n:"Leather",p:70},{n:"Earth",p:72}],
   ch:{body:"Full",tannins:"Very High",acidity:"High",finish:"Very Long",color:"Garnet",ageing:"30+ years"},pair:["Truffle Pasta","Braised Beef","Game","Aged Parmesan","Wild Mushrooms"]},

  {n:"Amarone della Valpolicella",p:"Dal Forno Romano",r:"Valpolicella, Veneto",c:"Italy",y:"2012",t:"red",g:"Corvina, Corvinone, Rondinella",abv:"17%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$300โ€“$500",
   note:"The most concentrated wine in Italy โ€” dried cherry, chocolate, espresso, leather and tobacco with massive structure and a raisined complexity.",
   fl:[{n:"Dried Cherry",p:94},{n:"Chocolate",p:88},{n:"Espresso",p:82},{n:"Leather",p:75},{n:"Tobacco",p:70}],
   ch:{body:"Massive",tannins:"Immense",acidity:"High",finish:"Eternal",color:"Opaque Ruby",ageing:"50+ years"},pair:["Braised Game","Truffle","Aged Parmesan","Dark Chocolate","Lamb"]},

  {n:"Barolo Cerequio",p:"Michele Chiarlo",r:"La Morra, Piedmont",c:"Italy",y:"2017",t:"red",g:"Nebbiolo",abv:"14%",sc:95,rev:"Wine Spectator",tier:"Outstanding",pri:"$75โ€“$110",
   note:"Elegant and fragrant โ€” cherry, rose hip, tar and sweet tobacco with finely grained tannins and a long, mineral finish.",
   fl:[{n:"Cherry",p:84},{n:"Rose Hip",p:78},{n:"Tar",p:72},{n:"Tobacco",p:68},{n:"Mineral",p:75}],
   ch:{body:"Full",tannins:"High",acidity:"High",finish:"Long",color:"Garnet",ageing:"20+ years"},pair:["Roast Lamb","Wild Mushroom Risotto","Game","Truffle","Aged Parmesan"]},

  {n:"Tignanello",p:"Antinori",r:"Chianti Classico, Tuscany",c:"Italy",y:"2019",t:"red",g:"Sangiovese, Cabernet Sauvignon",abv:"14%",sc:96,rev:"Wine Spectator",tier:"Outstanding",pri:"$80โ€“$120",
   note:"The original Super Tuscan โ€” ripe cherry, plum, leather, tobacco and a hint of mocha on a firm but elegant Sangiovese frame.",
   fl:[{n:"Cherry",p:88},{n:"Plum",p:82},{n:"Leather",p:72},{n:"Tobacco",p:68},{n:"Mocha",p:65}],
   ch:{body:"Full",tannins:"Firm",acidity:"High",finish:"Long",color:"Ruby",ageing:"20 years"},pair:["Bistecca","Roast Lamb","Wild Boar","Pecorino","Mushrooms"]},

  // โ”€โ”€ SPAIN โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Vega Sicilia รšnico",p:"Vega Sicilia",r:"Ribera del Duero",c:"Spain",y:"2009",t:"red",g:"Tempranillo, Merlot, Cabernet Sauvignon",abv:"14%",sc:99,rev:"Wine Advocate",tier:"Legendary",pri:"$350โ€“$600",
   note:"Spain's most majestic wine โ€” leather, vanilla, dried fruits, cedar and an earthy complexity aged for a decade before release. Serene and unforgettable.",
   fl:[{n:"Leather",p:88},{n:"Vanilla",p:82},{n:"Dried Fruit",p:78},{n:"Cedar",p:74},{n:"Earth",p:80}],
   ch:{body:"Full",tannins:"Velvety",acidity:"High",finish:"Very Long",color:"Deep Garnet",ageing:"40+ years"},pair:["Lamb","Suckling Pig","Venison","Aged Manchego","Game"]},

  {n:"Pingus",p:"Dominio de Pingus",r:"Ribera del Duero",c:"Spain",y:"2016",t:"red",g:"Tempranillo",abv:"14.5%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$700โ€“$1000",
   note:"Extraordinary concentration โ€” plum jam, dark chocolate, cedar and violet with enormous structure and a finish that lasts for minutes.",
   fl:[{n:"Plum Jam",p:94},{n:"Dark Chocolate",p:86},{n:"Cedar",p:78},{n:"Violet",p:82},{n:"Licorice",p:72}],
   ch:{body:"Immense",tannins:"Massive",acidity:"High",finish:"Eternal",color:"Opaque Ruby",ageing:"30+ years"},pair:["Wagyu","Lamb","Game","Dark Chocolate","Strong Cheese"]},

  // โ”€โ”€ USA โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Opus One",p:"Opus One Winery",r:"Napa Valley, California",c:"USA",y:"2019",t:"red",g:"Cabernet Sauvignon, Merlot, Petit Verdot",abv:"14.5%",sc:97,rev:"Wine Spectator",tier:"Exceptional",pri:"$350โ€“$450",
   note:"The ultimate Napa Bordeaux blend โ€” cassis, dark cherry, cedar, graphite and elegant spice with a creamy, polished texture and profound depth.",
   fl:[{n:"Cassis",p:92},{n:"Dark Cherry",p:85},{n:"Cedar",p:78},{n:"Graphite",p:72},{n:"Mocha",p:70}],
   ch:{body:"Full",tannins:"Polished",acidity:"Medium-High",finish:"Very Long",color:"Deep Ruby",ageing:"25+ years"},pair:["Beef Wellington","Lamb","Duck","Truffle","Aged Cheddar"]},

  {n:"Screaming Eagle",p:"Screaming Eagle",r:"Oakville, Napa Valley",c:"USA",y:"2018",t:"red",g:"Cabernet Sauvignon",abv:"14.8%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$3500โ€“$5000",
   note:"The holy grail of Napa โ€” pure blackberry, violet, chocolate, graphite and cassis in a seamlessly integrated, monumental wine of perfect balance.",
   fl:[{n:"Blackberry",p:96},{n:"Violet",p:90},{n:"Chocolate",p:84},{n:"Graphite",p:80},{n:"Cassis",p:92}],
   ch:{body:"Full",tannins:"Perfect",acidity:"High",finish:"Eternal",color:"Opaque Ruby",ageing:"50+ years"},pair:["Wagyu","Venison","Truffle","Roast Lamb","Fine Cheese"]},

  {n:"Caymus Special Selection",p:"Caymus Vineyards",r:"Napa Valley, California",c:"USA",y:"2019",t:"red",g:"Cabernet Sauvignon",abv:"14.9%",sc:95,rev:"Wine Spectator",tier:"Outstanding",pri:"$150โ€“$200",
   note:"Hedonistic and lush โ€” dark cherry, mocha, vanilla and plush tannins. The quintessential approachable Napa Cabernet.",
   fl:[{n:"Dark Cherry",p:88},{n:"Mocha",p:82},{n:"Vanilla",p:80},{n:"Plum",p:78},{n:"Toast",p:65}],
   ch:{body:"Full",tannins:"Velvety",acidity:"Medium",finish:"Long",color:"Deep Ruby",ageing:"15 years"},pair:["Grilled Steak","Lamb","Burgers","Aged Cheddar","Dark Chocolate"]},

  {n:"Ridge Monte Bello",p:"Ridge Vineyards",r:"Santa Cruz Mountains, California",c:"USA",y:"2016",t:"red",g:"Cabernet Sauvignon, Merlot, Petit Verdot",abv:"13.5%",sc:98,rev:"Wine Advocate",tier:"Exceptional",pri:"$200โ€“$280",
   note:"Elegant, earthy and Bordeaux-like โ€” blackcurrant, mineral, cedar and tobacco with a refined precision that rewards 20+ years of cellaring.",
   fl:[{n:"Blackcurrant",p:88},{n:"Mineral",p:84},{n:"Cedar",p:78},{n:"Tobacco",p:72},{n:"Earth",p:80}],
   ch:{body:"Full",tannins:"Firm",acidity:"High",finish:"Very Long",color:"Ruby",ageing:"30+ years"},pair:["Beef","Lamb","Venison","Truffle","Aged Cheese"]},

  {n:"Shafer Hillside Select",p:"Shafer Vineyards",r:"Stags Leap, Napa Valley",c:"USA",y:"2018",t:"red",g:"Cabernet Sauvignon",abv:"15.1%",sc:97,rev:"Wine Spectator",tier:"Exceptional",pri:"$275โ€“$350",
   note:"The Stags Leap District's finest โ€” dark plum, cassis, mocha and a silky, powerful mid-palate with exceptional concentration.",
   fl:[{n:"Dark Plum",p:90},{n:"Cassis",p:88},{n:"Mocha",p:78},{n:"Cedar",p:70},{n:"Tobacco",p:65}],
   ch:{body:"Full",tannins:"Silky",acidity:"Medium-High",finish:"Very Long",color:"Deep Ruby",ageing:"25+ years"},pair:["Ribeye","Lamb","Duck","Strong Cheese","Dark Chocolate"]},

  // โ”€โ”€ AUSTRALIA โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Penfolds Grange",p:"Penfolds",r:"South Australia",c:"Australia",y:"2018",t:"red",g:"Shiraz, Cabernet Sauvignon",abv:"14.5%",sc:98,rev:"Wine Spectator",tier:"Exceptional",pri:"$600โ€“$900",
   note:"Australia's icon โ€” plum jam, dark chocolate, coffee, leather and tar with immense body and tannins that promise 40 years of glorious evolution.",
   fl:[{n:"Plum Jam",p:92},{n:"Dark Chocolate",p:86},{n:"Coffee",p:80},{n:"Leather",p:75},{n:"Tar",p:70}],
   ch:{body:"Immense",tannins:"Massive",acidity:"High",finish:"Eternal",color:"Opaque Purple",ageing:"40+ years"},pair:["Wagyu","Lamb Shanks","BBQ Ribs","Game","Strong Cheese"]},

  {n:"Penfolds Bin 407",p:"Penfolds",r:"South Australia",c:"Australia",y:"2019",t:"red",g:"Cabernet Sauvignon",abv:"14.5%",sc:94,rev:"Wine Spectator",tier:"Outstanding",pri:"$60โ€“$90",
   note:"Cassis, mint, cedar and firm but polished tannins. Classic Australian Cabernet with Penfolds' characteristic precision and consistency.",
   fl:[{n:"Cassis",p:86},{n:"Mint",p:78},{n:"Cedar",p:72},{n:"Dark Plum",p:82},{n:"Tobacco",p:65}],
   ch:{body:"Full",tannins:"Firm",acidity:"Medium-High",finish:"Long",color:"Deep Ruby",ageing:"20 years"},pair:["Steak","Lamb","Venison","Hard Cheese","BBQ"]},

  {n:"Henschke Hill of Grace",p:"Henschke",r:"Eden Valley, South Australia",c:"Australia",y:"2016",t:"red",g:"Shiraz",abv:"14%",sc:99,rev:"Wine Advocate",tier:"Legendary",pri:"$650โ€“$900",
   note:"From 150-year-old vines โ€” violet, blackberry, spice, earth and silky tannins. One of the world's most profound Shiraz.",
   fl:[{n:"Violet",p:90},{n:"Blackberry",p:88},{n:"Spice",p:80},{n:"Earth",p:75},{n:"Dark Chocolate",p:72}],
   ch:{body:"Full",tannins:"Silky",acidity:"High",finish:"Very Long",color:"Deep Purple",ageing:"40+ years"},pair:["Lamb","Game","Venison","Dark Chocolate","Hard Cheese"]},

  // โ”€โ”€ NEW ZEALAND โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Cloudy Bay Sauvignon Blanc",p:"Cloudy Bay",r:"Marlborough",c:"New Zealand",y:"2023",t:"white",g:"Sauvignon Blanc",abv:"13%",sc:92,rev:"Wine Spectator",tier:"Very Good",pri:"$20โ€“$30",
   note:"The wine that put Marlborough on the map โ€” explosive passion fruit, lime zest, freshly cut grass and gooseberry with vivid, refreshing acidity.",
   fl:[{n:"Passion Fruit",p:90},{n:"Lime Zest",p:88},{n:"Cut Grass",p:80},{n:"Gooseberry",p:82},{n:"Mineral",p:65}],
   ch:{body:"Light-Medium",tannins:"None",acidity:"High",finish:"Medium",color:"Pale Straw",ageing:"Drink now"},pair:["Oysters","Goat Cheese","Asparagus","Sea Bass","Sushi"]},

  // โ”€โ”€ ARGENTINA โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Achaval Ferrer Malbec Quimera",p:"Achaval Ferrer",r:"Lujรกn de Cuyo, Mendoza",c:"Argentina",y:"2019",t:"red",g:"Malbec, Cabernet Franc, Merlot",abv:"14.5%",sc:96,rev:"Wine Spectator",tier:"Outstanding",pri:"$35โ€“$55",
   note:"Dark violet with plum, blackberry, mocha and floral violet. Supple, velvety tannins and impressive concentration for the price.",
   fl:[{n:"Plum",p:88},{n:"Blackberry",p:84},{n:"Violet",p:80},{n:"Mocha",p:72},{n:"Dark Chocolate",p:68}],
   ch:{body:"Full",tannins:"Velvety",acidity:"Medium",finish:"Long",color:"Deep Violet",ageing:"12 years"},pair:["Asado","Steak","Lamb","Empanadas","Hard Cheese"]},

  {n:"Catena Zapata Adrianna Vineyard",p:"Catena Zapata",r:"Gualtallary, Mendoza",c:"Argentina",y:"2018",t:"red",g:"Malbec",abv:"14.5%",sc:99,rev:"Wine Advocate",tier:"Legendary",pri:"$150โ€“$250",
   note:"High-altitude wonder โ€” blue fruit, floral violet, limestone minerality and fine-grained tannins of extraordinary precision. Argentina's greatest Malbec.",
   fl:[{n:"Blue Fruit",p:92},{n:"Violet",p:90},{n:"Limestone",p:82},{n:"Plum",p:86},{n:"Spice",p:70}],
   ch:{body:"Full",tannins:"Firm",acidity:"High",finish:"Very Long",color:"Deep Purple",ageing:"25+ years"},pair:["Wagyu","Lamb","Game","Hard Cheese","Truffle"]},

  // โ”€โ”€ GERMANY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Scharzhofberger Riesling Trockenbeerenauslese",p:"Egon Mรผller",r:"Mosel",c:"Germany",y:"2015",t:"white",g:"Riesling",abv:"7%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$3000โ€“$8000",
   note:"Perhaps the greatest sweet wine on earth โ€” apricot nectar, mango, orange blossom and a slate minerality that seems to defy physics. Liquid gold.",
   fl:[{n:"Apricot Nectar",p:98},{n:"Mango",p:92},{n:"Orange Blossom",p:88},{n:"Honey",p:90},{n:"Slate",p:85}],
   ch:{body:"Light",tannins:"None",acidity:"Electric",finish:"Eternal",color:"Deep Gold",ageing:"100 years"},pair:["Foie Gras","Blue Cheese","Fruit Tarts","Crรจme Brรปlรฉe","Fine Cheese"]},

  {n:"Mosel Riesling Kabinett",p:"JJ Prรผm",r:"Wehlen, Mosel",c:"Germany",y:"2020",t:"white",g:"Riesling",abv:"8%",sc:94,rev:"Wine Spectator",tier:"Outstanding",pri:"$35โ€“$55",
   note:"Delicate and precise โ€” lime blossom, peach, green apple and a crystalline slate mineral finish. The epitome of elegant, off-dry Riesling.",
   fl:[{n:"Lime Blossom",p:88},{n:"Peach",p:84},{n:"Green Apple",p:82},{n:"Slate",p:90},{n:"Apricot",p:72}],
   ch:{body:"Light",tannins:"None",acidity:"Very High",finish:"Long",color:"Pale Gold",ageing:"20 years"},pair:["Sushi","Thai Curry","Pork","Smoked Salmon","Asian Food"]},

  // โ”€โ”€ WHITE BURGUNDY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Montrachet",p:"Domaine de la Romanรฉe-Conti",r:"Puligny-Montrachet, Burgundy",c:"France",y:"2018",t:"white",g:"Chardonnay",abv:"13.5%",sc:100,rev:"Wine Advocate",tier:"Perfect",pri:"$4000โ€“$8000",
   note:"The greatest white wine on earth โ€” hazelnut, beeswax, lemon oil, toasted almond and an ineffable mineral tension that vibrates for eternity.",
   fl:[{n:"Hazelnut",p:94},{n:"Lemon Oil",p:90},{n:"Beeswax",p:85},{n:"Toasted Almond",p:82},{n:"Mineral",p:98}],
   ch:{body:"Full",tannins:"None",acidity:"Very High",finish:"Eternal",color:"Deep Gold",ageing:"40+ years"},pair:["Lobster","White Truffle","Scallops","Fine Fish","Foie Gras"]},

  {n:"Chevalier-Montrachet",p:"Domaine Leflaive",r:"Puligny-Montrachet, Burgundy",c:"France",y:"2019",t:"white",g:"Chardonnay",abv:"13.5%",sc:98,rev:"Wine Advocate",tier:"Exceptional",pri:"$600โ€“$1000",
   note:"Tense, pure and crystalline โ€” white flowers, lemon curd, toasted hazelnuts and a chalky mineral spine of breathtaking precision.",
   fl:[{n:"Lemon Curd",p:90},{n:"White Flowers",p:86},{n:"Hazelnut",p:80},{n:"Chalk",p:92},{n:"Ginger",p:65}],
   ch:{body:"Full",tannins:"None",acidity:"High",finish:"Very Long",color:"Pale Gold",ageing:"25 years"},pair:["Lobster","White Truffle","Scallops","Dover Sole","Fine Goat Cheese"]},

  {n:"Chablis Grand Cru Valmur",p:"Raveneau",r:"Chablis, Burgundy",c:"France",y:"2018",t:"white",g:"Chardonnay",abv:"13%",sc:97,rev:"Burghound",tier:"Exceptional",pri:"$200โ€“$350",
   note:"Austere and electrifying โ€” pure oyster shell, lemon, green apple and iodine minerality with laser-sharp acidity. The ultimate expression of Chablis.",
   fl:[{n:"Oyster Shell",p:92},{n:"Lemon",p:88},{n:"Green Apple",p:82},{n:"Iodine",p:80},{n:"Chalk",p:90}],
   ch:{body:"Medium",tannins:"None",acidity:"Very High",finish:"Long",color:"Pale Straw",ageing:"20 years"},pair:["Oysters","Sea Bass","Crab","Fine Fish","Goat Cheese"]},

  // โ”€โ”€ ROSร‰ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Whispering Angel",p:"Chรขteau d'Esclans",r:"Cรดtes de Provence",c:"France",y:"2023",t:"rosรฉ",g:"Grenache, Vermentino, Cinsault",abv:"13%",sc:91,rev:"Wine Spectator",tier:"Very Good",pri:"$22โ€“$30",
   note:"The world's most famous rosรฉ โ€” pale salmon with fresh strawberry, white peach, rose petal and a crisp, mineral finish. The definition of Provence Rosรฉ.",
   fl:[{n:"Strawberry",p:84},{n:"White Peach",p:82},{n:"Rose Petal",p:78},{n:"Citrus",p:70},{n:"Mineral",p:68}],
   ch:{body:"Light",tannins:"None",acidity:"Medium-High",finish:"Short-Medium",color:"Pale Salmon",ageing:"Drink now"},pair:["Grilled Fish","Salads","Bruschetta","Goat Cheese","Light Pasta"]},

  {n:"Bandol Rosรฉ",p:"Domaine Tempier",r:"Bandol, Provence",c:"France",y:"2022",t:"rosรฉ",g:"Mourvรจdre, Grenache, Cinsault",abv:"13%",sc:93,rev:"Wine Advocate",tier:"Very Good",pri:"$35โ€“$50",
   note:"The most serious rosรฉ in France โ€” pale copper with wild herbs, peach, saline minerality and a structure that sets it apart from every other Provence Rosรฉ.",
   fl:[{n:"Wild Herbs",p:82},{n:"Peach",p:80},{n:"Saline",p:78},{n:"Red Berry",p:72},{n:"Mineral",p:85}],
   ch:{body:"Medium",tannins:"None",acidity:"High",finish:"Medium-Long",color:"Pale Copper",ageing:"5 years"},pair:["Bouillabaisse","Grilled Fish","Tapenade","Aioli","Mediterranean Veg"]},

  // โ”€โ”€ PORT โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Vintage Port",p:"Graham's",r:"Douro Valley",c:"Portugal",y:"2011",t:"port",g:"Touriga Nacional, Touriga Franca",abv:"20%",sc:97,rev:"Wine Spectator",tier:"Exceptional",pri:"$70โ€“$100",
   note:"Intense and structured โ€” blackberry, dark chocolate, dried fig, walnut and a spicy mineral finish. One of the finest Vintage Ports of the decade.",
   fl:[{n:"Blackberry",p:90},{n:"Dark Chocolate",p:86},{n:"Dried Fig",p:80},{n:"Walnut",p:72},{n:"Spice",p:78}],
   ch:{body:"Full",tannins:"High",acidity:"High",finish:"Very Long",color:"Deep Ruby",ageing:"40+ years"},pair:["Stilton","Dark Chocolate","Walnuts","Blue Cheese","Fruit Cake"]},

  // โ”€โ”€ MORE EVERYDAY CLASSICS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  {n:"Chianti Classico Gran Selezione",p:"Fontodi",r:"Chianti Classico, Tuscany",c:"Italy",y:"2018",t:"red",g:"Sangiovese",abv:"14%",sc:96,rev:"Wine Spectator",tier:"Outstanding",pri:"$75โ€“$110",
   note:"The soul of Sangiovese โ€” vivid cherry, dried herb, leather and earthy complexity with bright acidity and a long, savory finish. Quintessential Chianti.",
   fl:[{n:"Cherry",p:88},{n:"Dried Herb",p:78},{n:"Leather",p:70},{n:"Earth",p:72},{n:"Tobacco",p:65}],
   ch:{body:"Medium-Full",tannins:"Medium",acidity:"High",finish:"Long",color:"Ruby",ageing:"15 years"},pair:["Bistecca","Pasta Bolognese","Wild Boar","Pecorino","Pizza"]},

  {n:"Cรดtes du Rhรดne",p:"Chรขteau Rayas",r:"Cรดtes du Rhรดne",c:"France",y:"2019",t:"red",g:"Grenache",abv:"13.5%",sc:93,rev:"Wine Advocate",tier:"Very Good",pri:"$25โ€“$40",
   note:"Raspberry, kirsch, wild thyme and white pepper. Bright and joyful with a silky texture that punches well above its humble appellation.",
   fl:[{n:"Raspberry",p:86},{n:"Kirsch",p:80},{n:"Wild Thyme",p:72},{n:"White Pepper",p:68},{n:"Spice",p:65}],
   ch:{body:"Medium",tannins:"Low",acidity:"Medium",finish:"Medium",color:"Pale Ruby",ageing:"5 years"},pair:["Roast Chicken","Lamb","Pizza","Tapas","Charcuterie"]},

  {n:"Sancerre",p:"Henri Bourgeois",r:"Loire Valley",c:"France",y:"2022",t:"white",g:"Sauvignon Blanc",abv:"12.5%",sc:93,rev:"Wine Spectator",tier:"Very Good",pri:"$30โ€“$45",
   note:"The benchmark French Sauvignon Blanc โ€” flint, gooseberry, grapefruit zest and a smoky mineral finish. Precision and terroir in every sip.",
   fl:[{n:"Flint",p:88},{n:"Gooseberry",p:84},{n:"Grapefruit",p:82},{n:"Smoke",p:72},{n:"Mineral",p:90}],
   ch:{body:"Light-Medium",tannins:"None",acidity:"High",finish:"Medium-Long",color:"Pale Gold",ageing:"8 years"},pair:["Goat Cheese","Oysters","Asparagus","Sea Bass","Green Salad"]},

  {n:"Rioja Gran Reserva",p:"Muga",r:"Rioja Alta",c:"Spain",y:"2015",t:"red",g:"Tempranillo, Garnacha, Mazuelo",abv:"14%",sc:95,rev:"Wine Spectator",tier:"Outstanding",pri:"$50โ€“$75",
   note:"Graceful and complex โ€” cherry, dried herbs, vanilla, leather and sandalwood with silky tannins from extensive aging in both oak and bottle.",
   fl:[{n:"Cherry",p:85},{n:"Vanilla",p:80},{n:"Leather",p:75},{n:"Sandalwood",p:70},{n:"Dried Herb",p:68}],
   ch:{body:"Medium-Full",tannins:"Silky",acidity:"Medium",finish:"Long",color:"Garnet",ageing:"20 years"},pair:["Lamb","Suckling Pig","Chorizo","Manchego","Tapas"]},

  {n:"Priorat",p:"รlvaro Palacios",r:"Priorat",c:"Spain",y:"2018",t:"red",g:"Grenache, Carignan",abv:"14.5%",sc:97,rev:"Wine Advocate",tier:"Exceptional",pri:"$120โ€“$180",
   note:"Dark, mineral and brooding โ€” black olive, licorice, slate, blackberry and wild herbs. The llicorella schist speaks in every sip.",
   fl:[{n:"Blackberry",p:88},{n:"Slate",p:85},{n:"Black Olive",p:72},{n:"Licorice",p:78},{n:"Wild Herbs",p:70}],
   ch:{body:"Full",tannins:"Firm",acidity:"High",finish:"Very Long",color:"Dense Ruby",ageing:"20+ years"},pair:["Lamb","Game","Venison","Strong Cheese","Truffle"]},

  {n:"Albariรฑo",p:"Pazo Seรฑorรกns",r:"Rรญas Baixas, Galicia",c:"Spain",y:"2022",t:"white",g:"Albariรฑo",abv:"12.5%",sc:93,rev:"Wine Spectator",tier:"Very Good",pri:"$20โ€“$30",
   note:"The Atlantic in a glass โ€” lemon blossom, white peach, saline sea spray and a refreshing, mineral crispness. Spain's finest white wine variety.",
   fl:[{n:"Lemon Blossom",p:88},{n:"White Peach",p:84},{n:"Sea Spray",p:80},{n:"Mineral",p:88},{n:"Citrus",p:78}],
   ch:{body:"Light-Medium",tannins:"None",acidity:"High",finish:"Medium",color:"Pale Gold",ageing:"Drink now"},pair:["Seafood","Pulpo","Grilled Fish","Ceviche","Sea Bass"]},

  {n:"Manzanilla Sherry",p:"Bodegas Hidalgo La Gitana",r:"Sanlรบcar de Barrameda",c:"Spain",y:"NV",t:"white",g:"Palomino Fino",abv:"15%",sc:92,rev:"Wine Advocate",tier:"Very Good",pri:"$15โ€“$22",
   note:"Salty, briny and uniquely refreshing โ€” sea air, green olive, almonds and a bone-dry, savory finish influenced by the Atlantic. The world's most unique wine.",
   fl:[{n:"Sea Air",p:90},{n:"Green Olive",p:84},{n:"Almond",p:80},{n:"Chamomile",p:72},{n:"Saline",p:92}],
   ch:{body:"Light",tannins:"None",acidity:"High",finish:"Medium",color:"Pale Straw",ageing:"Drink immediately"},pair:["Jamรณn","Seafood","Olives","Anchovies","Tapas"]},

  {n:"Verdejo",p:"Marquรฉs de Riscal",r:"Rueda",c:"Spain",y:"2023",t:"white",g:"Verdejo",abv:"13%",sc:90,rev:"Wine Spectator",tier:"Very Good",pri:"$12โ€“$18",
   note:"Zingy and aromatic โ€” lemon, grapefruit, fennel and a hint of white pepper. Spain's most refreshing everyday white.",
   fl:[{n:"Lemon",p:86},{n:"Grapefruit",p:82},{n:"Fennel",p:72},{n:"White Pepper",p:65},{n:"Floral",p:70}],
   ch:{body:"Light",tannins:"None",acidity:"High",finish:"Short-Medium",color:"Pale Straw",ageing:"Drink now"},pair:["Seafood","Tapas","Salads","Gazpacho","Light Fish"]},

  {n:"Malbec Reserva",p:"Zuccardi Valle de Uco",r:"Valle de Uco, Mendoza",c:"Argentina",y:"2020",t:"red",g:"Malbec",abv:"14%",sc:95,rev:"Wine Advocate",tier:"Outstanding",pri:"$20โ€“$30",
   note:"Vibrant and precise โ€” plum, blackberry, violet and chalky mineral tannins from high-altitude vineyards. Superb value.",
   fl:[{n:"Plum",p:88},{n:"Blackberry",p:84},{n:"Violet",p:80},{n:"Chalk",p:78},{n:"Spice",p:65}],
   ch:{body:"Full",tannins:"Firm",acidity:"Medium-High",finish:"Long",color:"Deep Purple",ageing:"12 years"},pair:["Asado","Steak","Lamb","Empanadas","Hard Cheese"]},

  {n:"Carmรฉnรจre Gran Reserva",p:"Concha y Toro",r:"Rapel Valley",c:"Chile",y:"2020",t:"red",g:"Carmรฉnรจre",abv:"14%",sc:92,rev:"Wine Spectator",tier:"Very Good",pri:"$18โ€“$26",
   note:"Chile's signature grape โ€” dark plum, green pepper, chocolate and earthy spice with a soft, approachable finish.",
   fl:[{n:"Dark Plum",p:84},{n:"Green Pepper",p:78},{n:"Chocolate",p:72},{n:"Earth",p:70},{n:"Spice",p:68}],
   ch:{body:"Medium-Full",tannins:"Medium",acidity:"Medium",finish:"Medium",color:"Ruby",ageing:"8 years"},pair:["Beef","Lamb","Burgers","BBQ","Cheddar"]},

  {n:"Pinot Grigio",p:"Santa Margherita",r:"Alto Adige",c:"Italy",y:"2023",t:"white",g:"Pinot Grigio",abv:"12.5%",sc:89,rev:"Wine Spectator",tier:"Good",pri:"$20โ€“$28",
   note:"Crisp and clean โ€” white pear, lemon, almond and a refreshing mineral finish. The wine that defined the category.",
   fl:[{n:"White Pear",p:82},{n:"Lemon",p:80},{n:"Almond",p:68},{n:"Mineral",p:72},{n:"Floral",p:60}],
   ch:{body:"Light",tannins:"None",acidity:"High",finish:"Short",color:"Pale Straw",ageing:"Drink now"},pair:["Seafood","Salads","Light Pasta","Pizza Bianca","Antipasti"]},

  {n:"Soave Classico",p:"Pieropan",r:"Soave, Veneto",c:"Italy",y:"2022",t:"white",g:"Garganega, Trebbiano",abv:"12.5%",sc:92,rev:"Wine Advocate",tier:"Very Good",pri:"$18โ€“$28",
   note:"Gentle and aromatic โ€” white flowers, almond, peach and a distinctive volcanic mineral note from the basalt soils.",
   fl:[{n:"White Flowers",p:84},{n:"Almond",p:82},{n:"Peach",p:78},{n:"Volcanic Mineral",p:80},{n:"Lemon",p:72}],
   ch:{body:"Light-Medium",tannins:"None",acidity:"Medium-High",finish:"Medium",color:"Pale Gold",ageing:"8 years"},pair:["Seafood Risotto","Scallops","Light Fish","Mozzarella","Antipasti"]},

  {n:"Pouilly-Fumรฉ",p:"Didier Dagueneau",r:"Loire Valley",c:"France",y:"2020",t:"white",g:"Sauvignon Blanc",abv:"13%",sc:96,rev:"Wine Advocate",tier:"Outstanding",pri:"$80โ€“$130",
   note:"The greatest Sauvignon Blanc outside Sancerre โ€” gunflint, grapefruit, lemon oil and a tension that borders on electric.",
   fl:[{n:"Gunflint",p:92},{n:"Grapefruit",p:86},{n:"Lemon Oil",p:84},{n:"Smoke",p:75},{n:"White Flowers",p:70}],
   ch:{body:"Medium",tannins:"None",acidity:"Very High",finish:"Long",color:"Pale Gold",ageing:"10 years"},pair:["Oysters","Goat Cheese","Sea Bass","Asparagus","Crab"]},

  {n:"Grรผner Veltliner Smaragd",p:"Franz Hirtzberger",r:"Wachau",c:"Austria",y:"2020",t:"white",g:"Grรผner Veltliner",abv:"13.5%",sc:96,rev:"Falstaff",tier:"Outstanding",pri:"$60โ€“$90",
   note:"Austria's white wine pinnacle โ€” white pepper, grapefruit, mineral and an intense, saline precision from the Danube terraces.",
   fl:[{n:"White Pepper",p:90},{n:"Grapefruit",p:84},{n:"Mineral",p:88},{n:"Lemon",p:78},{n:"Herbs",p:72}],
   ch:{body:"Full",tannins:"None",acidity:"High",finish:"Very Long",color:"Deep Gold",ageing:"15 years"},pair:["Wiener Schnitzel","White Fish","Lobster","Asparagus","Scallops"]},

  {n:"Tokaji Aszรบ 5 Puttonyos",p:"Royal Tokaji",r:"Tokaj",c:"Hungary",y:"2017",t:"white",g:"Furmint, Hรกrslevelลฑ",abv:"10%",sc:96,rev:"Wine Advocate",tier:"Outstanding",pri:"$80โ€“$120",
   note:"Hungary's liquid gold โ€” apricot, orange peel, honey, saffron and a refreshing acidity that keeps it from cloying. One of the world's greatest sweet wines.",
   fl:[{n:"Apricot",p:92},{n:"Orange Peel",p:86},{n:"Honey",p:88},{n:"Saffron",p:75},{n:"Marmalade",p:80}],
   ch:{body:"Full",tannins:"None",acidity:"High",finish:"Very Long",color:"Deep Amber",ageing:"50 years"},pair:["Foie Gras","Blue Cheese","Fruit Desserts","Crรจme Brรปlรฉe","Roquefort"]},

  {n:"Prosecco Superiore di Cartizze",p:"Bisol",r:"Valdobbiadene, Veneto",c:"Italy",y:"NV",t:"sparkling",g:"Glera",abv:"11%",sc:92,rev:"Wine Enthusiast",tier:"Very Good",pri:"$25โ€“$40",
   note:"The Champagne of Prosecco โ€” ripe pear, Golden Delicious apple, cream and a fine, persistent bead. Effortlessly elegant.",
   fl:[{n:"Ripe Pear",p:88},{n:"Golden Apple",p:84},{n:"Cream",p:78},{n:"White Flowers",p:75},{n:"Almond",p:65}],
   ch:{body:"Light",tannins:"None",acidity:"Medium",finish:"Medium",color:"Pale Straw",ageing:"Drink now"},pair:["Prosciutto","Light Antipasti","Fruit","Brie","Canapes"]},

  {n:"Cava Gran Reserva",p:"Gramona",r:"Penedรจs",c:"Spain",y:"2015",t:"sparkling",g:"Xarel-lo, Macabeo, Parellada",abv:"12%",sc:94,rev:"Wine Advocate",tier:"Outstanding",pri:"$30โ€“$50",
   note:"Autolytic and complex โ€” toasted bread, green apple, lemon cream and a hazelnut richness that competes with good Champagne.",
   fl:[{n:"Toasted Bread",p:84},{n:"Green Apple",p:82},{n:"Lemon Cream",p:78},{n:"Hazelnut",p:72},{n:"Mineral",p:70}],
   ch:{body:"Medium",tannins:"None",acidity:"High",finish:"Long",color:"Golden",ageing:"10 years"},pair:["Seafood","Ibรฉrico","Manchego","Tapas","Light Risotto"]},

  {n:"Mosel Riesling Spรคtlese",p:"Schloss Saarstein",r:"Mosel",c:"Germany",y:"2021",t:"white",g:"Riesling",abv:"9%",sc:93,rev:"Wine Advocate",tier:"Very Good",pri:"$22โ€“$35",
   note:"Off-dry and irresistible โ€” peach nectar, tangerine, honeysuckle and slate mineral all balanced by electric acidity. A joy to drink.",
   fl:[{n:"Peach Nectar",p:88},{n:"Tangerine",p:84},{n:"Honeysuckle",p:78},{n:"Slate",p:88},{n:"Apricot",p:72}],
   ch:{body:"Light",tannins:"None",acidity:"High",finish:"Long",color:"Pale Gold",ageing:"15 years"},pair:["Pork","Thai Food","Duck","Smoked Salmon","Spicy Cuisine"]},

  {n:"Crozes-Hermitage",p:"M. Chapoutier",r:"Northern Rhรดne",c:"France",y:"2020",t:"red",g:"Syrah",abv:"13.5%",sc:92,rev:"Wine Spectator",tier:"Very Good",pri:"$22โ€“$32",
   note:"Northern Rhรดne's great value โ€” blackberry, black pepper, smoked meat and olive with firm but integrated tannins.",
   fl:[{n:"Blackberry",p:84},{n:"Black Pepper",p:80},{n:"Smoked Meat",p:72},{n:"Olive",p:68},{n:"Violet",p:65}],
   ch:{body:"Medium-Full",tannins:"Firm",acidity:"Medium",finish:"Medium-Long",color:"Deep Ruby",ageing:"10 years"},pair:["Lamb","Duck","Beef","Hard Cheese","BBQ"]},

  {n:"Zweigelt",p:"Schloss Gobelsburg",r:"Kamptal",c:"Austria",y:"2021",t:"red",g:"Zweigelt",abv:"13%",sc:91,rev:"Falstaff",tier:"Very Good",pri:"$18โ€“$26",
   note:"Austria's most beloved red โ€” cherry, raspberry, earth and a hint of pepper. Easy-going yet genuine with refreshing acidity.",
   fl:[{n:"Cherry",p:85},{n:"Raspberry",p:80},{n:"Earth",p:68},{n:"Black Pepper",p:65},{n:"Herbs",p:60}],
   ch:{body:"Medium",tannins:"Low",acidity:"Medium-High",finish:"Medium",color:"Ruby",ageing:"5 years"},pair:["Grilled Chicken","Pork","Pasta","Pizza","Light Cheese"]},

  {n:"Cรดte de Nuits-Villages",p:"Domaine Confuron-Cotetidot",r:"Burgundy",c:"France",y:"2018",t:"red",g:"Pinot Noir",abv:"13%",sc:91,rev:"Burghound",tier:"Very Good",pri:"$35โ€“$50",
   note:"Entry-level Burgundy done right โ€” red cherry, mushroom, gentle spice and a silky, refreshing finish that shows the appellation's true character.",
   fl:[{n:"Red Cherry",p:82},{n:"Mushroom",p:72},{n:"Spice",p:65},{n:"Earth",p:70},{n:"Rose",p:60}],
   ch:{body:"Light-Medium",tannins:"Low",acidity:"High",finish:"Medium",color:"Pale Ruby",ageing:"8 years"},pair:["Duck","Salmon","Mushroom Risotto","Roast Chicken","Brie"]},
];

/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
   COLOURS, FLAGS, HELPERS
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
const BC = {
  red:      {glass:"#1a3218",liquid:"#6b1f2e",cap:"#7a1a28"},
  white:    {glass:"#243a1e",liquid:"#c8a840",cap:"#2e5228"},
  rosรฉ:     {glass:"#1e3820",liquid:"#c46060",cap:"#8b3848"},
  sparkling:{glass:"#182230",liquid:"#d4c840",cap:"#1a3a20"},
  port:     {glass:"#1a1218",liquid:"#5a0a18",cap:"#4a0a18"},
};
const FLAGS = {France:"๐Ÿ‡ซ๐Ÿ‡ท",Italy:"๐Ÿ‡ฎ๐Ÿ‡น",Spain:"๐Ÿ‡ช๐Ÿ‡ธ",USA:"๐Ÿ‡บ๐Ÿ‡ธ",Australia:"๐Ÿ‡ฆ๐Ÿ‡บ","New Zealand":"๐Ÿ‡ณ๐Ÿ‡ฟ",Argentina:"๐Ÿ‡ฆ๐Ÿ‡ท",Chile:"๐Ÿ‡จ๐Ÿ‡ฑ",Germany:"๐Ÿ‡ฉ๐Ÿ‡ช",Portugal:"๐Ÿ‡ต๐Ÿ‡น","South Africa":"๐Ÿ‡ฟ๐Ÿ‡ฆ",Austria:"๐Ÿ‡ฆ๐Ÿ‡น",Hungary:"๐Ÿ‡ญ๐Ÿ‡บ"};
const TIER_COLOR = {Perfect:"#ffd700","Legendary":"#f4a460","Exceptional":"#d4a843","Outstanding":"#c4b9a8","Very Good":"#a0a090","Good":"#808070"};

/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
   FUZZY SEARCH
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
function score(wine, q) {
  const lq = q.toLowerCase();
  const combo = (wine.n + " " + wine.p + " " + wine.r + " " + wine.c + " " + wine.g).toLowerCase();
  let s = 0;
  if (combo.includes(lq)) s += 60;
  for (const word of lq.split(/\s+/).filter(w => w.length > 2)) {
    if (wine.n.toLowerCase().includes(word)) s += 30;
    if (wine.p.toLowerCase().includes(word)) s += 20;
    if (wine.r.toLowerCase().includes(word)) s += 10;
    if (wine.g.toLowerCase().includes(word)) s += 15;
    if (wine.c.toLowerCase().includes(word)) s += 5;
  }
  return s;
}

function findWine(q) {
  if (!q.trim()) return null;
  const results = WINES.map(w => ({wine:w, s:score(w,q)})).filter(x => x.s > 0);
  results.sort((a,b) => b.s - a.s);
  return results.length ? results[0].wine : null;
}

function getSuggestions(q) {
  if (q.length < 2) return [];
  const results = WINES.map(w => ({wine:w, s:score(w,q)})).filter(x => x.s > 0);
  results.sort((a,b) => b.s - a.s);
  return results.slice(0,6).map(x => x.wine);
}

/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
   RENDER
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
function renderBottle(w) {
  const c = BC[w.t] || BC.red;
  document.getElementById("bb").style.fill = c.glass;
  document.getElementById("bn").style.fill = c.glass;
  document.getElementById("bl").style.fill = c.liquid;
  document.getElementById("bc").style.fill = c.cap;
  const parts = w.p.toUpperCase().split(/\s+/);
  document.getElementById("l1").textContent = parts[0] || "";
  document.getElementById("l2").textContent = parts.slice(1,3).join(" ") || "";
  document.getElementById("l3").textContent = w.y || "";
  document.getElementById("l4").textContent = w.n.toUpperCase().slice(0,14);
}

const ANN_DEFS = [
  {k:"Vintage",  v:w => w.y,             top:"8%",  left:"60%",  dir:"r", delay:.3},
  {k:"Country",  v:w => w.c,             top:"22%", left:"-5%",  dir:"l", delay:.5},
  {k:"Grape",    v:w => w.g.split(",")[0],top:"46%", left:"60%",  dir:"r", delay:.7},
  {k:"ABV",      v:w => w.abv,           top:"61%", left:"-5%",  dir:"l", delay:.9},
  {k:"Body",     v:w => w.ch.body,       top:"76%", left:"60%",  dir:"r", delay:1.1},
];

function renderAnnotations(w) {
  const layer = document.getElementById("al");
  layer.innerHTML = "";
  ANN_DEFS.forEach(def => {
    const val = def.v(w);
    if (!val) return;
    const el = document.createElement("div");
    el.className = `an ${def.dir}`;
    el.style.cssText = `top:${def.top};left:${def.left};animation-delay:${def.delay}s`;
    const isR = def.dir === "r";
    el.innerHTML = `
      ${isR ? `<div class="adot"></div><div class="aline" style="width:26px"></div>` : ""}
      <div class="ab">
        <span class="ak">${def.k}</span>
        <span class="av">${val}</span>
      </div>
      ${!isR ? `<div class="aline" style="width:26px"></div><div class="adot"></div>` : ""}
    `;
    layer.appendChild(el);
  });
}

function display(w) {
  document.getElementById("rn").textContent  = w.n;
  document.getElementById("rs").textContent  = `${w.r.toUpperCase()} ยท ${w.t.toUpperCase()}`;
  document.getElementById("rf").textContent  = FLAGS[w.c] || "๐Ÿท";
  document.getElementById("rl").textContent  = `${w.r} ยท ${w.c}`;
  document.getElementById("rvy").textContent = w.y;

  // Score
  document.getElementById("rsc").textContent  = w.sc;
  document.getElementById("rsc").style.color  = TIER_COLOR[w.tier] || "var(--gold)";
  document.getElementById("rti").textContent  = `${w.tier} ยท ${w.rev}`;
  const filled = Math.round(w.sc/20);
  document.getElementById("rstr").innerHTML = [...Array(5)].map((_,i) =>
    `<svg class="star ${i<filled?"on":""}" viewBox="0 0 24 24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>`
  ).join("");
  document.getElementById("rrev").textContent = w.rev;

  document.getElementById("rno").textContent = `"${w.note}"`;

  // Chars
  document.getElementById("rcg").innerHTML = Object.entries(w.ch).map(([k,v]) =>
    `<div class="cc"><div class="ck">${k}</div><div class="cv">${v}</div></div>`
  ).join("") +
  `<div class="cc"><div class="ck">Grape</div><div class="cv">${w.g}</div></div>`+
  `<div class="cc"><div class="ck">ABV</div><div class="cv">${w.abv}</div></div>`;

  // Flavors
  const fd = document.getElementById("rfl");
  fd.innerHTML = w.fl.map(f =>
    `<div class="fr"><span class="fn">${f.n}</span><div class="bt"><div class="bf" data-p="${f.p}"></div></div><span class="bp">${f.p}</span></div>`
  ).join("");
  setTimeout(()=> fd.querySelectorAll(".bf").forEach(b=>b.style.width=b.dataset.p+"%"), 80);

  // Pairing
  document.getElementById("rpr").innerHTML = w.pair.map(p=>`<span class="pt">${p}</span>`).join("");

  // Price
  document.getElementById("rpri").textContent = w.pri;

  renderBottle(w);
  renderAnnotations(w);
}

/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
   AUTOCOMPLETE DROPDOWN
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
const input  = document.getElementById("wi");
const sdrop  = document.getElementById("sdrop");
let selIdx   = -1;

function showDrop(q) {
  const sugs = getSuggestions(q);
  if (!sugs.length) { sdrop.classList.remove("on"); return; }
  sdrop.innerHTML = sugs.map((w,i) =>
    `<div class="sitem" data-idx="${i}" data-name="${w.n}">${w.n} <span>${w.r} ยท ${w.y}</span></div>`
  ).join("");
  sdrop.classList.add("on");
  selIdx = -1;
  sdrop.querySelectorAll(".sitem").forEach(el => {
    el.addEventListener("mousedown", e => {
      e.preventDefault();
      input.value = el.dataset.name;
      sdrop.classList.remove("on");
      doSearch(el.dataset.name);
    });
  });
}

input.addEventListener("input", () => { showDrop(input.value); });
input.addEventListener("blur",  () => setTimeout(()=>sdrop.classList.remove("on"),150));

input.addEventListener("keydown", e => {
  const items = sdrop.querySelectorAll(".sitem");
  if (e.key === "ArrowDown") {
    selIdx = Math.min(selIdx+1, items.length-1);
    items.forEach((el,i)=>el.classList.toggle("active",i===selIdx));
  } else if (e.key === "ArrowUp") {
    selIdx = Math.max(selIdx-1,-1);
    items.forEach((el,i)=>el.classList.toggle("active",i===selIdx));
  } else if (e.key === "Enter") {
    sdrop.classList.remove("on");
    if (selIdx >= 0 && items[selIdx]) {
      input.value = items[selIdx].dataset.name;
      doSearch(items[selIdx].dataset.name);
    } else {
      doSearch(input.value);
    }
  }
});

/* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
   SEARCH HANDLER
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
function doSearch(q) {
  q = q.trim();
  if (!q) return;
  const msg    = document.getElementById("msg");
  const result = document.getElementById("result");
  msg.classList.remove("on");
  const wine = findWine(q);
  if (!wine) {
    msg.classList.add("on");
    msg.textContent = `No wine found for "${q}". Try: Margaux, Opus One, Pinot Noir, Barolo, Rieslingโ€ฆ`;
    result.classList.remove("on");
    return;
  }
  display(wine);
  result.classList.add("on");
  result.scrollIntoView({behavior:"smooth",block:"start"});
}

document.getElementById("gb").addEventListener("click", () => doSearch(input.value));
document.querySelectorAll(".chip").forEach(c => c.addEventListener("click", () => {
  input.value = c.dataset.q;
  sdrop.classList.remove("on");
  doSearch(c.dataset.q);
}));
</script>
</body>
</html>