/*
Theme Name: OKINIKI
Theme URI: https://okiniki.jp/
Author: OKINIKI
Description: Mobile-first decision support theme for the OKINIKI travel service.
Version: 0.2.2
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: okiniki
*/

:root {
  color-scheme: light;
  --ink: #15272b;
  --muted: #5f6d6f;
  --paper: #f7f8f5;
  --white: #ffffff;
  --sea: #087f8c;
  --sea-dark: #075e67;
  --coral: #e85f4f;
  --sun: #f2c14e;
  --leaf: #34785a;
  --line: #d9e0de;
  --soft-blue: #e7f4f5;
  --soft-coral: #fff0ec;
  --shadow: 0 12px 32px rgba(21, 39, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

.admin-bar .site-header--hero {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header--hero {
    top: 46px;
  }
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible + span {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.site-header {
  height: 72px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.site-header--hero {
  position: absolute;
  inset: 0 0 auto;
  color: var(--white);
}

.site-header--light {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}

.brand__word {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.brand__reading {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.site-header--hero .brand__word > span {
  color: var(--sun);
}

.brand--dark .brand__word > span {
  color: var(--coral);
}

.brand--dark {
  color: var(--ink);
  justify-self: center;
}

.prototype-label,
.step-label {
  justify-self: end;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.prototype-label {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.step-label {
  color: var(--muted);
}

.hero {
  position: relative;
  height: clamp(560px, 84svh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #1f6f7b url("assets/okinawa-rain-hero.png") center center / cover no-repeat;
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 40, 49, 0.42);
}

.hero__content {
  position: relative;
  width: min(100% - 40px, 1040px);
  margin: 0 auto;
  padding: 96px 0 34px;
}

.hero__eyebrow,
.section-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.hero__eyebrow {
  color: #dcf9f7;
}

.hero h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1;
  font-weight: 900;
}

h1:focus {
  outline: none;
}

.hero__brand-word {
  display: block;
}

.hero__brand-word > span {
  color: var(--sun);
}

.hero__brand-reading {
  display: block;
  margin-top: 9px;
  color: #dcf9f7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.hero__copy {
  margin: 18px 0 26px;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 700;
}

.hero__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 12px;
}

.primary-action,
.secondary-action,
.submit-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.primary-action,
.secondary-action {
  min-height: 76px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  border-radius: 6px;
}

.primary-action {
  background: var(--coral);
  color: var(--white);
}

.secondary-action {
  background: var(--white);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover,
.submit-button:hover {
  filter: brightness(0.96);
}

.primary-action small,
.secondary-action small {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
}

.hero__notice {
  margin: 12px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
}

.promise-band {
  padding: 72px 0 82px;
  background: var(--paper);
}

.section-kicker {
  color: var(--sea-dark);
}

.promise-band h2,
.search-intro h1,
.results-summary h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.3;
}

.brand-story-heading {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(320px, 1.2fr);
  align-items: end;
  gap: 64px;
}

.brand-story-heading__lead {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
}

.brand-story-heading__lead strong {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 13px;
}

.promise-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.promise-grid article {
  padding: 24px 28px 8px 0;
  border-right: 1px solid var(--line);
}

.promise-grid article + article {
  padding-left: 28px;
}

.promise-grid article:last-child {
  border-right: 0;
}

.promise-grid span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.promise-grid h3 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.promise-grid p,
.search-intro p,
.ranking-note p {
  margin: 0;
  color: var(--muted);
}

.text-button {
  justify-self: start;
  padding: 8px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--sea-dark);
  font-size: 14px;
  font-weight: 800;
}

.search-layout {
  padding-top: 54px;
  padding-bottom: 100px;
}

.search-intro {
  max-width: 680px;
  margin-bottom: 50px;
}

.search-intro p:last-child {
  margin-top: 12px;
}

.condition-form {
  max-width: 760px;
}

.condition-form fieldset {
  margin: 0;
  padding: 30px 0 34px;
  border: 0;
  border-top: 1px solid var(--line);
}

.condition-form legend {
  width: 100%;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 800;
}

.condition-form legend span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
}

.segmented-control,
.choice-grid {
  display: grid;
  gap: 8px;
}

.segmented-control {
  grid-template-columns: repeat(2, 1fr);
}

.segmented-control--three {
  grid-template-columns: repeat(3, 1fr);
}

.choice-grid {
  grid-template-columns: repeat(3, 1fr);
}

.segmented-control label,
.choice-grid label {
  min-width: 0;
}

.segmented-control input,
.choice-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span,
.choice-grid span {
  min-height: 52px;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.segmented-control input:checked + span,
.choice-grid input:checked + span {
  border-color: var(--sea);
  background: var(--soft-blue);
  box-shadow: inset 0 0 0 1px var(--sea);
  color: var(--sea-dark);
}

.form-submit-bar {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.form-submit-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.submit-button {
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 6px;
  background: var(--coral);
  color: var(--white);
}

.results-summary {
  padding: 40px 0 30px;
  background: var(--soft-blue);
  border-bottom: 1px solid #c9e2e4;
}

.results-summary__inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.filter-summary {
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid #b7d5d8;
  border-radius: 6px;
  background: var(--white);
  color: var(--sea-dark);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.results-content {
  padding-top: 32px;
  padding-bottom: 84px;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 1fr);
  align-items: start;
  gap: 28px;
}

.results-list {
  display: grid;
  gap: 14px;
}

.result-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 5px 16px rgba(21, 39, 43, 0.06);
}

.result-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  border-right: 1px solid var(--line);
}

.result-rank span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.result-rank strong {
  font-size: 30px;
  line-height: 1.2;
}

.result-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-card h2 {
  margin: 3px 0 4px;
  font-size: 21px;
  line-height: 1.35;
}

.result-card__summary {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.score-badge {
  flex: 0 0 auto;
  min-width: 62px;
  padding: 8px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.score-badge strong,
.score-badge span {
  display: block;
  line-height: 1.1;
}

.score-badge strong {
  font-size: 20px;
}

.score-badge span {
  margin-top: 4px;
  font-size: 9px;
}

.tag-row,
.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row {
  margin: 14px 0;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.tag {
  background: #eef1ef;
  color: #445356;
}

.tag--demo {
  background: var(--soft-coral);
  color: #9c3b31;
}

.tag--verified {
  color: #134e3a;
  background: #e1f3ea;
  border-color: #99cdb6;
}

.status-pill--good {
  background: #e4f3ea;
  color: #226344;
}

.status-pill--caution {
  background: #fff3d7;
  color: #7c5810;
}

.status-pill--neutral {
  background: var(--soft-blue);
  color: var(--sea-dark);
}

.status-pill--muted {
  background: #eceeee;
  color: #626b6d;
}

.reason-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  color: var(--sea-dark);
  font-size: 13px;
  font-weight: 700;
}

.reason-list li::before {
  content: "✓";
  margin-right: 5px;
  color: var(--leaf);
}

.result-card__bottom {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-card__bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-button {
  padding: 9px 14px;
  border: 1px solid var(--sea);
  border-radius: 5px;
  background: var(--white);
  color: var(--sea-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ranking-note {
  padding: 18px 0 18px 20px;
  border-left: 3px solid var(--sun);
  font-size: 13px;
}

.ranking-note strong {
  display: block;
  margin-bottom: 6px;
}

.empty-state {
  padding: 42px 24px;
  border: 1px solid var(--line);
  background: var(--white);
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
}

.companion-label {
  margin: 0 0 7px;
  color: var(--sea-dark);
  font-size: 11px;
  font-weight: 900;
}

.companion-note {
  margin: 0 0 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--sun);
  background: #fff9e9;
}

.companion-note p:last-child {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

dialog {
  border: 0;
  padding: 0;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(9, 27, 31, 0.7);
}

.spot-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(88svh, 860px);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.spot-detail__header {
  position: sticky;
  top: 0;
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}

.spot-detail__header h2 {
  margin: 4px 0 0;
  font-size: 25px;
  line-height: 1.3;
}

.dialog-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.spot-detail__body {
  padding: 24px;
}

.detail-lead {
  margin: 0 0 22px;
  font-size: 17px;
  font-weight: 700;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}

.fact-grid div {
  padding: 13px;
  background: var(--white);
}

.fact-grid dt {
  color: var(--muted);
  font-size: 11px;
}

.fact-grid dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.detail-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.detail-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.caution-box {
  padding: 14px 16px;
  border-left: 3px solid var(--coral);
  background: var(--soft-coral);
}

.booking-list {
  display: grid;
  gap: 10px;
}

.booking-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.booking-item__top,
.booking-item__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.booking-item h4 {
  margin: 0;
  font-size: 15px;
}

.booking-item__provider {
  margin: 2px 0 10px !important;
  font-size: 12px !important;
}

.booking-item__footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.booking-link {
  display: inline-block;
  padding: 9px 13px;
  border-radius: 5px;
  background: var(--sea-dark);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.freshness-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}

.simple-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.simple-dialog .dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.simple-dialog h2 {
  margin: 0 0 12px;
  font-size: 27px;
}

.simple-dialog p:not(.section-kicker) {
  color: var(--muted);
}

.simple-dialog .submit-button {
  width: 100%;
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 440px);
  padding: 13px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  z-index: 30;
}

.site-footer {
  min-height: 72px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: #dbe4e4;
  font-size: 11px;
  font-weight: 800;
}

.site-footer a {
  color: var(--white);
}

.site-footer small {
  margin-left: 8px;
  color: #aebcbd;
  font-weight: 600;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 32px, 1040px);
  }

  .site-header {
    height: 64px;
    padding: 0 16px;
  }

  .brand__word {
    font-size: 19px;
  }

  .brand__reading {
    display: none;
  }

  .hero {
    height: max(590px, 86svh);
    max-height: 720px;
    background-position: 62% center;
  }

  .hero__content {
    width: min(100% - 32px, 1040px);
    padding-bottom: 24px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero__copy {
    margin: 14px 0 22px;
    font-size: 18px;
  }

  .hero__actions {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .primary-action,
  .secondary-action {
    min-height: 68px;
  }

  .promise-band {
    padding: 54px 0 62px;
  }

  .promise-band h2,
  .search-intro h1,
  .results-summary h1 {
    font-size: 28px;
  }

  .brand-story-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
  }

  .promise-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .promise-grid article,
  .promise-grid article + article {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .search-layout {
    padding-top: 36px;
    padding-bottom: 72px;
  }

  .search-intro {
    margin-bottom: 34px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-button {
    width: 100%;
  }

  .results-summary {
    padding: 28px 0 22px;
  }

  .results-summary__inner {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .filter-summary {
    max-width: none;
    width: 100%;
  }

  .results-content {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .result-card {
    grid-template-columns: 48px 1fr;
    gap: 13px;
    padding: 17px 15px;
  }

  .result-rank {
    justify-content: flex-start;
    padding-top: 4px;
  }

  .result-rank strong {
    font-size: 24px;
  }

  .result-card__top {
    gap: 10px;
  }

  .result-card h2 {
    font-size: 18px;
  }

  .score-badge {
    min-width: 54px;
  }

  .result-card__bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-button {
    width: 100%;
  }

  .ranking-note {
    margin-top: 8px;
  }

  .spot-dialog {
    width: 100%;
    max-width: none;
    max-height: 94svh;
    margin: auto 0 0;
    border-radius: 8px 8px 0 0;
  }

  .spot-detail__header,
  .spot-detail__body {
    padding: 18px 16px;
  }

  .spot-detail__header h2 {
    font-size: 21px;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .booking-item__top,
  .booking-item__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .booking-link {
    text-align: center;
  }

  .site-footer {
    align-items: flex-start;
  }

  .site-footer small {
    display: block;
    margin: 2px 0 0;
  }
}

@media (max-width: 390px) {
  .segmented-control--three {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-header .step-label {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
