/* Shared styles used across pages. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&display=swap");

button,
a,
input,
select,
textarea,
[role="button"] {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    outline-color 180ms ease,
    transform 180ms ease;
}

@keyframes content-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

details[open] > :not(summary) {
  animation: content-reveal 220ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  button,
  a,
  input,
  select,
  textarea,
  [role="button"],
  details[open] > :not(summary),
  .trip-module-nav::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.back-link {
  font-size: 12px;
  color: #6f8175;
  text-decoration: none;
}

.trip-module-nav {
  position: relative;
  display: flex;
  gap: 20px;
  margin: 0 0 24px;
  border-bottom: 1px solid #e2e8e1;
}

.trip-module-nav::after {
  position: absolute;
  right: auto;
  bottom: -1px;
  left: 0;
  width: var(--nav-indicator-width, 0px);
  height: 3px;
  background: #365b4a;
  content: "";
  pointer-events: none;
  transform: translateX(var(--nav-indicator-x, 0px));
}

.trip-module-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
  color: #829087;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: none;
}

.trip-module-nav a:hover,
.trip-module-nav a.active {
  color: #365b4a;
}

.trip-module-nav a.active {
  border-bottom-color: transparent;
}

.trip-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0 22px;
}

.trip-section-heading-copy {
  min-width: 0;
}

.trip-section-kicker {
  margin: 0 0 5px;
  color: #829087;
  font-size: 13px;
  font-weight: 600;
}

.trip-section-heading h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -1.2px;
}

.trip-section-heading-copy > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.place-detail-link {
  color: inherit;
  text-decoration: none;
}

.place-detail-link:hover {
  color: #365b4a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .trip-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 32px 0 20px;
  }

  .trip-section-heading .itinerary-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .trip-module-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 12px;
  }
}

.detail-hero {
  padding: 47px 0 30px;
}

.detail-hero .eyebrow {
  color: var(--accent);
  margin: 0 0 10px;
}

.detail-hero h1 {
  font-size: 36px;
  letter-spacing: -1.5px;
  margin: 0;
}

.detail-hero .intro {
  margin: 10px 0 0;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-heading .eyebrow {
  margin: 0 0 5px;
  font-size: 9px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.5px;
}

.panel-symbol {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eff5ef;
  color: #62806e;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.form-hint {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin: -5px 0 14px;
}

.secondary-button {
  height: 40px;
  border: 1px solid #dce6dd;
  border-radius: 7px;
  background: #365b4a;
  color: #fff;
  font: 600 14px "DM Sans", "Noto Sans KR", sans-serif;
  cursor: pointer;
  text-align: center;
  align-items: center;
  text-decoration: none;
}

.secondary-button:hover {
  background: #294b3b;
  color: #fff;
}

.primary-button,
.secondary-button {
  font-size: 15px !important;
}

.place-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  margin-left: 5px;
  border-radius: 14px;
  background: #eff5ef;
  color: #547260;
  font-size: 15px;
}

.count-value {
  font-size: 15px;
}

.place-pin {
  flex: none;
  width: 33px;
  height: 33px;
  border-radius: 9px;
  background: #fceee8;
  color: #bd6649;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}

.stay-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #758079;
  font-size: 10px;
}

.stay-edit label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stay-edit input {
  width: 62px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  color: var(--ink);
  font: 11px "DM Sans","Noto Sans KR",sans-serif;
}

.text-button {
  border: 0;
  background: none;
  color: #365b4a;
  font: 600 12px "DM Sans", "Noto Sans KR", sans-serif;
  cursor: pointer;
}
.compact {
  padding: 25px 12px;
}

@media (max-width:520px) {
  .stay-edit {
    margin-left: 42px;
  }
.detail-hero {
    padding-top: 35px;
  }
}

:root {
  --ink: #20332f;
  --muted: #77827c;
  --paper: #f6f7f3;
  --green: #d9eddf;
  --accent: #df7655;
  --line: #e8eae4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans","Noto Sans KR",sans-serif;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 38px;
}

.account-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.account-controls form {
  margin: 0;
}

.account-controls button {
  border: 0;
  background: none;
  color: #365b4a;
  font: inherit;
  cursor: pointer;
}

.auth-shell {
  display: grid;
  width: min(440px, calc(100% - 40px));
  min-height: 100vh;
  align-content: center;
  gap: 24px;
  margin: auto;
}

.auth-panel h1 {
  margin: 0;
  font-size: 28px;
}

.auth-description,
.auth-switch {
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.auth-form small {
  margin-top: -10px;
  color: var(--muted);
}

.auth-form .primary-button {
  text-align: center;
}

.auth-switch a {
  color: #365b4a;
  font-weight: 700;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-links a {
  text-decoration: none;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  color: var(--accent);
  margin-right: 6px;
}

.brand-light {
  color: #a7b4aa;
  font-weight: 400;
  font-size: 15px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #88928b;
  font-weight: 700;
}

.count {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #88928b;
  font-weight: 700;
}

.intro {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

.hero-stamp {
  width: 112px;
  height: 112px;
  border: 1px solid #d7e0d8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: rotate(10deg);
  color: #7d9988;
}

.hero-stamp span {
  font-size: 30px;
}

.hero-stamp small {
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 1px;
}

.count {
  font-size: 9px;
}

.icon-button {
  border: 0;
  background: transparent;
  color: #365b4a;
  font-size: 23px;
  cursor: pointer;
  padding: 4px 8px;
}
.icon-button:hover {
  color: var(--accent);
}

.empty-state {
  background: #fff;
  border: 1px dashed #dce2db;
  border-radius: 12px;
  text-align: center;
  padding: 32px 15px;
  color: var(--muted);
}

.empty-icon {
  font-size: 25px;
  color: #7e9b87;
}

.empty-state h3 {
  font-size: 14px;
  color: var(--ink);
  margin: 8px;
}

.empty-state p {
  font-size: 11px;
  margin: 0;
}

.trip-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trip-form label {
  font-size: 10px;
  letter-spacing: .3px;
  color: #626f67;
  font-weight: 600;
}

.trip-form input {
  display: block;
  width: 100%;
  height: 41px;
  border: 1px solid #e5e9e3;
  border-radius: 7px;
  margin-top: 6px;
  padding: 0 11px;
  background: #fcfcfa;
  color: var(--ink);
  font: 12px "DM Sans","Noto Sans KR",sans-serif;
  outline: none;
}

.trip-form input:focus {
  border-color: #86a391;
  box-shadow: 0 0 0 3px #86a39120;
}

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

.primary-button {
  height: 43px;
  border: 0;
  border-radius: 7px;
  background: #365b4a;
  color: #fff;
  font: 600 14px "DM Sans", "Noto Sans KR", sans-serif;
  cursor: pointer;
  margin-top: 4px;
  padding: 0 15px;
  text-align: center;
}

.primary-button span {
  float: right;
  font-size: 16px;
}

.primary-button:hover {
  background: #294b3b;
  color: #fff;
}

.notices {
  margin-top: 15px;
}

.notice {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin: 0 0 8px;
}

.notice.success {
  background: #e8f4e9;
  color: #386447;
}

.notice.error {
  background: #fff0eb;
  color: #a24f39;
}

.notice.info {
  background: #eef3f0;
  color: #40584a;
}

footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  text-align: center;
  font-size: 8px;
  letter-spacing: 2px;
  color: #9aa39c;
}

footer span {
  color: var(--accent);
  margin-left: 5px;
}

@media (max-width:760px) {
  .shell {
    padding: 0 20px;
  }
.hero-stamp {
    width: 82px;
    height: 82px;
  }
}

@media (max-width:430px) {
  .hero-stamp {
    display: none;
  }
.date-row {
    grid-template-columns: 1fr;
  }
}

.results-caption {
  margin: 0 0 5px;
  color: #88928b;
  font-size: 9px;
  line-height: 1.6;
}

.search-result {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid #ecefe9;
}

.search-result>div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.search-result strong {
  font-size: 11px;
}

.search-result span {
  font-size: 9px;
  color: var(--muted);
}

.select-location {
  border: 1px solid #dce6dd;
  border-radius: 6px;
  background: white;
  padding: 6px 8px;
  color: #365b4a;
  font: 600 9px "DM Sans","Noto Sans KR",sans-serif;
  cursor: pointer;
}

.maps-attribution {
  font-size: 8px;
  color: #64756b;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

@media (max-width:520px) {
  .search-result {
    grid-template-columns: 1fr auto;
  }
.maps-attribution {
    grid-column: 1;
    grid-row: 2;
  }
.search-result .select-location {
    grid-column: 2;
    grid-row: 1/3;
  }
}

.trip-form input:disabled {
  background: #f1f3ef;
  color: #a1aaa2;
  cursor: not-allowed;
}

.trip-form button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.select-location:hover {
  background: #eff5ef;
}

body {
  font-size: 16px;
}

.eyebrow {
  font-size: 11px;
}

.count {
  font-size: 15px;
}

.intro {
  font-size: 16px;
}

.detail-hero h1 {
  font-size: 27px;
}

.trip-form label {
  font-size: 13px;
}

.trip-form input {
  font-size: 15px;
}

.panel-heading h2 {
  font-size: 21px;
}

.form-hint {
  font-size: 13px;
}

.search-result strong {
  font-size: 14px;
}

.search-result span {
  font-size: 12px;
}

.select-location {
  font-size: 12px;
  padding: 8px 11px;
}

.maps-attribution {
  font-size: 10px;
}

.stay-edit {
  font-size: 12px;
}

.stay-edit input {
  font-size: 13px;
}

.trip-map {
  width: 100%;
  height: 600px;
  border-radius: 9px;
  overflow: hidden;
  background: #edf1ec;
}

.map-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.map-unavailable {
  min-height: 250px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  border: 1px dashed #dce2db;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  background: #fafbf8;
}

footer {
  font-size: 10px;
}

@media (max-width:900px) {
  .trip-map {
    height: 440px;
  }
}

.map-home-glyph {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 15px 15px 15px 4px;
  background: #fff2bd !important;
  box-shadow: 0 3px 12px #17231f99;
  color: #b8860b !important;
}

.map-home-glyph svg {
  width: 34px;
  height: 34px;
  display: block;
  stroke: currentColor;
}

[hidden] {
  display: none !important;
}

.category-pin {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.category-pin svg {
  width: 20px;
  height: 20px;
  display: block;
}

.attraction-pin {
  background: #ffe1e1;
  color: #b01620;
}

.restaurant-pin {
  background: #dceeff;
  color: #0757a5;
}

.map-home-glyph svg path {
  stroke: currentColor;
}

.category-pin {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
}

.category-pin svg {
  width: 21px;
  height: 21px;
  display: block;
}

.panel-heading h2 {
  font-size: 27px;
}

.detail-hero h1 {
  font-size: 40px;
}

.empty-state h3 {
  font-size: 17px;
}

.accommodation-add-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 10px 0 14px;
  padding: 0 14px;
}

.accommodation-add-button span {
  font-size: 18px;
}

.expense-totals-panel .form-hint {
  margin: 16px 0 0;
}

.expense-list {
  display: flex;
  flex-direction: column;
}

/* Shared clustering styles used by the trip list and trip planner. */

