-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1843 lines (1561 loc) · 54.2 KB
/
Copy pathindex.html
File metadata and controls
1843 lines (1561 loc) · 54.2 KB
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
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Find possible Spelling Bee-style words using seven letters and a required center letter."
/>
<meta name="robots" content="index, follow" />
<meta
name="google-site-verification"
content="-s3MAawSQTI8ztB_VpEPKbIjnNllaN5OuV04C89_buA"
/>
<link rel="canonical" href="https://spelling-bee-solver-pro.netlify.app/" />
<link rel="sitemap" type="application/xml" href="/sitemap.xml" />
<title>Spelling Bee Solver & Word Finder</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
:root {
--ink: #162033;
--cream: #fffaf1;
--paper: #fffdf8;
--honey: #f6b52e;
--honey-dark: #d9860d;
--honey-soft: #fff2c8;
--line: #e8dcc3;
--success: #198754;
--danger: #c93737;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
min-width: 320px;
background:
radial-gradient(
circle at 10% 0%,
rgba(255, 211, 102, 0.18),
transparent 28rem
),
radial-gradient(
circle at 100% 16%,
rgba(255, 237, 188, 0.55),
transparent 32rem
),
var(--cream);
}
.brand-mark {
display: grid;
width: 40px;
height: 44px;
place-items: center;
background: linear-gradient(145deg, #ffdc77, #e99f1b);
clip-path: polygon(
25% 6.7%,
75% 6.7%,
100% 50%,
75% 93.3%,
25% 93.3%,
0 50%
);
box-shadow: 0 6px 16px rgba(199, 122, 10, 0.25);
}
.surface-card {
border: 1px solid rgba(229, 213, 178, 0.95);
background: rgba(255, 253, 248, 0.94);
box-shadow: 0 18px 48px rgba(78, 53, 11, 0.09);
backdrop-filter: blur(12px);
}
.hive-grid {
display: grid;
grid-template-columns: repeat(3, 74px);
grid-template-rows: repeat(3, 69px);
align-items: center;
justify-items: center;
justify-content: center;
margin: 0 auto;
padding: 10px 0 16px;
}
.hive-cell {
position: relative;
display: grid;
width: 70px;
height: 78px;
place-items: center;
}
.hive-cell:nth-child(1) {
grid-column: 2;
grid-row: 1;
}
.hive-cell:nth-child(2) {
grid-column: 1;
grid-row: 2;
}
.hive-cell:nth-child(3) {
z-index: 2;
grid-column: 2;
grid-row: 2;
}
.hive-cell:nth-child(4) {
grid-column: 3;
grid-row: 2;
}
.hive-cell:nth-child(5) {
grid-column: 1;
grid-row: 3;
}
.hive-cell:nth-child(6) {
grid-column: 2;
grid-row: 3;
}
.hive-cell:nth-child(7) {
grid-column: 3;
grid-row: 3;
}
.hex-shape {
position: absolute;
inset: 0;
border: 2px solid #ddcda8;
background: linear-gradient(145deg, #fffefa, #fff6df);
clip-path: polygon(
25% 6.7%,
75% 6.7%,
100% 50%,
75% 93.3%,
25% 93.3%,
0 50%
);
box-shadow: 0 5px 0 rgba(193, 165, 105, 0.22);
transition:
transform 0.16s ease,
border-color 0.16s ease,
box-shadow 0.16s ease,
background 0.16s ease;
}
.hive-cell:hover .hex-shape {
border-color: #e7a930;
transform: translateY(-2px);
}
.hive-cell:focus-within .hex-shape {
border-color: var(--honey-dark);
box-shadow:
0 0 0 4px rgba(246, 181, 46, 0.25),
0 7px 0 rgba(193, 165, 105, 0.22);
transform: translateY(-2px);
}
.hive-cell.center .hex-shape {
border-color: #d8860c;
background: linear-gradient(145deg, #ffe79c, #f4b52b);
box-shadow: 0 6px 0 rgba(161, 100, 6, 0.22);
}
.hex-input {
position: relative;
z-index: 2;
width: 66px;
height: 74px;
border: none;
background: transparent;
color: #243047;
outline: none;
text-align: center;
font-size: 1.5rem;
font-weight: 900;
line-height: 74px;
text-transform: uppercase;
}
.hive-cell.center .hex-input {
color: #442f09;
}
.center-label {
position: absolute;
z-index: 3;
bottom: 2px;
left: 50%;
transform: translateX(-50%);
color: #674004;
font-size: 0.52rem;
font-weight: 900;
letter-spacing: 0.08em;
pointer-events: none;
}
.hive-cell.input-error .hex-shape {
border-color: var(--danger);
background: #fff0f0;
box-shadow: 0 0 0 4px rgba(201, 55, 55, 0.12);
}
.hive-cell.input-success:not(.center) .hex-shape {
border-color: #52a878;
background: #f5fff9;
}
.hive-cell.input-success.center .hex-shape {
border-color: #ba7608;
background: linear-gradient(145deg, #ffeba9, #f5bd40);
}
.word-chip {
display: inline-flex;
align-items: center;
gap: 0.45rem;
border: 1px solid #e9dfcd;
border-radius: 0.75rem;
background: #fffefa;
padding: 0.6rem 0.72rem;
color: #273247;
font-size: 0.84rem;
font-weight: 800;
transition:
transform 0.15s ease,
border-color 0.15s ease,
box-shadow 0.15s ease;
}
.word-chip:hover {
border-color: #dbaa52;
box-shadow: 0 6px 16px rgba(101, 68, 12, 0.1);
transform: translateY(-1px);
}
.word-chip.pangram {
border-color: #e0a126;
background: linear-gradient(145deg, #fff5d3, #ffe5a0);
color: #674103;
}
.word-score {
border-left: 1px solid rgba(117, 87, 30, 0.18);
padding-left: 0.45rem;
color: #81734f;
font-size: 0.72rem;
font-weight: 900;
}
.word-chip.pangram .word-score {
color: #86580a;
}
.filter-chip {
border: 1px solid #e3d8c2;
border-radius: 999px;
background: #fffefa;
padding: 0.42rem 0.72rem;
color: #596375;
font-size: 0.78rem;
font-weight: 800;
transition: 0.16s ease;
}
.filter-chip:hover {
border-color: #dfad4d;
color: #714805;
}
.filter-chip.active {
border-color: #dc980f;
background: #fff0c5;
color: #714805;
}
.filter-chip:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
outline: 3px solid rgba(246, 181, 46, 0.45);
outline-offset: 2px;
}
.progress-fill {
height: 100%;
border-radius: inherit;
background: linear-gradient(90deg, #f1a91f, #ffd36a);
transition: width 0.2s ease;
}
.results-scroll::-webkit-scrollbar {
width: 8px;
}
.results-scroll::-webkit-scrollbar-track {
background: transparent;
}
.results-scroll::-webkit-scrollbar-thumb {
border: 2px solid transparent;
border-radius: 20px;
background: #dac79c;
background-clip: content-box;
}
.toast {
position: fixed;
z-index: 50;
right: 1rem;
bottom: 1rem;
max-width: min(24rem, calc(100vw - 2rem));
border: 1px solid #b9d8c6;
border-radius: 0.9rem;
background: #f2fff7;
box-shadow: 0 12px 30px rgba(19, 76, 45, 0.16);
padding: 0.9rem 1rem;
color: #17623f;
font-size: 0.9rem;
font-weight: 750;
opacity: 0;
pointer-events: none;
transform: translateY(16px);
transition:
opacity 0.2s ease,
transform 0.2s ease;
}
.toast.visible {
opacity: 1;
transform: translateY(0);
}
@media (max-width: 420px) {
.hive-grid {
grid-template-columns: repeat(3, 66px);
grid-template-rows: repeat(3, 61px);
}
.hive-cell {
width: 62px;
height: 70px;
}
.hex-input {
width: 58px;
height: 67px;
font-size: 1.35rem;
line-height: 67px;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
transition-duration: 0.01ms !important;
}
}
</style>
</head>
<body class="flex min-h-screen flex-col text-slate-800">
<header class="border-b border-amber-100 bg-white/90 backdrop-blur">
<div class="mx-auto flex w-full max-w-6xl items-center justify-between px-4 py-4 sm:px-6">
<a
href="/"
class="flex items-center gap-3"
aria-label="Spelling Bee Solver home"
>
<span class="brand-mark text-lg" aria-hidden="true">🐝</span>
<span>
<span class="block text-lg font-black tracking-tight text-slate-900">
Spelling Bee Solver
</span>
<span class="block text-xs font-semibold text-slate-500">
Find possible words, pangrams, and scores
</span>
</span>
</a>
<a
href="privacy.html"
class="rounded-lg px-3 py-2 text-sm font-bold text-slate-600 transition hover:bg-amber-50 hover:text-amber-800"
>
Privacy
</a>
</div>
</header>
<div
id="dictStatus"
class="border-b border-amber-100 bg-amber-50 px-4 py-2 text-center text-sm font-semibold text-amber-900"
role="status"
aria-live="polite"
>
Loading word dictionary…
</div>
<main class="flex-grow">
<section class="border-b border-amber-100 bg-gradient-to-br from-[#fffaf1] via-[#fff7e8] to-[#fffdf9] px-4 py-10 sm:px-6 sm:py-14">
<div class="mx-auto max-w-3xl text-center">
<div class="inline-flex items-center gap-2 rounded-full border border-amber-200 bg-white/80 px-3 py-1 text-xs font-black uppercase tracking-[0.16em] text-amber-800 shadow-sm">
<span aria-hidden="true">✦</span>
Seven-letter word helper
</div>
<h1 class="mt-4 text-4xl font-black tracking-tight text-slate-900 sm:text-5xl">
Solve your hive faster.
</h1>
<p class="mx-auto mt-3 max-w-2xl text-base leading-relaxed text-slate-600 sm:text-lg">
Add your seven letters, make sure the gold center letter is included,
and explore possible words in seconds.
</p>
</div>
</section>
<section class="mx-auto w-full max-w-6xl px-4 py-7 sm:px-6 sm:py-10">
<div class="grid items-start gap-7 lg:grid-cols-12">
<section
class="surface-card rounded-3xl p-5 sm:p-7 lg:col-span-5"
aria-labelledby="solver-heading"
>
<div class="flex items-start justify-between gap-4">
<div>
<p class="text-xs font-black uppercase tracking-[0.18em] text-amber-700">
Your puzzle
</p>
<h2
id="solver-heading"
class="mt-1 text-2xl font-black tracking-tight text-slate-900"
>
Build the hive
</h2>
<p
id="letterHelp"
class="mt-2 text-sm leading-relaxed text-slate-600"
>
Use seven different letters. The gold center tile is required in
every result.
</p>
</div>
<span
id="letterProgressText"
class="shrink-0 rounded-full border border-slate-200 bg-slate-50 px-3 py-1.5 text-xs font-black text-slate-700"
>
0 of 7
</span>
</div>
<div class="mt-5">
<div
class="h-2 overflow-hidden rounded-full bg-slate-100"
aria-hidden="true"
>
<div id="letterProgressFill" class="progress-fill w-0"></div>
</div>
</div>
<div class="mt-5 rounded-2xl border border-amber-200 bg-amber-50/70 p-3">
<label
for="quickEntry"
class="block text-xs font-black uppercase tracking-[0.12em] text-amber-900"
>
Fast entry
</label>
<div class="mt-2 flex gap-2">
<input
id="quickEntry"
type="text"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
maxlength="7"
placeholder="Paste 7 letters, e.g. ACEILNP"
class="min-w-0 flex-grow rounded-xl border border-amber-200 bg-white px-3 py-2.5 text-sm font-bold uppercase text-slate-800 placeholder:normal-case placeholder:font-medium placeholder:text-slate-400 focus:border-amber-500 focus:outline-none focus:ring-4 focus:ring-amber-100"
aria-describedby="quickEntryHelp"
/>
<button
id="applyQuickEntryBtn"
type="button"
class="min-h-11 shrink-0 rounded-xl bg-amber-500 px-4 text-sm font-black text-white shadow-sm transition hover:bg-amber-600"
>
Add
</button>
</div>
<p
id="quickEntryHelp"
class="mt-2 text-xs leading-relaxed text-amber-900"
>
Order: outer, outer, center, outer, outer, outer, outer.
</p>
</div>
<form id="solverForm" class="mt-6" novalidate>
<fieldset aria-describedby="letterHelp inputFeedback">
<legend class="sr-only">
Enter one required center letter and six outer letters
</legend>
<div class="hive-grid" aria-label="Puzzle letter inputs">
<div class="hive-cell">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="letter1">Outer letter 1</label>
<input
id="letter1"
class="hex-input outer-letter"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="A"
aria-label="Outer letter 1"
/>
</div>
<div class="hive-cell">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="letter2">Outer letter 2</label>
<input
id="letter2"
class="hex-input outer-letter"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="B"
aria-label="Outer letter 2"
/>
</div>
<div class="hive-cell center">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="centerLetter">
Required center letter
</label>
<input
id="centerLetter"
class="hex-input"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="★"
aria-label="Required center letter"
aria-required="true"
required
/>
<span class="center-label" aria-hidden="true">REQUIRED</span>
</div>
<div class="hive-cell">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="letter3">Outer letter 3</label>
<input
id="letter3"
class="hex-input outer-letter"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="C"
aria-label="Outer letter 3"
/>
</div>
<div class="hive-cell">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="letter4">Outer letter 4</label>
<input
id="letter4"
class="hex-input outer-letter"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="D"
aria-label="Outer letter 4"
/>
</div>
<div class="hive-cell">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="letter5">Outer letter 5</label>
<input
id="letter5"
class="hex-input outer-letter"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="E"
aria-label="Outer letter 5"
/>
</div>
<div class="hive-cell">
<span class="hex-shape" aria-hidden="true"></span>
<label class="sr-only" for="letter6">Outer letter 6</label>
<input
id="letter6"
class="hex-input outer-letter"
type="text"
maxlength="1"
inputmode="text"
autocomplete="off"
autocapitalize="characters"
placeholder="F"
aria-label="Outer letter 6"
/>
</div>
</div>
</fieldset>
<p
id="inputFeedback"
class="mt-2 min-h-6 rounded-lg bg-slate-50 px-3 py-2 text-center text-sm font-medium text-slate-600"
role="alert"
aria-live="assertive"
>
Enter letters individually or use Fast entry above.
</p>
<button
id="solveBtn"
type="submit"
disabled
class="mt-4 flex min-h-12 w-full items-center justify-center gap-2 rounded-xl bg-slate-400 px-4 py-3 text-base font-black text-white shadow-sm"
>
<span aria-hidden="true">⌛</span>
<span>Loading Dictionary…</span>
</button>
<div class="mt-3 grid grid-cols-2 gap-3">
<button
id="clearBtn"
type="button"
class="min-h-11 rounded-xl border border-slate-300 bg-white px-4 py-2.5 text-sm font-black text-slate-700 transition hover:border-slate-400 hover:bg-slate-50"
>
Clear hive
</button>
<button
id="exampleBtn"
type="button"
class="min-h-11 rounded-xl border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm font-black text-amber-900 transition hover:border-amber-400 hover:bg-amber-100"
>
Try example
</button>
</div>
<button
id="refreshDictionaryBtn"
type="button"
class="mt-4 min-h-11 w-full rounded-xl px-4 py-2 text-center text-xs font-bold text-slate-500 transition hover:bg-slate-100 hover:text-slate-800"
>
↻ Refresh word dictionary
</button>
</form>
</section>
<section
class="surface-card flex min-h-[650px] flex-col overflow-hidden rounded-3xl lg:col-span-7"
aria-labelledby="results-heading"
>
<div class="border-b border-amber-100 bg-gradient-to-r from-white to-amber-50/70 p-5 sm:p-7">
<div class="flex flex-col gap-4">
<div class="flex flex-col justify-between gap-4 sm:flex-row sm:items-start">
<div>
<p class="text-xs font-black uppercase tracking-[0.18em] text-amber-700">
Results
</p>
<h2
id="results-heading"
class="mt-1 text-2xl font-black tracking-tight text-slate-900"
>
Possible words
</h2>
<p
id="searchSummary"
class="mt-2 text-sm leading-relaxed text-slate-600"
>
Add a complete hive to see results.
</p>
</div>
<div class="flex flex-wrap gap-2">
<span
id="wordCount"
class="hidden rounded-full border border-slate-200 bg-white px-3 py-1.5 text-sm font-black text-slate-700 shadow-sm"
>
0 words
</span>
<span
id="pangramCount"
class="hidden rounded-full border border-amber-200 bg-amber-100 px-3 py-1.5 text-sm font-black text-amber-900 shadow-sm"
>
0 pangrams
</span>
<span
id="scoreTotal"
class="hidden rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1.5 text-sm font-black text-emerald-800 shadow-sm"
>
0 points
</span>
</div>
</div>
<div id="resultsToolbar" class="hidden border-t border-amber-100 pt-4">
<div class="flex flex-col justify-between gap-3 lg:flex-row lg:items-center">
<div class="flex flex-wrap gap-2" aria-label="Result filters">
<button
type="button"
class="filter-chip active"
data-filter="all"
>
All
</button>
<button
type="button"
class="filter-chip"
data-filter="pangram"
>
👑 Pangrams
</button>
<button
type="button"
class="filter-chip"
data-filter="4"
>
4 letters
</button>
<button
type="button"
class="filter-chip"
data-filter="5"
>
5 letters
</button>
<button
type="button"
class="filter-chip"
data-filter="6"
>
6 letters
</button>
<button
type="button"
class="filter-chip"
data-filter="7plus"
>
7+ letters
</button>
</div>
<div class="flex gap-2">
<button
id="copyResultsBtn"
type="button"
class="min-h-10 rounded-lg border border-slate-300 bg-white px-3 py-2 text-xs font-black text-slate-700 transition hover:bg-slate-50"
>
Copy results
</button>
<button
id="shareHiveBtn"
type="button"
class="min-h-10 rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-xs font-black text-amber-900 transition hover:bg-amber-100"
>
Share hive
</button>
</div>
</div>
</div>
</div>
</div>
<div
id="resultsContainer"
class="results-scroll flex-grow overflow-y-auto p-5 sm:p-7"
aria-live="polite"
>
<div class="flex min-h-[400px] flex-col items-center justify-center text-center">
<div
class="grid h-20 w-20 place-items-center rounded-3xl border border-amber-200 bg-gradient-to-br from-amber-50 to-amber-100 text-4xl shadow-sm"
aria-hidden="true"
>
🐝
</div>
<h3 class="mt-5 text-xl font-black text-slate-800">
Ready to search.
</h3>
<p class="mt-2 max-w-sm text-sm leading-relaxed text-slate-500">
Add your hive letters, then choose
<strong class="font-bold text-slate-700">
Find Possible Words
</strong>.
</p>
<button
id="emptyExampleBtn"
type="button"
class="mt-5 min-h-11 rounded-xl bg-amber-500 px-4 py-2.5 text-sm font-black text-white shadow-sm transition hover:bg-amber-600"
>
Load an example
</button>
</div>
</div>
<div class="border-t border-amber-100 bg-[#fffdf8] px-5 py-3 text-xs leading-relaxed text-slate-500 sm:px-7">
<span class="font-bold text-slate-700">Dictionary note:</span>
These are possible matches from a general English dictionary, not an
official publisher-specific answer list.
</div>
</section>
</div>
</section>
</main>
<footer class="mt-8 border-t border-amber-100 bg-[#fffdf8] px-4 py-9 text-sm text-slate-600 sm:px-6">
<div class="mx-auto max-w-6xl">
<div class="grid gap-7 md:grid-cols-3">
<section>
<h2 class="font-black text-slate-900">
Fast browser-based solver
</h2>
<p class="mt-2 leading-relaxed">
Your puzzle letters are processed in your browser. A saved dictionary
can make future visits faster.
</p>
</section>
<section>
<h2 class="font-black text-slate-900">
Pangrams and score
</h2>
<p class="mt-2 leading-relaxed">
Crowned words use all seven letters. Scores are estimates based on a
common Spelling Bee-style convention.
</p>
</section>
<section>
<h2 class="font-black text-slate-900">
Need help?
</h2>
<p class="mt-2 leading-relaxed">
Start with the gold center letter, add six unique outer letters, and
search for possible matches.
</p>
</section>
</div>
<div class="mt-8 flex flex-wrap items-center justify-between gap-3 border-t border-amber-100 pt-6 text-xs text-slate-500">
<span>© 2026 By Cash Marketing</span>
<a
href="privacy.html"
class="font-bold text-slate-600 transition hover:text-amber-700 hover:underline"
>
Privacy Policy
</a>
</div>
</div>
</footer>
<div id="toast" class="toast" role="status" aria-live="polite"></div>
<script>
let masterDictionary = [];
let dictionaryLoadInProgress = false;
let latestResults = [];
let activeFilter = "all";
const dictionaryUrl =
"https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt";
const CACHE_KEY = "spellingBeeDictionary_v4";
const CACHE_TIMESTAMP_KEY = "spellingBeeDictionary_time_v4";
const CACHE_EXPIRATION_MS = 7 * 24 * 60 * 60 * 1000;
const EXAMPLE_LETTERS = ["A", "C", "E", "I", "L", "N", "P"];
const statusBanner = document.getElementById("dictStatus");
const solverForm = document.getElementById("solverForm");
const solveButton = document.getElementById("solveBtn");
const clearButton = document.getElementById("clearBtn");
const exampleButton = document.getElementById("exampleBtn");
const refreshDictionaryButton = document.getElementById(
"refreshDictionaryBtn"
);
const quickEntry = document.getElementById("quickEntry");
const applyQuickEntryButton = document.getElementById(
"applyQuickEntryBtn"
);
const inputFeedback = document.getElementById("inputFeedback");
const letterProgressText = document.getElementById(
"letterProgressText"
);
const letterProgressFill = document.getElementById(
"letterProgressFill"
);
const resultsContainer = document.getElementById("resultsContainer");
const resultsToolbar = document.getElementById("resultsToolbar");
const wordCountBadge = document.getElementById("wordCount");
const pangramCountBadge = document.getElementById("pangramCount");
const scoreTotalBadge = document.getElementById("scoreTotal");
const searchSummary = document.getElementById("searchSummary");
const copyResultsButton = document.getElementById("copyResultsBtn");
const shareHiveButton = document.getElementById("shareHiveBtn");
const toast = document.getElementById("toast");
const inputs = Array.from(document.querySelectorAll(".hex-input"));
function normalizeLetter(value) {
return value.replace(/[^a-z]/gi, "").slice(0, 1).toUpperCase();
}
function sanitizeLetters(value) {
return value.replace(/[^a-z]/gi, "").toUpperCase().slice(0, 7);
}
function showToast(message) {
toast.textContent = message;
toast.classList.add("visible");
window.clearTimeout(showToast.timeout);
showToast.timeout = window.setTimeout(() => {
toast.classList.remove("visible");
}, 2800);
}
function setDictionaryStatus(type, message) {
const styles = {
loading:
"border-b border-amber-100 bg-amber-50 px-4 py-2 text-center text-sm font-semibold text-amber-900",
success:
"border-b border-emerald-100 bg-emerald-50 px-4 py-2 text-center text-sm font-semibold text-emerald-800",
error:
"border-b border-red-100 bg-red-50 px-4 py-2 text-center text-sm font-bold text-red-800"
};
statusBanner.className = styles[type];
statusBanner.textContent = message;
}
function setSolveButtonLoading() {
solveButton.disabled = true;
solveButton.className =
"mt-4 flex min-h-12 w-full cursor-not-allowed items-center justify-center gap-2 rounded-xl bg-slate-400 px-4 py-3 text-base font-black text-white shadow-sm";
solveButton.innerHTML =
'<span aria-hidden="true">⌛</span><span>Loading Dictionary…</span>';
}