@font-face {
  font-display: swap;
  font-family: "Owl Title Rounded";
  font-style: normal;
  font-weight: 700;
  src: url("/assets/fonts/owl-title-rounded.woff") format("woff");
  unicode-range: U+306E, U+689F;
}

:root {
  color-scheme: light;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #14285f;
  --ink-soft: #53617d;
  --muted: #7c8290;
  --coral: #ff5a52;
  --coral-dark: #e54843;
  --owl-brown: #9a5b36;
  --sky: #8fd8fa;
  --sky-strong: #4eaee8;
  --leaf: #9acb3d;
  --sun: #ffc83d;
  --peach: #ffe7c7;
  --line: #eadfce;
  --line-soft: #f2eadf;
  --shadow: 0 14px 34px rgba(20, 40, 95, 0.1);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --font-ui: "Avenir Next", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: #e9f6fb;
  min-height: 100%;
}

body {
  background: #e9f6fb;
  color: var(--ink);
  font-family: var(--font-ui);
  margin: 0;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible,
.mode-option:has(input:focus-visible) {
  outline: 3px solid rgba(78, 174, 232, 0.52);
  outline-offset: 3px;
}

.app-shell {
  background: var(--paper);
  box-shadow: 0 0 50px rgba(20, 40, 95, 0.14);
  margin: 0 auto;
  max-width: 520px;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
  position: relative;
}

.app-shell[data-flow="true"] {
  padding-bottom: env(safe-area-inset-bottom);
}

.app-header {
  align-items: center;
  background: rgba(255, 253, 248, 0.96);
  display: flex;
  height: 68px;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 20px 8px;
  position: relative;
  z-index: 20;
}

.brand {
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 0;
}

.brand-name {
  align-items: baseline;
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.brand-name small {
  color: var(--owl-brown);
  font-family: "Owl Title Rounded", ui-rounded, "Hiragino Maru Gothic ProN", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1;
  transform: rotate(-2deg) translateY(-0.5px);
  transform-origin: right bottom;
}
.brand-name strong { font-size: 21px; font-weight: 900; letter-spacing: -0.045em; }

.brand-mark {
  color: var(--coral);
  display: block;
  flex: 0 0 auto;
  height: 42px;
  transform: rotate(2deg);
  width: 42px;
}

.brand-mark svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.brand-mark__body {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
}

.brand-mark__eye,
.brand-mark__pupil,
.brand-mark__beak {
  fill: currentColor;
}

.brand-mark__eye-light { fill: var(--paper); }

.app-main {
  min-height: calc(100dvh - 68px);
}

.screen[hidden] { display: none; }

.travel-scene,
.result-scene,
.progress-scene {
  background: var(--sky);
  overflow: hidden;
  position: relative;
}

.travel-scene {
  height: clamp(278px, 72vw, 350px);
}

.travel-scene__image,
.result-scene > img,
.progress-scene > img {
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
  width: 100%;
}

.travel-scene::after,
.result-scene::after,
.progress-scene::after {
  border: 1px solid rgba(20, 40, 95, 0.08);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.owl-traveler {
  animation: travel-path 10s ease-in-out infinite alternate;
  bottom: 2%;
  height: 116px;
  left: 2%;
  position: absolute;
  width: 87px;
  z-index: 3;
}

.owl-sprite {
  animation: owl-cycle 900ms linear infinite;
  background-image: url("/assets/owl-travel.png");
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  display: block;
  height: 100%;
  image-rendering: pixelated;
  width: 100%;
}

.pixel-leaf,
.pixel-spark {
  position: absolute;
  z-index: 4;
}

.pixel-leaf {
  animation: leaf-drift 5s ease-in-out infinite;
  background: var(--leaf);
  box-shadow: 4px 4px 0 #65a431;
  height: 8px;
  transform: rotate(35deg);
  width: 13px;
}

.pixel-leaf--one { left: 20%; top: 20%; }
.pixel-leaf--two { animation-delay: -2.6s; left: 72%; top: 14%; }

.pixel-spark {
  animation: spark 2.2s steps(2, end) infinite;
  background: var(--sun);
  box-shadow: 0 -5px 0 var(--sun), 0 5px 0 var(--sun), -5px 0 0 var(--sun), 5px 0 0 var(--sun);
  height: 4px;
  right: 13%;
  top: 24%;
  width: 4px;
}

.home-content {
  padding: 22px 20px 10px;
}

.daily-message {
  margin: 0 auto 18px;
  max-width: 430px;
  position: relative;
  text-align: center;
}

.daily-message h1 {
  font-size: clamp(27px, 7vw, 34px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.25;
  margin: 0;
}

.daily-message p {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  margin: 7px 0 0;
}

.spark-cluster {
  color: var(--sun);
  font-size: 20px;
  left: 4px;
  position: absolute;
  top: 3px;
}

.primary-action,
.secondary-action {
  align-items: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  font-size: 17px;
  font-weight: 800;
  justify-content: center;
  min-height: 58px;
  padding: 14px 18px;
  width: 100%;
}

.primary-action {
  background: var(--coral);
  border: 2px solid var(--coral);
  box-shadow: 0 6px 0 #c93b38;
  color: white;
  gap: 10px;
}

.primary-action:hover { background: #ff6b64; }
.primary-action:active { box-shadow: 0 2px 0 #c93b38; transform: translateY(4px); }
.primary-action:disabled { cursor: not-allowed; opacity: 0.6; }
.primary-action[data-loading="true"]:disabled { cursor: wait; }

.primary-action svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 24px;
}

.secondary-action {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
  margin-top: 14px;
}

.journey-summary {
  margin-top: 28px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.section-heading h2 {
  font-size: 19px;
  font-weight: 850;
  margin: 0;
  white-space: nowrap;
}

.section-heading__flag {
  background: var(--coral);
  border-radius: 1px;
  height: 12px;
  margin-left: 3px;
  position: relative;
  width: 16px;
}

.section-heading__flag::before {
  background: var(--ink);
  content: "";
  height: 20px;
  left: -3px;
  position: absolute;
  top: -4px;
  width: 3px;
}

.dotted-route {
  border-top: 3px dotted var(--line);
  flex: 1;
  min-width: 28px;
}

.route-plane {
  fill: var(--sky-strong);
  height: 22px;
  stroke: var(--sky-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 30px;
}

.journey-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 2px dotted var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 62px minmax(0, 1fr) 20px;
  min-height: 104px;
  padding: 14px 2px;
  text-align: left;
  width: 100%;
}

.journey-row:last-child { border-bottom: 0; }

.journey-icon {
  align-items: center;
  border-radius: 50%;
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.journey-icon--sky { background: #d9f2fd; }
.journey-icon--sun { background: #fff2c6; }
.journey-icon--peach { background: var(--peach); }

.journey-icon svg {
  fill: none;
  height: 33px;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 33px;
}

.journey-copy {
  display: block;
  min-width: 0;
}

.journey-copy small,
.journey-copy span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.journey-copy strong {
  display: block;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
  margin: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  fill: none;
  height: 20px;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 20px;
}

.mini-progress {
  background: #e7e9ec;
  border-radius: 999px;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  width: 100%;
}

.mini-progress i {
  background: var(--leaf);
  display: block;
  height: 100%;
  transition: width 600ms ease;
  width: 0;
}

.color-dots {
  display: flex !important;
  gap: 7px;
  margin-top: 8px;
}

.color-dots i {
  border-radius: 50%;
  display: block;
  height: 17px;
  width: 17px;
}

.color-dots i:nth-child(1) { background: var(--coral); }
.color-dots i:nth-child(2) { background: #f5a43b; }
.color-dots i:nth-child(3) { background: var(--sun); }
.color-dots i:nth-child(4) { background: var(--leaf); }
.color-dots i:nth-child(5) { border: 2px dashed #9ca1aa; }

.bottom-nav {
  align-items: stretch;
  background: rgba(255, 253, 248, 0.97);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  left: 50%;
  max-width: 520px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 30;
}

.bottom-nav[hidden] { display: none; }

.bottom-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 750;
  gap: 2px;
  justify-content: center;
  min-height: 58px;
  position: relative;
}

.bottom-nav button::before {
  background: transparent;
  border-radius: 0 0 5px 5px;
  content: "";
  height: 4px;
  left: 18%;
  position: absolute;
  right: 18%;
  top: -6px;
}

.bottom-nav button[aria-current="page"] {
  color: var(--coral);
}

.bottom-nav button[aria-current="page"]::before {
  background: var(--coral);
}

.bottom-nav svg {
  fill: none;
  height: 27px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 27px;
}

.flow-screen,
.result-screen {
  background: var(--paper);
  min-height: 100dvh;
}

.flow-header {
  align-items: center;
  background: var(--paper);
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  min-height: 64px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  position: relative;
  z-index: 5;
}

.flow-header h1 {
  font-size: 19px;
  font-weight: 850;
  margin: 0;
  text-align: center;
}

.flow-header__spacer { display: block; }

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.icon-button svg {
  fill: none;
  height: 26px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 26px;
}

.flow-content {
  padding: 22px 20px 38px;
}

.flow-intro {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin: 3px 0 26px;
}

.flow-number {
  align-items: center;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 10px;
  display: flex;
  flex: 0 0 44px;
  font-size: 13px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
}

.flow-intro h2 {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.35;
  margin: 0;
}

.flow-intro p {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  margin: 4px 0 0;
}

.field-label,
.mode-fieldset legend {
  font-size: 14px;
  font-weight: 800;
}

.text-input {
  background: var(--paper-strong);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  margin: 8px 0 6px;
  min-height: 52px;
  padding: 12px 14px;
  width: 100%;
}

.text-input[readonly] {
  background: #fffaf0;
  color: var(--ink-soft);
}

.field-source {
  color: var(--sky-strong);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
  margin: 0 2px 20px;
}

.mode-fieldset {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
}

.mode-fieldset__hint {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  margin: 4px 0 0;
}

.mode-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
}

.mode-option {
  align-items: center;
  background: var(--paper-strong);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 82px;
  padding: 11px;
  position: relative;
}

.mode-option.is-selected {
  background: #fff4d6;
  border-color: var(--sun);
  box-shadow: 0 4px 0 #e5ad27;
}

.mode-option input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.mode-option__icon {
  align-items: center;
  background: var(--paper);
  border-radius: 10px;
  display: flex;
  flex: 0 0 35px;
  height: 35px;
  justify-content: center;
}

.mode-option__icon svg {
  fill: none;
  height: 23px;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 23px;
}

.mode-option strong,
.mode-option small { display: block; }
.mode-option strong { font-size: 13px; line-height: 1.3; }
.mode-option small { color: var(--muted); font-size: 10px; margin-top: 3px; }

.photo-preview {
  background: #eef9fe;
  border: 2px solid #ccecf9;
  border-radius: var(--radius-md);
  margin: 0 0 20px;
  min-height: 190px;
  overflow: hidden;
}

.photo-guide {
  padding: 17px 0 13px;
}

.photo-guide__heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 17px 12px;
}

.photo-guide__heading span {
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.photo-guide__heading strong {
  font-size: 14px;
  line-height: 1.45;
}

.photo-guide__examples {
  display: grid;
  gap: 9px;
  grid-auto-columns: 112px;
  grid-auto-flow: column;
  overflow-x: auto;
  padding: 0 17px 8px;
  scroll-padding-inline: 17px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.photo-guide__examples::-webkit-scrollbar { display: none; }

.photo-guide__examples figure {
  background: var(--paper-strong);
  border: 1px solid #c5e3ef;
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(78, 174, 232, 0.13);
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.photo-guide__art {
  aspect-ratio: 1;
  background-image: url("/assets/photo-guide.webp");
  background-position: var(--guide-x) var(--guide-y);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  display: block;
  width: 100%;
}

.photo-guide__art--storefront { --guide-x: 0%; --guide-y: 0%; }
.photo-guide__art--sign { --guide-x: 100%; --guide-y: 0%; }
.photo-guide__art--product { --guide-x: 0%; --guide-y: 100%; }
.photo-guide__art--display { --guide-x: 100%; --guide-y: 100%; }

.photo-guide__examples figcaption {
  font-size: 10px;
  font-weight: 850;
  padding: 7px 5px 8px;
  text-align: center;
}

.photo-guide > p {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  margin: 3px 17px 0;
}

.photo-guide[hidden],
.selected-photo[hidden] { display: none; }

.selected-photo {
  background: #d9eff8;
  margin: 0;
  position: relative;
}

.selected-photo img {
  background: #d9eff8;
  display: block;
  height: clamp(220px, 55vw, 310px);
  object-fit: contain;
  width: 100%;
}

.selected-photo figcaption {
  align-items: flex-start;
  background: rgba(255, 253, 248, 0.96);
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 11px 14px 12px;
  position: absolute;
  right: 0;
}

.selected-photo figcaption span {
  background: var(--ink);
  border-radius: 999px;
  color: white;
  font-size: 9px;
  font-weight: 900;
  margin-bottom: 4px;
  padding: 3px 7px;
}

.selected-photo figcaption strong {
  font-size: 12px;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-photo figcaption small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
  margin-top: 2px;
}

.selected-photo figcaption [data-photo-metadata] {
  color: var(--ink);
  font-weight: 800;
}

.selected-photo figcaption [data-photo-metadata].is-warning { color: var(--coral); }

.selected-photo.has-warning figcaption {
  background: #fff8f6;
  border-top: 2px solid rgba(255, 91, 86, 0.28);
  position: static;
}

.selected-photo.has-warning figcaption [data-photo-metadata] {
  line-height: 1.55;
  margin-top: 5px;
}

.privacy-note {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  margin: 18px 8px 0;
  padding-left: 25px;
  position: relative;
}

.privacy-note::before {
  color: var(--leaf);
  content: "✓";
  font-size: 17px;
  font-weight: 900;
  left: 0;
  position: absolute;
  top: -2px;
}

.progress-scene {
  height: 210px;
}

.progress-scene > img {
  object-position: 60% 70%;
}

.owl-traveler--searching {
  animation: search-flight 3.4s ease-in-out infinite alternate;
  bottom: 2%;
  left: 6%;
  transform: scale(0.8);
}

.progress-content {
  padding: 24px 24px 38px;
}

.progress-content > h2 {
  font-size: 23px;
  font-weight: 850;
  margin: 0;
  text-align: center;
}

.progress-content > p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0 24px;
  text-align: center;
}

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

.progress-list li {
  border-left: 3px solid var(--line);
  color: var(--muted);
  min-height: 58px;
  padding: 1px 0 16px 27px;
  position: relative;
}

.progress-list li::before {
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 50%;
  content: "";
  height: 17px;
  left: -10px;
  position: absolute;
  top: 0;
  width: 17px;
}

.progress-list li span {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.progress-list li small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 2px;
}

.progress-list li.active {
  color: var(--ink);
}

.progress-list li.active::before {
  animation: progress-pulse 700ms ease-in-out infinite alternate;
  border-color: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 90, 82, 0.13);
}

.progress-list li.done {
  border-left-color: var(--leaf);
  color: var(--ink);
}

.progress-list li.done::before {
  background: var(--leaf);
  border-color: var(--leaf);
  box-shadow: inset 0 0 0 3px var(--paper);
}

.candidate-content { padding-top: 16px; }
.candidate-list { display: grid; gap: 12px; }

.candidate-summary {
  background: #eef9fe;
  border: 2px solid #bfe6f6;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  padding: 14px;
}

.candidate-funnel {
  align-items: center;
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.candidate-funnel > span {
  align-items: center;
  background: var(--paper-strong);
  border: 1px solid #b9ddea;
  border-radius: 10px;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  padding: 7px 3px 6px;
}

.candidate-funnel strong {
  color: var(--coral);
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
}

.candidate-funnel small {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 4px;
  text-align: center;
}

.candidate-funnel > b { color: var(--sky-strong); font-size: 12px; }

.candidate-summary > p {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.65;
  margin: 10px 2px 0;
}

.candidate {
  background: var(--paper-strong);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 17px;
}

.candidate--recommended {
  border-color: var(--sun);
  box-shadow: 0 5px 0 #efd080;
}

.candidate__top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.candidate__top strong {
  font-size: 17px;
  font-weight: 850;
  line-height: 1.4;
}

.candidate__confidence {
  color: var(--coral);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.candidate p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  margin: 7px 0 13px;
}

.candidate .candidate__notice {
  background: #fff4d6;
  border: 1px solid var(--sun);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 750;
  margin: 0 0 12px;
  padding: 9px 10px;
}

.candidate .candidate__notice[hidden] { display: none; }

.candidate button {
  background: var(--ink);
  border: 0;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 46px;
  width: 100%;
}

.candidate button:disabled { cursor: not-allowed; opacity: 0.58; }

.result-scene { height: 260px; }
.result-scene > img { object-position: 61% 70%; }

.owl-traveler--arrived {
  animation: arrival-celebration 1s ease-in-out infinite alternate;
  bottom: -7px;
  left: 18%;
  transform: scale(0.9);
}

.certificate {
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  margin-top: -22px;
  min-height: 520px;
  padding: 28px 22px 42px;
  position: relative;
  text-align: center;
  z-index: 4;
}

.certificate__spark {
  left: 13%;
  top: 28px;
}

.certificate h2 {
  border-bottom: 3px dotted #b8dbef;
  display: inline-block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 30px;
  padding: 0 12px 13px;
}

.certificate__date {
  font-size: 15px;
  font-weight: 750;
  margin: 0;
  text-align: left;
}

.certificate__store {
  border-bottom: 2px dashed var(--line);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.4;
  margin: 10px 0;
  padding-bottom: 8px;
  text-align: left;
}

.certificate__ending {
  font-size: 14px;
  font-weight: 750;
  margin: 0 0 24px;
  text-align: left;
}

.visit-stamp {
  align-items: center;
  border: 6px double var(--coral);
  border-radius: 50%;
  color: var(--coral);
  display: flex;
  flex-direction: column;
  height: 126px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: 19px;
  top: 142px;
  transform: rotate(-12deg) scale(2.2);
  width: 126px;
}

.visit-stamp::before,
.visit-stamp::after {
  color: var(--coral);
  content: "✦";
  font-size: 15px;
  position: absolute;
}

.visit-stamp::before { left: 10px; top: 48px; }
.visit-stamp::after { right: 10px; top: 48px; }

.visit-stamp strong {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.visit-stamp small {
  font-size: 8px;
  font-weight: 850;
  margin-top: 2px;
}

.visit-stamp.play {
  animation: stamp-drop 700ms cubic-bezier(0.16, 1.35, 0.42, 1) forwards;
}

.result-reward {
  align-items: center;
  border-bottom: 2px dotted var(--line);
  border-top: 2px dotted var(--line);
  display: flex;
  gap: 8px;
  margin: 28px 0 22px;
  min-height: 88px;
  padding: 10px 0;
  text-align: left;
}

.result-reward__owl {
  display: block;
  flex: 0 0 74px;
  height: 76px;
  overflow: hidden;
  position: relative;
}

.result-reward__owl i {
  height: 86px;
  left: 3px;
  position: absolute;
  top: -5px;
  width: 64px;
}

.result-reward span:last-child { min-width: 0; }
.result-reward strong { display: block; font-size: 17px; font-weight: 900; }
.result-reward small { color: var(--ink-soft); display: block; font-size: 12px; font-weight: 650; margin-top: 4px; }

.page-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  padding: 24px 20px 18px;
}

.page-heading h1 {
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.25;
  margin: 0;
}

.page-heading p {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  margin: 6px 0 0;
}

.passport-mark {
  align-items: center;
  border: 3px double var(--coral);
  border-radius: 50%;
  color: var(--coral);
  display: flex;
  flex: 0 0 48px;
  font-size: 11px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  transform: rotate(8deg);
}

.passport-overview {
  background: var(--ink);
  color: white;
  margin: 0 20px;
  min-height: 165px;
  padding: 22px;
  position: relative;
}

.passport-overview::before,
.passport-overview::after {
  background: var(--paper);
  border-radius: 50%;
  content: "";
  height: 20px;
  position: absolute;
  top: 72px;
  width: 20px;
}

.passport-overview::before { left: -10px; }
.passport-overview::after { right: -10px; }

.passport-total {
  align-items: baseline;
  border-bottom: 2px dotted rgba(255,255,255,0.3);
  display: flex;
  gap: 8px;
  padding-bottom: 13px;
}

.passport-total small { font-size: 12px; font-weight: 700; margin-right: auto; }
.passport-total strong { color: var(--sun); font-size: 40px; line-height: 1; }
.passport-total span { font-size: 11px; }

.passport-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 15px;
}

.passport-stat small {
  color: #c8d3ed;
  display: block;
  font-size: 10px;
  font-weight: 650;
}

.passport-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 850;
  margin-top: 3px;
}

.passport-section {
  padding: 28px 20px 4px;
}

.section-title-row {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
}

.section-title-row h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}

.section-title-row span {
  color: var(--coral);
  font-size: 13px;
  font-weight: 850;
}

.collection-scopes {
  display: flex;
  gap: 8px;
  margin: 0 -2px 14px;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scrollbar-width: none;
}

.collection-scopes::-webkit-scrollbar,
.map-levels::-webkit-scrollbar { display: none; }

.scope-chip {
  background: var(--paper-strong);
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  min-height: 40px;
  padding: 8px 14px;
}

.scope-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 4px 0 #0b204e;
  color: white;
  transform: translateY(-2px);
}

.map-levels {
  display: grid;
  gap: 8px;
  grid-auto-columns: 91px;
  grid-auto-flow: column;
  margin: 0 -20px 15px;
  overflow-x: auto;
  padding: 2px 20px 7px;
  scrollbar-width: none;
}

.map-levels[hidden] { display: none; }

.map-level-card {
  background: var(--paper-strong);
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  min-height: 76px;
  padding: 9px;
  text-align: left;
}

.map-level-card small,
.map-level-card strong,
.map-level-card span { display: block; }
.map-level-card small { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: 0.05em; }
.map-level-card strong { font-size: 15px; font-weight: 900; margin-top: 3px; }
.map-level-card span { color: var(--ink-soft); font-size: 9px; font-weight: 750; margin-top: 5px; }

.map-level-card.is-complete::after {
  color: var(--leaf);
  content: "✓";
  float: right;
  font-size: 13px;
  font-weight: 950;
  margin-top: -19px;
}

.map-level-card.is-locked {
  background: #f2f0eb;
  color: #a29d94;
  cursor: not-allowed;
}

.map-level-card[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: 0 4px 0 var(--sun);
  transform: translateY(-2px);
}

.map-sheet {
  background: var(--paper-strong);
  border: 2px solid var(--ink);
  box-shadow: 0 7px 0 #e2d9c9;
  padding: 15px;
  position: relative;
}

.map-sheet::before {
  background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 15px);
  content: "";
  height: 3px;
  left: 15px;
  opacity: 0.18;
  position: absolute;
  right: 15px;
  top: 0;
}

.map-sheet.is-opening { animation: map-sheet-open 360ms cubic-bezier(0.2, 0.85, 0.3, 1); }

.map-sheet__heading {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 5px 1px 11px;
}

.map-sheet__heading small,
.map-sheet__heading strong,
.map-sheet__heading span { display: block; }
.map-sheet__heading small { color: var(--muted); font-size: 10px; font-weight: 750; }
.map-sheet__heading strong { font-size: 24px; font-weight: 950; letter-spacing: -0.03em; margin-top: 2px; }
.map-sheet__heading span { color: var(--ink-soft); font-size: 10px; font-weight: 700; margin-top: 2px; }
.map-sheet__heading b { color: var(--coral); flex: 0 0 auto; font-size: 15px; font-weight: 900; }

.map-unlock-note {
  background: var(--sky-soft);
  border-left: 4px solid var(--sky);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 12px;
  padding: 9px 10px;
}

.prefecture-map {
  background: #f8f5ef;
  border: 1px solid var(--line);
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: repeat(10, 30px);
  padding: 10px 8px;
}

.prefecture {
  align-items: center;
  background: var(--paper-strong);
  border: 1px solid #ddd8cf;
  border-radius: 4px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 2px 0;
  text-align: center;
}

.prefecture b { font-size: 6.5px; font-weight: 900; line-height: 1.15; white-space: nowrap; }
.prefecture small { font-size: 6.5px; font-weight: 850; line-height: 1.15; min-height: 7px; white-space: nowrap; }
.prefecture.is-cleared { color: white; }
.prefecture.is-cleared small { color: currentColor; }

.map-level-1 { background: #ef5c55 !important; border-color: #d74a45 !important; }
.map-level-2 { background: #f5a13a !important; border-color: #df8b24 !important; }
.map-level-3 { background: #f4ca3f !important; border-color: #d9af29 !important; color: var(--ink) !important; }
.map-level-4 { background: #95c63e !important; border-color: #75a526 !important; }
.map-level-5 { background: #4daee7 !important; border-color: #318ec8 !important; }
.map-level-6 { background: #7663c6 !important; border-color: #5948ad !important; }

.collection-share-button {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  justify-content: center;
  margin-top: 14px;
  min-height: 44px;
  width: 100%;
}

.collection-share-button span { color: var(--sun); font-size: 17px; }

.recent-list {
  border-top: 1px solid var(--line);
}

.recent-item,
.recent-empty {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
  min-height: 72px;
  padding: 12px 0;
}

.recent-item__stamp {
  align-items: center;
  border: 2px solid var(--coral);
  border-radius: 50%;
  color: var(--coral);
  display: flex;
  flex: 0 0 44px;
  font-size: 9px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  transform: rotate(-8deg);
}

.recent-item span:nth-child(2) { min-width: 0; }
.recent-item strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { color: var(--muted); display: block; font-size: 11px; margin-top: 3px; }
.recent-empty { color: var(--muted); font-size: 13px; justify-content: center; text-align: center; }

.badges-screen { padding-bottom: 24px; }

.collection-scopes--badges { margin: 0 20px 19px; }

.badge-scope-title {
  font-size: 18px;
  font-weight: 900;
  margin: 0 20px 13px;
}

.badges {
  padding: 0 20px 28px;
}

.badge-group + .badge-group { margin-top: 24px; }

.badge-group__title {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px;
}

.badge-group__title h3 { font-size: 15px; font-weight: 900; margin: 0; }
.badge-group__title span { color: var(--muted); font-size: 10px; font-weight: 800; }

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

.badge {
  background: var(--paper-strong);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  min-height: 226px;
  padding: 13px;
  position: relative;
}

.badge__owl {
  background-image: url("/assets/owl-badges.webp");
  background-position: var(--badge-x) var(--badge-y);
  background-repeat: no-repeat;
  background-size: 400% 400%;
  border: 2px solid var(--line);
  border-radius: 50%;
  height: 82px;
  margin-bottom: 10px;
  width: 82px;
}

.badge.locked .badge__owl {
  filter: grayscale(1);
  opacity: 0.36;
}

.badge.earned {
  background: #fff7dc;
  border-color: var(--sun);
  box-shadow: 0 5px 0 #edcf76;
}

.badge.earned .badge__owl { border-color: var(--ink); }

.badge b {
  color: var(--coral);
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 4px;
}

.badge span {
  display: block;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.badge small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}

.badge__share {
  align-items: center;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 900;
  gap: 4px;
  justify-content: center;
  margin-top: 10px;
  min-height: 32px;
  width: 100%;
}

.share-sheet[hidden] { display: none; }

.share-sheet {
  inset: 0;
  position: fixed;
  z-index: 100;
}

.share-sheet__backdrop {
  background: rgba(8, 24, 58, 0.58);
  border: 0;
  inset: 0;
  position: absolute;
  width: 100%;
}

.share-sheet__panel {
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  bottom: 0;
  box-shadow: 0 -12px 40px rgba(8, 24, 58, 0.2);
  left: 50%;
  max-height: min(92dvh, 850px);
  max-width: 520px;
  overflow-y: auto;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  position: absolute;
  transform: translateX(-50%);
  width: 100%;
}

.share-sheet__handle {
  background: var(--line);
  border-radius: 999px;
  height: 4px;
  margin: 0 auto 12px;
  width: 44px;
}

.share-sheet__heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.share-sheet__heading small { color: var(--muted); font-size: 10px; font-weight: 800; }
.share-sheet__heading h2 { font-size: 21px; font-weight: 950; margin: 2px 0 0; }
.share-sheet__heading button { background: transparent; border: 0; color: var(--ink); cursor: pointer; font-size: 27px; line-height: 1; padding: 2px 4px; }

.share-preview {
  background: white;
  border: 2px solid var(--ink);
  display: block;
  height: auto;
  max-height: 48dvh;
  object-fit: contain;
  width: 100%;
}

.share-sheet__note { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 10px 2px 12px; }
.share-sheet__actions { display: grid; gap: 9px; }
.share-sheet__actions .primary-action,
.share-sheet__actions .secondary-action { margin: 0; width: 100%; }

.status-toast {
  background: var(--ink);
  border-radius: 12px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  color: white;
  font-size: 12px;
  font-weight: 700;
  left: 50%;
  margin: 0;
  max-width: calc(100% - 40px);
  opacity: 0;
  padding: 11px 15px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 50;
}

.status-toast:not(:empty) {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes owl-cycle {
  0%, 24.9% { background-position: 0 0; }
  25%, 49.9% { background-position: 33.333% 0; }
  50%, 74.9% { background-position: 66.667% 0; }
  75%, 100% { background-position: 100% 0; }
}

@keyframes travel-path {
  0% { transform: translate3d(0, 0, 0) scale(0.82); }
  45% { transform: translate3d(18vw, -12px, 0) scale(0.88); }
  100% { transform: translate3d(min(46vw, 220px), -20px, 0) scale(0.92); }
}

@keyframes leaf-drift {
  0% { opacity: 0; transform: translate3d(0, -8px, 0) rotate(20deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(45px, 70px, 0) rotate(170deg); }
}

@keyframes spark {
  50% { opacity: 0.25; transform: scale(0.65); }
}

@keyframes search-flight {
  from { transform: translate3d(0, 0, 0) scale(0.68); }
  to { transform: translate3d(min(52vw, 250px), -42px, 0) scale(0.74); }
}

@keyframes arrival-celebration {
  from { transform: translateY(0) scale(0.88) rotate(-2deg); }
  to { transform: translateY(-8px) scale(0.92) rotate(2deg); }
}

@keyframes progress-pulse {
  to { transform: scale(1.12); }
}

@keyframes stamp-drop {
  0% { opacity: 0; transform: rotate(-12deg) scale(2.2); }
  70% { opacity: 0.95; transform: rotate(-12deg) scale(0.92); }
  100% { opacity: 0.94; transform: rotate(-12deg) scale(1); }
}

@keyframes map-sheet-open {
  from { opacity: 0.45; transform: translateY(9px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 521px) {
  .app-shell { margin-bottom: 28px; margin-top: 28px; min-height: calc(100dvh - 56px); }
  .bottom-nav { bottom: 28px; }
  .travel-scene { height: 350px; }
}

@media (max-width: 360px) {
  .app-header { padding-left: 16px; padding-right: 16px; }
  .brand-name { gap: 4px; }
  .brand-name small { font-size: 12.5px; }
  .brand-name strong { font-size: 19px; }
  .brand-mark { height: 36px; width: 36px; }
  .mode-grid { grid-template-columns: 1fr; }
  .journey-row { grid-template-columns: 54px minmax(0, 1fr) 18px; }
  .journey-icon { height: 52px; width: 52px; }
  .badges { grid-template-columns: 1fr; }
  .visit-stamp { height: 108px; right: 12px; width: 108px; }
  .visit-stamp strong { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .owl-traveler { left: 34%; }
  .visit-stamp { opacity: 0.94; transform: rotate(-12deg) scale(1); }
}