.cluster-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  margin: 0 0 18px;
  border: 1px solid #e8ece7;
  border-radius: 10px;
  background: #fafbf8;
}

.cluster-tool>div {
  min-width: 0;
}

.cluster-tool>div strong {
  font-size: 14px;
}

.cluster-tool>div p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.cluster-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex: none;
}

.cluster-form label {
  font-size: 11px;
  color: #626f67;
  font-weight: 600;
}

.cluster-form select {
  display: block;
  height: 40px;
  min-width: 100px;
  margin-top: 5px;
  padding: 0 9px;
  border: 1px solid #e5e9e3;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: 13px "DM Sans","Noto Sans KR",sans-serif;
}

.cluster-form .primary-button {
  white-space: nowrap;
  padding: 0 13px;
}

.cluster-results {
  margin: 0 0 18px;
}

.cluster-summary {
  margin-bottom: 10px;
  color: #69776e;
  font-size: 12px;
  font-weight: 600;
}

.cluster-list {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(230px,1fr));
  gap: 10px;
}

.cluster-card {
  padding: 14px;
  border: 1px solid #e8ece7;
  border-left: 4px solid var(--cluster-color);
  border-radius: 9px;
  background: #fff;
}

.cluster-card header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.cluster-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--cluster-color);
  box-shadow: 0 0 0 1px var(--cluster-color);
}

.cluster-card header strong {
  font-size: 14px;
}

.cluster-size {
  font-size: 11px;
  color: #6f7a72;
}

.cluster-distance {
  font-size: 11px;
  color: #6f7a72;
  margin-left: auto;
  font-weight: 600;
}

.cluster-center {
  margin: 8px 0;
  color: #89948c;
  font-size: 10px;
}

.cluster-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cluster-card li {
  padding: 7px 0;
  border-top: 1px solid #f0f2ed;
  font-size: 12px;
  font-weight: 600;
}

.cluster-card li small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.cluster-note {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 7px;
  background: #fff7e7;
  color: #80622b;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width:760px) {
  .cluster-tool {
    align-items: stretch;
    flex-direction: column;
  }
  .cluster-form {
    width: 100%;
  }
  .cluster-form label {
    flex: 1;
  }
  .cluster-form select {
    width: 100%;
  }
  .cluster-form .primary-button {
    flex: 1;
  }
  .cluster-distance {
    margin-left: 0;
  }
}
