:root {
  color-scheme: light;
  --bg: #edf2f4;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --ink: #162126;
  --muted: #65727e;
  --line: #d8e0e6;
  --brand: #0e6b62;
  --brand-dark: #0e4d4d;
  --accent: #b45f2a;
  --accent-soft: #fff1e7;
  --care: #255b95;
  --success: #178366;
  --shadow: 0 14px 34px rgba(20, 36, 45, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(14, 77, 77, 0.08), rgba(237, 242, 244, 0) 260px),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.mobile-app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -16px -14px 14px;
  padding: max(16px, env(safe-area-inset-top)) 14px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(237, 242, 244, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(216, 224, 230, 0.72);
}

.eyebrow,
.status-label,
.destination-card span,
.care-match-card span,
.translation-card span {
  display: block;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shield-icon,
.action-icon,
.bottom-nav span {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.shield-icon::before {
  content: "";
  position: absolute;
  inset: 2px 4px;
  border: 2px solid var(--brand);
  border-radius: 10px 10px 12px 12px;
}

.view {
  display: none;
}

.view.is-active {
  display: grid;
  gap: 14px;
  animation: view-in 160ms ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.destination-card,
.profile-card,
.notice-card,
.app-form,
.section-block,
.day-card,
.care-match-card,
.translation-card,
.upload-item,
.security-item,
.status-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.destination-card {
  min-height: 210px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 12px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(14, 77, 77, 0.95), rgba(30, 82, 110, 0.92)),
    linear-gradient(45deg, #c9dedc, #e8f0f4);
}

.destination-copy strong {
  display: block;
  margin-bottom: 12px;
  font-size: 26px;
  line-height: 1.1;
}

.destination-copy p,
.destination-copy span {
  color: rgba(255, 255, 255, 0.78);
}

.mini-map {
  position: relative;
  min-height: 172px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.map-road {
  position: absolute;
  left: 25px;
  top: 24px;
  width: 82px;
  height: 118px;
  border: 3px dashed rgba(255, 255, 255, 0.72);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 64px 0 0;
}

.map-point {
  position: absolute;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 13px;
  font-style: normal;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.point-one {
  left: 14px;
  top: 16px;
}

.point-two {
  right: 18px;
  top: 66px;
}

.point-three {
  left: 44px;
  bottom: 16px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions button {
  min-height: 118px;
  padding: 12px 8px;
  display: grid;
  align-content: start;
  gap: 7px;
  text-align: left;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.quick-actions strong,
.quick-actions small {
  display: block;
}

.quick-actions small {
  color: var(--muted);
  line-height: 1.35;
}

.route-icon::before,
.route-icon::after,
.care-icon::before,
.care-icon::after,
.lang-icon::before,
.lang-icon::after {
  content: "";
  position: absolute;
  border-radius: 8px;
}

.route-icon::before {
  inset: 4px 2px;
  border: 2px solid var(--brand);
}

.route-icon::after {
  left: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.care-icon::before {
  left: 9px;
  top: 2px;
  width: 4px;
  height: 18px;
  background: var(--care);
}

.care-icon::after {
  left: 2px;
  top: 9px;
  width: 18px;
  height: 4px;
  background: var(--care);
}

.lang-icon::before {
  inset: 3px 1px;
  border: 2px solid var(--accent);
}

.lang-icon::after {
  left: 7px;
  top: 8px;
  width: 8px;
  height: 2px;
  background: var(--accent);
}

.card-stack,
.task-list,
.itinerary-list,
.medical-result,
.translation-output,
.upload-list,
.security-list {
  display: grid;
  gap: 10px;
}

.status-card {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.text-button {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: #e8f4f1;
  font-weight: 800;
  white-space: nowrap;
}

.section-block,
.app-form,
.notice-card {
  padding: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.compact-heading {
  margin-top: 4px;
}

.task-list label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #34434a;
  font-weight: 650;
}

.task-list input,
.chips input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.app-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #35424a;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cad5dd;
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chips label {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.day-card {
  padding: 14px;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.day-header span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.day-body {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.day-body p {
  margin: 0;
}

.day-body b {
  display: inline-block;
  min-width: 44px;
  color: var(--brand-dark);
}

.day-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.care-match-card,
.translation-card {
  padding: 15px;
}

.care-match-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.care-match-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #34434a;
}

.translation-card {
  background: var(--surface-soft);
}

.translation-card p {
  margin-bottom: 0;
  color: var(--ink);
}

.upload-item {
  padding: 14px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  box-shadow: none;
}

.upload-state {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid #b7c3cb;
  border-radius: 8px;
}

.upload-item.is-done .upload-state {
  border-color: var(--success);
  background: var(--success);
  box-shadow: inset 0 0 0 5px #fff;
}

.upload-item p,
.security-item p,
.notice-card p,
.profile-card p {
  margin-bottom: 0;
}

.primary-button {
  min-height: 50px;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.profile-card {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
}

.security-item {
  padding: 13px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  box-shadow: none;
  background: var(--surface-soft);
}

.security-item span {
  color: var(--accent);
  font-weight: 900;
}

.notice-card {
  background: var(--accent-soft);
  box-shadow: none;
}

.notice-card strong {
  display: block;
  margin-bottom: 6px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(100%, 480px);
  transform: translateX(-50%);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: 14px;
  background: transparent;
  color: #66747f;
  font-size: 12px;
  font-weight: 850;
}

.bottom-nav button.is-active {
  color: var(--brand-dark);
  background: #e7f2ef;
}

.bottom-nav span::before,
.bottom-nav span::after {
  content: "";
  position: absolute;
}

.nav-home::before {
  left: 3px;
  top: 8px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 4px;
}

.nav-home::after {
  left: 5px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-trip::before {
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.nav-trip::after {
  left: 10px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 6px 6px 0 currentColor;
}

.nav-care::before {
  left: 9px;
  top: 4px;
  width: 4px;
  height: 16px;
  background: currentColor;
  border-radius: 4px;
}

.nav-care::after {
  left: 3px;
  top: 10px;
  width: 16px;
  height: 4px;
  background: currentColor;
  border-radius: 4px;
}

.nav-translate::before {
  inset: 4px 2px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.nav-translate::after {
  left: 6px;
  top: 9px;
  width: 10px;
  height: 2px;
  background: currentColor;
}

.nav-docs::before {
  left: 5px;
  top: 3px;
  width: 12px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-docs::after {
  left: 8px;
  top: 8px;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

@media (max-width: 360px) {
  .mobile-app {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-header {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .destination-card {
    grid-template-columns: 1fr;
  }

  .mini-map {
    min-height: 120px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  body {
    background:
      linear-gradient(90deg, rgba(14, 77, 77, 0.1), rgba(180, 95, 42, 0.08)),
      var(--bg);
  }

  .mobile-app {
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: calc(100vh - 40px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--bg);
    box-shadow: 0 28px 80px rgba(20, 36, 45, 0.18);
    overflow: hidden;
  }

  .app-header {
    top: 20px;
  }
}
