/* Local styles for the page and JavaScript-generated results.
   Utility names are retained so markup can be edited without a build step. */

/* Browser defaults and text-input styling previously supplied by Tailwind. */
*, ::before, ::after { box-sizing: border-box; border: 0 solid #e5e7eb; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; -webkit-tap-highlight-color: transparent; }
body { margin: 0; line-height: inherit; }
h1, h2, h3, h4, h5, h6, p, ol, ul { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
ol, ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
button, input { font: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; }
button { text-transform: none; appearance: button; background: transparent; cursor: pointer; }
:where(input[type="text"]) { appearance: none; background-color: #fff; border: 1px solid #6b7280; border-radius: 0; padding: 0.5rem 0.75rem; font-size: 1rem; line-height: 1.5rem; }
:where(input[type="text"]):focus { outline: 2px solid transparent; outline-offset: 2px; border-color: #2563eb; }
input::placeholder { color: #6b7280; opacity: 1; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
[hidden] { display: none; }

.-right-4 { right: -1rem; }
.-top-4 { top: -1rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.absolute { position: absolute; }
.aspect-square { aspect-ratio: 1 / 1; }
.bg-background { background-color: #f4fafd; }
.bg-black\/40 { background-color: rgb(0 0 0 / 0.4); }
.bg-on-secondary\/10 { background-color: rgb(255 255 255 / 0.1); }
.bg-primary { background-color: #f25912; }
.bg-primary-container\/10 { background-color: rgb(255 107 107 / 0.1); }
.bg-primary-container\/20 { background-color: rgb(255 107 107 / 0.2); }
.bg-secondary { background-color: #5952af; }
.bg-secondary-container { background-color: #a19afd; }
.bg-surface { background-color: #f4fafd; }
.bg-surface-container { background-color: #e8eff1; }
.bg-surface-container-highest { background-color: #dde4e6; }
.bg-surface-container-low { background-color: #a798fd; }
.bg-white { background-color: #ffffff; }
.bg-white\/50 { background-color: rgb(255 255 255 / 0.5); }
.block { display: block; }
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-none { border-style: none; }
.border-on-secondary\/10 { border-color: rgb(255 255 255 / 0.1); }
.border-on-secondary\/20 { border-color: rgb(255 255 255 / 0.2); }
.border-on-secondary\/30 { border-color: rgb(255 255 255 / 0.3); }
.border-primary-container\/30 { border-color: rgb(255 107 107 / 0.3); }
.border-secondary { border-color: #5952af; }
.border-surface-variant { border-color: #dde4e6; }
.border-surface-variant\/30 { border-color: rgb(221 228 230 / 0.3); }
.border-t { border-top-width: 1px; }
.cursor-pointer { cursor: pointer; }
.duration-500 { transition-duration: 500ms; }
.fixed { position: fixed; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-wrap { flex-wrap: wrap; }
.font-body-md { font-family: "Hanken Grotesk"; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-headline-lg { font-family: "Plus Jakarta Sans"; }
.font-headline-md { font-family: "Plus Jakarta Sans"; }
.font-label-bold { font-family: "Hanken Grotesk"; }
.font-puzzle-tile { font-family: "Plus Jakarta Sans"; }
.gap-4 { gap: 1rem; }
.gap-lg { gap: 40px; }
.gap-md { gap: 24px; }
.gap-sm { gap: 12px; }
.gap-xs { gap: 4px; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.h-12 { height: 3rem; }
.hidden { display: none; }
.inset-0 { inset: 0; }
.italic { font-style: italic; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.leading-relaxed { line-height: 1.625; }
.max-w-7xl { max-width: 80rem; }
.max-w-lg { max-width: 32rem; }
.mb-md { margin-bottom: 24px; }
.mb-sm { margin-bottom: 12px; }
.min-h-\[300px\] { min-height: 300px; }
.min-h-screen { min-height: 100vh; }
.ml-1 { margin-left: 0.25rem; }
.mt-xl { margin-top: 64px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.object-cover { object-fit: cover; }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.overflow-hidden { overflow: hidden; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-md { padding: 24px; }
.p-sm { padding: 12px; }
.pb-sm { padding-bottom: 12px; }
.place-items-center { place-items: center; }
.placeholder\:text-secondary\/30::placeholder { color: rgb(89 82 175 / 0.3); }
.placeholder\:text-white\/20::placeholder { color: rgb(255 255 255 / 0.2); }
.pt-base { padding-top: 8px; }
.pt-md { padding-top: 24px; }
.pt-sm { padding-top: 12px; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-base { padding-left: 8px; padding-right: 8px; }
.px-container-padding { padding-left: 20px; padding-right: 20px; }
.px-lg { padding-left: 40px; padding-right: 40px; }
.px-md { padding-left: 24px; padding-right: 24px; }
.px-sm { padding-left: 12px; padding-right: 12px; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-base { padding-top: 8px; padding-bottom: 8px; }
.py-sm { padding-top: 12px; padding-bottom: 12px; }
.py-xl { padding-top: 64px; padding-bottom: 64px; }
.py-xs { padding-top: 4px; padding-bottom: 4px; }
.relative { position: relative; }
.right-md { right: 24px; }
.rounded-24 { border-radius: 24px; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; margin-bottom: 0; }
.space-y-lg > :not([hidden]) ~ :not([hidden]) { margin-top: 40px; margin-bottom: 0; }
.space-y-md > :not([hidden]) ~ :not([hidden]) { margin-top: 24px; margin-bottom: 0; }
.space-y-sm > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; margin-bottom: 0; }
.space-y-xs > :not([hidden]) ~ :not([hidden]) { margin-top: 4px; margin-bottom: 0; }
.sticky { position: sticky; }
.text-\[12px\] { font-size: 12px; }
.text-\[18px\] { font-size: 18px; }
.text-\[20px\] { font-size: 20px; }
.text-body-md { font-size: 16px; line-height: 24px; font-weight: 400; }
.text-center { text-align: center; }
.text-error { color: #ba1a1a; }
.text-headline-lg { font-size: 32px; line-height: 40px; letter-spacing: -0.02em; font-weight: 800; }
.text-headline-md { font-size: 24px; line-height: 30px; font-weight: 700; }
.text-label-bold { font-size: 14px; line-height: 20px; letter-spacing: 0.05em; font-weight: 700; }
.text-on-secondary { color: #ffffff; }
.text-on-secondary-container { color: #352c8a; }
.text-on-secondary\/70 { color: rgb(255 255 255 / 0.7); }
.text-on-secondary\/80 { color: rgb(255 255 255 / 0.8); }
.text-on-surface { color: #161d1f; }
.text-on-surface-variant { color: #413996; }
.text-outline { color: #8c706f; }
.text-primary { color: #f25912; }
.text-puzzle-tile { font-size: 24px; line-height: 1; font-weight: 700; }
.text-right { text-align: right; }
.text-secondary { color: #5952af; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-white { color: #ffffff; }
.text-wildcard { color: #ff9868; }
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.tracking-\[0\.25em\] { letter-spacing: 0.25em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.transition-all { transition-property: all; transition-duration: 150ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-duration: 150ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-transform { transition-property: transform; transition-duration: 150ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.uppercase { text-transform: uppercase; }
.w-12 { width: 3rem; }
.w-full { width: 100%; }
.z-50 { z-index: 50; }
.active\:translate-y-0\.5:active { transform: translateY(0.125rem); }
.dark .dark\:bg-inverse-surface { background-color: #2b3234; }
.dark .dark\:bg-surface-dim { background-color: #d4dbdd; }
.dark .dark\:bg-white\/5 { background-color: rgb(255 255 255 / 0.05); }
.dark .dark\:hover\:bg-surface-container-high:hover { background-color: #e2e9ec; }
.dark .dark\:hover\:text-primary-fixed:hover { color: #ffdad8; }
.dark .dark\:text-primary-fixed-dim { color: #ffb3b0; }
.dark .dark\:text-secondary-fixed { color: #e3dfff; }
.dark .dark\:text-surface-variant { color: #dde4e6; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--focus-ring, #2563eb); }
.focus\:ring-4:focus { box-shadow: 0 0 0 4px var(--focus-ring, #2563eb); }
.focus\:ring-primary-container:focus { --focus-ring: #ff6b6b; }
.focus\:ring-white:focus { --focus-ring: #ffffff; }
.group:hover .group-hover\:scale-150 { transform: scale(1.5); }
.hover\:bg-on-secondary\/10:hover { background-color: rgb(255 255 255 / 0.1); }
.hover\:bg-primary:hover { background-color: #f25912; }
.hover\:bg-surface-container:hover { background-color: #e8eff1; }
.hover\:text-on-surface:hover { color: #161d1f; }
.hover\:text-primary:hover { color: #f25912; }
@media (min-width: 768px) { .md\:flex-row { flex-direction: row; } }
@media (min-width: 768px) { .md\:text-right { text-align: right; } }
@media (min-width: 768px) { .md\:w-80 { width: 20rem; } }
@media (min-width: 640px) { .sm\:flex-initial { flex: 0 1 auto; } }
@media (min-width: 640px) { .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.duration-500 { transition-duration: 500ms; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* App-specific styling and responsive overrides. */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.puzzle-tile-shadow {
    box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.05);
}
.text-wildcard {
    color: #ff9868;
}
.primary-btn-shadow {
    box-shadow: 0 4px 0 0 #413996;
}
.primary-btn-shadow:active {
    box-shadow: 0 0px 0 0 #413996;
    transform: translateY(4px);
}
div.text-puzzle-tile {
    font-size:16px;
    height:40px;
    padding:0 10px;
}
span.title-tile{
    background-color:#413996;
    width:30px;
    text-align:center;
    padding:4px 4px;
    float:left;
    line-height:1.2;
}
#advanced_options{
    margin-top:12px;
}
#letters{
    padding:14px 14px;
}
#startLetter, #endLetter, #mustInclude {
    padding:10px 10px;
}
div.search-container{
    padding-top:12px;
    padding-bottom:16px;
}
section.results{
    margin-top:14px;
}
.dict-definition {
    line-height: 1.5;
    font-size: 1rem;
}

.dict-definition-list {
    margin: 0;
    padding-left: 1.4rem;
    line-height: 1.5;
}
.dict-definition-list li {
    margin-bottom: 0.5rem;
}
.dict-tag {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 0.85em;
    background: #f7f7f7;
    color: #333;
}
.dict-pos-small {
    font-size: 0.8em;
    color: #666;
}
.dict-ref em {
    font-style: italic;
}
.dict-related-label {
    font-weight: 600;
}

/* Preserve the existing three-column filters from 408px upward. */
@media (min-width: 408px) and (max-width: 919px) {
    .grid-cols-1.sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .flex-1.sm\:flex-initial {
        flex: 0 1 auto;
    }
}

/* Restore md breakpoint styles at 920px and above */
@media (min-width: 920px) {
    main.md\:flex-row {
        flex-direction: row;
    }

    .w-full.md\:w-80 {
        width: 20rem;
    }
}

/* Footer information dialogs. Native dialog handles focus and the backdrop. */
.info-dialog {
    margin: auto;
    padding: 0;
    width: min(36rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    border: none;
    border-radius: 24px;
    color: #161d1f;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
.info-dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.info-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #a798fd;
    color: #352c8a;
}
.info-dialog-header h2 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}
.info-dialog-header button { flex-shrink: 0; min-width: 44px; min-height: 44px; border-radius: 8px; }
.info-dialog-header button:hover { background: rgb(255 255 255 / 0.3); }
.info-dialog-body { padding: 24px; line-height: 1.6; }
.info-dialog-body p + p { margin-top: 16px; }
.info-dialog-body a { color: #413996; text-decoration: underline; text-underline-offset: 3px; }
.info-dialog :focus-visible { outline: 2px solid #413996; outline-offset: 3px; }
html:has(.info-dialog[open]) { overflow: hidden; }
