.home-dictionary-banner {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 260px; margin: var(--nav-height) 0 0; padding: 36px 24px; overflow: hidden;
  background-color: #142b40;
  background-image: url('/img/header-grain.svg'), radial-gradient(ellipse at 10% 15%, rgb(49 112 131 / 40%), transparent 55%), radial-gradient(ellipse at 95% 85%, rgb(41 114 107 / 35%), transparent 50%), linear-gradient(115deg, #142b40, #18424b);
  background-size: 128px 128px, 100% 100%, 100% 100%, 100% 100%; text-align: center;
}
.home-dictionary-banner::before {
  content: ''; position: absolute; z-index: -1; inset: 0; opacity: .3; pointer-events: none;
  background-image: linear-gradient(rgb(209 236 241 / 45%) 1px, transparent 1px), linear-gradient(90deg, rgb(209 236 241 / 45%) 1px, transparent 1px), linear-gradient(rgb(209 236 241 / 10%) 1px, transparent 1px), linear-gradient(90deg, rgb(209 236 241 / 10%) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px, 11px 11px, 11px 11px;
  -webkit-mask-image: linear-gradient(90deg, #000, rgb(0 0 0 / 30%) 38%, rgb(0 0 0 / 30%) 62%, #000);
  mask-image: linear-gradient(90deg, #000, rgb(0 0 0 / 30%) 38%, rgb(0 0 0 / 30%) 62%, #000);
}
.home-dictionary-banner::after {
  content: ''; position: absolute; z-index: -1; top: 0; left: 0; width: 44px; height: 44px;
  background: rgb(0 0 0 / 16%); pointer-events: none;
  box-shadow: 44px 0 rgb(0 0 0 / 16%), 0 44px rgb(0 0 0 / 16%), 132px 132px rgb(0 0 0 / 16%), 88px 176px rgb(0 0 0 / 16%), 176px 220px rgb(193 228 223 / 7%), 220px 44px rgb(193 228 223 / 6%), calc(100vw - 44px) 88px rgb(0 0 0 / 16%), calc(100vw - 88px) 88px rgb(0 0 0 / 16%), calc(100vw - 88px) 132px rgb(0 0 0 / 16%), calc(100vw - 176px) 0 rgb(193 228 223 / 7%), calc(100vw - 220px) 176px rgb(0 0 0 / 16%), calc(100vw - 264px) 220px rgb(0 0 0 / 16%);
}
.page-wrap.home-page { padding-top: 61px; }
.home-dictionary-banner h1 { margin: 0; color: #fff !important; font-size: clamp(22px, 3.4vw, 44px); font-weight: 800; line-height: 1.3; letter-spacing: .045em; text-transform: uppercase; text-shadow: 0 2px 2px rgb(0 0 0 / 12%); }
.home-dictionary-banner h1::after { content: ''; display: block; width: 120px; height: 2px; margin: 14px auto 12px; background: rgb(255 255 255 / 80%); }
.home-dictionary-banner p { margin: 0; color: #e0edf1; font-size: 15px; line-height: 1.6; letter-spacing: .12em; }
.home-dictionary-added { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-bottom: 12px; padding: 6px 12px; border: 1px solid rgb(255 255 255 / 20%); border-radius: 999px; background: rgb(255 255 255 / 8%); color: #e7f3ee; font-size: 12px; line-height: 1.5; }
.home-dictionary-added::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #a8ddc2; }
.home-dictionary-added[hidden] { display: none !important; }
.home-pattern-help { margin: 0 0 20px; padding: 24px; border: 1px solid var(--border-normal); border-radius: 16px; background: var(--bg-card); }
.home-pattern-help h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; line-height: 1.4; }
.home-pattern-help p { margin: 0 0 8px; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.home-pattern-help .home-pattern-hint { color: var(--text-muted); font-size: 13px; }
.home-pattern-form { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; }
.home-pattern-field { flex: 1; min-width: 0; }
.home-pattern-field label { display: block; margin-bottom: 6px; color: var(--text-primary); font-size: 13px; font-weight: 500; }
.home-pattern-field input { display: block; width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid var(--border-normal) !important; border-radius: 8px !important; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.home-pattern-form button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 16px; border: 1px solid #000 !important; border-radius: 8px !important; background: #000; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.home-pattern-form button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.home-pattern-form button:hover { background: #252525; }
.home-pattern-form :is(button, input):focus-visible { outline: 2px solid #00867f; outline-offset: 3px; }
.home-page .clues-hero h2 { margin: 0 0 4px; color: var(--text-primary); font-size: .88rem; font-weight: 700; line-height: 1.35; }
.home-page .sidebar-activity-card { padding: 18px 16px; margin: 0; border: 1px solid var(--border-normal); border-radius: 16px; background: var(--bg-card); }
.home-page .sidebar-activity-card .sidebar-recent-header h2 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 700; }
.sidebar-recent-icon.sidebar-activity-icon { background: #edf3fb; color: #5c7da4; }
.home-page .sidebar-activity-card > p { margin: 13px 0 16px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.home-page .sidebar-activity-card .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.home-page .sidebar-activity-card .hero-stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 60px; padding: 9px 10px; border: 1px solid var(--border-normal); background: var(--bg-secondary); text-align: left; }
.home-page .sidebar-activity-card .hero-stat:nth-child(2) { background: #fff8eb; border-color: #f0dfbc; }
.home-page .sidebar-activity-card .hero-stat:nth-child(3) { background: #eff8f1; border-color: #d5e8d9; }
.home-page .sidebar-activity-card .hero-stat:nth-child(4) { background: #f0f5ff; border-color: #d9e4f7; }
.home-page .sidebar-activity-card .hero-stat-val { font-size: 14px; font-weight: 700; line-height: 1.2; }
.home-page .sidebar-activity-card .hero-stat-lbl { margin-top: 3px; font-size: 10px; font-weight: 500; line-height: 1.4; }
.home-page .sidebar-activity-card .hero-stat { flex-direction: row; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 8px 4px; gap: 5px; }
.home-page .sidebar-activity-card .hero-stat-symbol { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--text-secondary); }
.home-page .sidebar-activity-card .hero-stat:nth-child(2) .hero-stat-symbol { color: #b47a20; }
.home-page .sidebar-activity-card .hero-stat:nth-child(3) .hero-stat-symbol { color: #278355; }
.home-page .sidebar-activity-card .hero-stat:nth-child(4) .hero-stat-symbol { color: #4d76bc; }
.home-page .sidebar-activity-card .hero-stat-lbl { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.home-mini-crossword { padding: 20px; margin: 0 0 24px; border: 1px solid var(--border-normal); border-radius: 16px; background: var(--bg-card); }
.home-page .home-ranking-invite { padding: 22px; border: 1px solid var(--border-normal); border-radius: 16px; background: var(--bg-card); }
.home-page .home-community-panel { padding: 0; border: 1px solid var(--border-normal); border-radius: 16px; background: var(--bg-card); overflow: hidden; }
.home-page .home-community-panel .sidebar-activity-card { border: 0; border-radius: 0; background: transparent; }
.home-page .home-community-panel .home-ranking-invite { margin: 0 16px; padding: 20px 0 18px; border: 0; border-top: 1px solid var(--border-subtle); border-radius: 0; background: transparent; }
.home-ranking-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 13px; color: #a76b18; background: #faf0dd; }
.home-ranking-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.home-ranking-heading .home-ranking-icon { flex: 0 0 40px; width: 40px; height: 40px; margin: 0; border-radius: 12px; }
.home-ranking-invite .home-ranking-heading h2 { min-width: 0; margin: 0; font-size: 16px; }
.home-ranking-invite svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-ranking-invite h2 { margin: 0 0 9px; color: var(--text-primary); font-size: 18px; font-weight: 700; line-height: 1.4; }
.home-ranking-invite p { margin: 0 0 20px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.home-ranking-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 11px 14px; border-radius: 9px; background: #182126; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; transition: background-color 150ms ease; }
.home-ranking-link svg { width: 18px; height: 18px; transition: transform 150ms ease; }
.home-ranking-link:hover { background: #2c3941; color: #fff; }
.home-ranking-link:hover svg { transform: translateX(3px); }
.home-ranking-link:active { background: #061c10; }
.home-ranking-link:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .home-ranking-link, .home-ranking-link svg { transition: none; } }
.home-activity-panel { margin-bottom: 24px; border: 1px solid var(--border-normal); border-radius: 16px; background: var(--bg-card); overflow: hidden; }
.home-activity-panel .activity-section-title { margin: 0; border: 0; border-bottom: 1px solid var(--border-subtle); border-radius: 0; background: transparent; }
.home-activity-panel #all-cards-list { padding: 12px 18px; }
.home-activity-panel #all-cards-list > .clue-card { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--border-subtle); border-radius: 0; background: transparent; box-shadow: none; }
.home-activity-panel #all-cards-list > .clue-card:last-child { border-bottom: 0; }
.home-activity-panel #all-cards-list > .clue-card:hover { background: var(--bg-secondary); }
.home-activity-panel #all-cards-list > .clue-card:active { transform: none; }
.home-activity-panel #all-cards-list > .clue-card { position: relative; padding: 22px 8px; transition: background-color 160ms ease; }
.home-activity-panel .clue-card-top { align-items: flex-start; gap: 12px; margin-bottom: 9px; }
.home-activity-panel .clue-question { font-size: 16px; font-weight: 700; line-height: 1.5; }
.home-activity-panel .clue-length-badge { flex-shrink: 0; padding: 5px 9px; border: 1px solid var(--border-normal); border-radius: 7px; background: transparent; color: var(--text-secondary); font-size: 12px; }
.home-activity-panel .clue-pattern { display: inline-block; max-width: 100%; margin: 0 0 12px; padding: 5px 9px; border-radius: 5px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.home-activity-panel .clue-pattern strong { color: var(--text-primary); letter-spacing: 1px; }
.home-activity-panel .clue-card-summary { align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 0; border-top: 0; }
.home-activity-panel .clue-author { font-size: 12px; }
.home-activity-panel .clue-author strong { color: var(--text-secondary); font-weight: 500; }
.home-activity-panel .clue-card-stats { flex-wrap: wrap; gap: 10px; }
.home-activity-panel .clue-stat { font-size: 12px; }
.home-activity-panel .clue-card-summary .clue-tag { padding: 4px 9px; font-size: 11px; }
@media (max-width: 600px) {
  .home-activity-panel .clue-card-top { flex-wrap: wrap; gap: 7px; }
  .home-activity-panel .clue-card-title-wrap { flex-basis: 100%; }
  .home-activity-panel .clue-question { font-size: 15px; }
  .home-activity-panel .clue-card-summary { flex-direction: column; align-items: flex-start; }
  .home-activity-panel .clue-card-stats { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .home-activity-panel #all-cards-list > .clue-card { transition: none; } }
@media (max-width: 600px) { .home-activity-panel #all-cards-list { padding: 10px 12px; } }
.home-popular-searches { margin: 24px 0; padding: 0 2px; }
.home-popular-searches h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: var(--text-primary); font-size: 18px; font-weight: 600; line-height: 1.4; }
.home-popular-searches svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-popular-searches h2 svg { width: 21px; height: 21px; color: var(--accent-blue); }
.home-popular-searches ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.home-popular-searches li { min-width: 0; }
.home-popular-searches a { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; padding: 5px 8px; border-radius: 6px; color: var(--text-secondary); font-size: 15px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; transition: color 150ms ease, background-color 150ms ease; }
.home-popular-searches a > svg:first-child { opacity: .6; }
.home-popular-searches a > span { font-weight: 600; }
.home-popular-searches .home-search-arrow { width: 14px; height: 14px; opacity: 0; transform: translateX(-4px); transition: opacity 150ms ease, transform 150ms ease; }
.home-popular-searches a:hover, .home-popular-searches a:focus-visible { color: var(--accent-blue); background: var(--bg-secondary); }
.home-popular-searches a:hover .home-search-arrow, .home-popular-searches a:focus-visible .home-search-arrow { opacity: 1; transform: translateX(0); }
.home-popular-searches a:active { background: var(--border-normal); }
.home-popular-searches a:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 4px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .home-popular-searches a, .home-popular-searches .home-search-arrow { transition: none; } }
.home-mini-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 18px; }
.home-mini-heading h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.4; }
.home-mini-heading > span { color: var(--text-secondary); font-size: 12px; }
.home-mini-crossword .mc-play-area { padding: 0; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.home-mini-crossword .mc-play-area .mc-toolbar { margin-inline: 0; }
.home-mini-crossword .mc-clues { padding-left: 14px; }
.home-mini-crossword .mc-clue-group [data-entry] { font-size: 13px; line-height: 1.5; }
.home-mini-crossword .mc-current-clue > div > span { font-size: 13px; }
.home-mini-crossword .mc-shortcuts { font-size: 11px; }
@media (min-width: 681px) and (max-width: 1100px) {
  .home-mini-crossword .mc-play-area { grid-template-columns: minmax(0, 1fr); }
  .home-mini-crossword .mc-clues { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--border-normal); }
  .home-mini-crossword .mc-clue-group + .mc-clue-group { margin: 0; padding: 0; border-top: 0; }
}
@media (max-width: 680px) {
  .home-mini-crossword { padding: 16px 10px; }
  .home-mini-heading { padding: 0 4px; }
  .home-mini-crossword .mc-clues { padding-left: 0; }
}
@media (max-width: 600px) {
  .home-dictionary-banner { min-height: 190px; padding: 28px 14px; }
  .home-dictionary-banner h1 { font-size: clamp(18px, 4.9vw, 28px); letter-spacing: .015em; }
  .home-dictionary-banner p { max-width: 300px; font-size: 12px; letter-spacing: .06em; }
  .home-pattern-help { padding: 20px 16px; }
  .home-pattern-form { gap: 8px; }
  .home-pattern-form button { padding: 0 12px; }
}
