html[data-text-size="large"] {
  font-size: 125%;
}

.haw-settings-trigger,
.haw-settings-panel,
.haw-settings-panel *,
.haw-settings-panel *::before,
.haw-settings-panel *::after {
  box-sizing: border-box;
}

.haw-settings-trigger,
.haw-settings-close,
.haw-settings-choice {
  min-height: 44px;
  border: 0;
  font-family: 'Zen Kaku Gothic New', system-ui, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.haw-settings-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 60px;
  padding: 9px 14px;
  border: 1px solid rgba(43, 58, 43, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #2c4b27;
  box-shadow: 0 2px 12px rgba(122, 168, 107, 0.16);
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
}

.haw-settings-trigger:hover,
.haw-settings-close:hover {
  background: #e8f0dd;
}

.haw-settings-trigger--mobile {
  width: 100%;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 6px;
  border-width: 1px 0 0;
  border-color: rgba(43, 58, 43, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #17130f;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.haw-settings-trigger--mobile:hover {
  background: transparent;
  color: #4f7a35;
}

.haw-settings-trigger--desktop {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #6b4a32;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.haw-settings-trigger--desktop:hover {
  background: transparent;
  color: #2c4b27;
}

.haw-header-actions,
.haw-news-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.haw-news-nav {
  justify-content: space-between;
  margin-bottom: 32px;
}

.haw-news-nav > a {
  margin-bottom: 0 !important;
}

.haw-settings-panel[hidden] {
  display: none !important;
}

.haw-settings-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 140;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(43, 58, 43, 0.18);
  border-radius: 22px;
  background: #fff;
  color: #2c241c;
  box-shadow: 0 24px 70px rgba(31, 42, 31, 0.3);
  font-family: 'Zen Kaku Gothic New', system-ui, sans-serif;
  line-height: 1.5;
  transform: translate(-50%, -50%);
}

.haw-settings-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.haw-settings-panel__title {
  margin: 0;
  color: #17130f;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.4;
}

.haw-settings-close {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4f1e4;
  color: #6b4a32;
  font-size: 0.8125rem;
}

.haw-settings-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.haw-settings-field + .haw-settings-field {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(43, 58, 43, 0.12);
}

.haw-settings-field__label {
  display: block;
  width: 100%;
  margin: 0 0 9px;
  padding: 0;
  color: #6b4a32;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
}

.haw-settings-choices {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: #f4f1e4;
}

.haw-settings-choice {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  color: #6b4a32;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
}

.haw-settings-choice:hover {
  background: #e8f0dd;
}

.haw-settings-choice[aria-pressed="true"] {
  background: #b8d4a8;
  color: #2c4b27;
  box-shadow: 0 1px 4px rgba(43, 58, 43, 0.14);
}

.haw-settings-trigger:focus-visible,
.haw-settings-close:focus-visible,
.haw-settings-choice:focus-visible,
.haw-settings-panel:focus-visible {
  outline: 3px solid #2c7a92;
  outline-offset: 3px;
}

.haw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

html[data-text-size="large"] body {
  overflow-wrap: break-word;
}

html[data-text-size="large"] :where(main, section, article, form, dl, ul, ol, div) {
  min-width: 0;
}

html[data-text-size="large"] :where(dd, .press-text, .contact-box, [data-hp="email"]) {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .haw-settings-panel {
    padding: 18px;
  }

  .haw-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .haw-header-actions .haw-settings-trigger {
    width: 100%;
  }
}
