:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --paper-deep: #eee9df;
  --surface: #fffdf9;
  --ink: #242722;
  --muted: #6d7168;
  --line: rgba(42, 47, 40, 0.12);
  --accent: #c55b3f;
  --accent-dark: #913c29;
  --accent-soft: #f5dfd7;
  --jade: #668575;
  --indigo: #344e69;
  --shadow: 0 18px 52px rgba(65, 55, 43, 0.1);
  --shadow-small: 0 8px 24px rgba(65, 55, 43, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --sidebar-width: 254px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
label:has(input:focus-visible) {
  outline: 3px solid rgba(52, 78, 105, 0.42);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 10px 16px;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.prototype-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2f4b43;
  color: #f6faf7;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.prototype-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f2c078;
  box-shadow: 0 0 0 4px rgba(242, 192, 120, 0.16);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  padding-top: 34px;
}

.sidebar {
  position: fixed;
  inset: 34px auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.94);
  padding: 28px 20px 20px;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--ink);
  color: #f3bf74;
  transform: rotate(-2deg);
}

.brand__mark svg {
  width: 29px;
  height: 29px;
  stroke-width: 2.2;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.primary-nav {
  display: grid;
  gap: 5px;
  margin-top: 42px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translateX(2px);
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.storage-card {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 16px;
}

.storage-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
}

.storage-meter {
  height: 6px;
  overflow: hidden;
  margin: 12px 0 9px;
  border-radius: 999px;
  background: #ddd8ce;
}

.storage-meter span {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #8fa99b);
}

.storage-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.storage-card__badge {
  display: inline-flex;
  border-radius: 99px;
  background: #ece7dc;
  color: #695e4f;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  padding: 9px 8px;
  cursor: pointer;
  text-align: left;
}

.profile-card:hover {
  background: var(--paper);
}

.profile-card strong,
.profile-card small {
  display: block;
}

.profile-card strong {
  font-size: 13px;
}

.profile-card small {
  color: var(--muted);
  font-size: 11px;
}

.profile-card svg {
  width: 18px;
}

.avatar,
.person {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.main-content {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

.mobile-header,
.mobile-nav {
  display: none;
}

.view {
  max-width: 1380px;
  margin: 0 auto;
  padding: 54px clamp(28px, 4.8vw, 76px) 80px;
}

.view[hidden] {
  display: none;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.recent-heading {
  align-items: center;
}

.recent-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.recent-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recent-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

[data-toggle-real-selection].is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.recent-status {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  padding: 28px;
  text-align: left;
}

.recent-status[hidden] {
  display: none;
}

.recent-status > span {
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 20px;
  background: #eee8dc;
  font-size: 31px;
}

.recent-status strong,
.recent-status small {
  display: block;
}

.recent-status strong {
  font-family: var(--serif);
  font-size: 22px;
}

.recent-status small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.recent-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 28px;
}

.recent-media-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  padding: 0;
  cursor: zoom-in;
  text-align: left;
  box-shadow: 0 7px 22px rgba(52, 45, 35, 0.07);
}

.recent-media-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 3px;
}

.recent-media-card.is-selection-mode {
  cursor: pointer;
}

.recent-media-card.is-selected {
  border-color: var(--accent);
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.recent-media-card__selection {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: rgba(39, 42, 38, 0.66);
  color: white;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}

.recent-media-card.is-selected .recent-media-card__selection {
  background: var(--accent);
}

.recent-media-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e6e0d5;
  object-fit: cover;
}

.recent-media-card.is-image-error img {
  opacity: 0.18;
}

.recent-media-card__type {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(25, 28, 25, 0.72);
  color: white;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.recent-media-card__copy {
  padding: 12px 13px 14px;
}

.recent-media-card__copy strong,
.recent-media-card__copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-media-card__copy strong {
  font-size: 12px;
}

.recent-media-card__copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.recent-load-more {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

.recent-load-more .button {
  min-width: 210px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-heading h1 {
  max-width: 680px;
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.22;
}

.page-heading p:last-child {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.page-heading__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.access-button,
.access-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 13px rgba(65, 55, 43, 0.06);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.access-button {
  min-height: 44px;
  gap: 7px;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 800;
}

.access-button svg,
.access-icon svg {
  width: 22px;
  height: 22px;
}

.access-button:hover,
.access-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(65, 55, 43, 0.12);
}

.access-button--guide,
.access-icon--guide {
  color: #89572c;
}

.access-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

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

.quick-action {
  position: relative;
  display: grid;
  min-height: 116px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(40, 43, 39, 0.1);
  border-radius: 19px;
  padding: 17px 15px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 17px rgba(65, 55, 43, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quick-action::after {
  position: absolute;
  right: -24px;
  bottom: -27px;
  width: 82px;
  height: 82px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.1;
}

.quick-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(65, 55, 43, 0.12);
}

.quick-action--view {
  background: #e5f0e9;
  color: #315a48;
}

.quick-action--upload {
  background: #e3edf5;
  color: #365c78;
}

.quick-action--guide {
  background: #f7e9d7;
  color: #87592e;
}

.quick-action__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(30, 35, 31, 0.07);
}

.quick-action__icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 2.4;
}

.quick-action__icon--round { border-radius: 50%; }
.quick-action__icon--square { border-radius: 12px; }
.quick-action__icon--diamond { border-radius: 13px 23px 13px 23px; }

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

.quick-action__copy strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.quick-action__copy small {
  margin-top: 5px;
  color: currentColor;
  font-size: 10px;
  font-weight: 700;
}

.quick-action__arrow {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

.button--primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 22px rgba(36, 39, 34, 0.18);
}

.button--primary:hover:not(:disabled) {
  background: #353a33;
  box-shadow: 0 11px 28px rgba(36, 39, 34, 0.24);
}

.button--light {
  background: white;
  color: var(--ink);
}

.button--glass {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(25, 27, 24, 0.32);
  color: white;
  backdrop-filter: blur(12px);
}

.button--quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button--outline {
  border-color: var(--ink);
  background: transparent;
}

.featured-trip {
  position: relative;
  min-height: clamp(410px, 45vw, 570px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #364b42;
  box-shadow: var(--shadow);
  color: white;
  isolation: isolate;
}

.featured-trip > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.featured-trip:hover > img {
  transform: scale(1.025);
}

.featured-trip__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(24, 35, 31, 0.82) 0%, rgba(24, 35, 31, 0.45) 43%, rgba(24, 35, 31, 0.03) 76%);
}

.featured-trip__content {
  display: flex;
  min-height: inherit;
  max-width: 520px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(34px, 6vw, 76px);
}

.featured-trip__content > p {
  margin: 28px 0 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.featured-trip h2 {
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.08;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.28);
}

.featured-trip__meta {
  display: flex;
  gap: 9px;
  margin: 14px 0 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tag--glass {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 66px 0 22px;
}

.section-heading h2,
.family-panel h2 {
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(25px, 3vw, 34px);
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.trip-card {
  position: relative;
  min-height: 370px;
  overflow: hidden;
  border: 0 solid var(--preview-accent, #bd5c43);
  border-bottom-width: 6px;
  border-radius: var(--radius-lg);
  background: #35443c;
  box-shadow: var(--shadow-small);
  color: white;
  isolation: isolate;
  text-decoration: none;
}

.trip-card__image,
.trip-card__veil {
  position: absolute;
  inset: 0;
}

.trip-card__image {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms ease;
}

.trip-card:hover .trip-card__image {
  transform: scale(1.04);
}

.trip-card__veil {
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 23, 21, 0.06) 20%, rgba(18, 23, 21, 0.82) 100%);
}

.trip-card__top {
  display: flex;
  justify-content: space-between;
  padding: 22px;
}

.trip-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  background: color-mix(in srgb, var(--preview-accent, #bd5c43) 86%, transparent);
  font-size: 23px;
  backdrop-filter: blur(10px);
}

.trip-card__open {
  display: inline-flex;
  min-width: 86px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(24, 27, 24, 0.22);
  color: white;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: background 160ms ease, transform 160ms ease;
}

.trip-card__open svg {
  width: 21px;
  height: 21px;
}

.trip-card__open:hover {
  background: white;
  color: var(--ink);
}

.trip-card:focus-visible .trip-card__open,
.trip-card:hover .trip-card__open {
  background: white;
  color: var(--ink);
  transform: translateY(-2px);
}

.trip-card__body {
  position: absolute;
  inset: auto 0 0;
  padding: 30px 24px 24px;
}

.trip-card__body p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.trip-card__body h3 {
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 32px;
}

.trip-card__body span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.family-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-top: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(26px, 4vw, 44px);
}

.family-panel > div:first-child {
  max-width: 650px;
}

.family-panel p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.family-panel__people {
  display: flex;
  align-items: center;
}

.family-panel__people .person + .person {
  margin-left: -8px;
}

.person {
  width: 42px;
  height: 42px;
  border: 3px solid var(--surface);
}

.person--rose { background: #b56b67; }
.person--blue { background: #526f88; }
.person--gold { background: #b58b44; }
.person--green { background: #557665; }

.family-panel__count {
  margin-left: 12px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.family-sharing-view {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 42px 80px;
}

.sharing-explainer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 28px;
}

.sharing-explainer > div {
  display: grid;
  min-height: 158px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-small);
}

.sharing-explainer span { font-size: 38px; }
.sharing-explainer strong { font-size: 18px; }
.sharing-explainer small { color: var(--muted); font-size: 13px; }

.sharing-settings {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
}

.sharing-settings__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.sharing-settings__head h2 {
  margin: 3px 0 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(24px, 3vw, 34px);
}

.sharing-journey-picker {
  display: grid;
  min-width: 270px;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sharing-journey-picker select {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 42px 0 14px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.family-status {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  padding: 28px;
  text-align: left;
}

.family-status > span { font-size: 38px; }
.family-status strong,
.family-status small { display: block; }
.family-status strong { color: var(--ink); font-size: 18px; }
.family-status small { margin-top: 4px; font-size: 14px; }

.family-member-list {
  display: grid;
  gap: 14px;
  padding-top: 22px;
}

.family-member-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(430px, 1.7fr);
  align-items: center;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  padding: 18px;
}

.family-member-card.is-saving {
  opacity: 0.68;
  pointer-events: none;
}

.family-member-card__person {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.family-member-card__avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.family-member-card__person strong,
.family-member-card__person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-member-card__person small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.sharing-role-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sharing-role-button {
  display: grid;
  min-height: 76px;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 9px 6px;
  cursor: pointer;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.sharing-role-button:hover {
  transform: translateY(-1px);
  border-color: rgba(197, 91, 63, 0.45);
}

.sharing-role-button > span:first-child { font-size: 24px; }
.sharing-role-button > span:last-child { font-size: 13px; }

.sharing-role-button.is-active {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sharing-role-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.sharing-safety-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 18px;
  border-radius: 18px;
  background: #e9f1ed;
  color: #315446;
  padding: 18px 20px;
}

.sharing-safety-note > span { font-size: 24px; }
.sharing-safety-note strong,
.sharing-safety-note p { display: block; margin: 0; }
.sharing-safety-note p { margin-top: 3px; font-size: 14px; }

.album-view {
  --trip-accent: #bd5c43;
  max-width: none;
  padding: 0 0 80px;
}

.album-hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  color: white;
  isolation: isolate;
}

.album-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 7px;
  background: var(--trip-accent);
  content: "";
  pointer-events: none;
}

.album-hero > img,
.album-hero__scrim {
  position: absolute;
  inset: 0;
}

.album-hero > img {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.album-hero__scrim {
  z-index: -1;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--trip-accent) 38%, transparent), transparent 50%),
    linear-gradient(180deg, rgba(18, 22, 20, 0.27), rgba(18, 22, 20, 0.22) 38%, rgba(18, 22, 20, 0.84));
}

.album-hero__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(26px, 5vw, 72px);
}

.album-hero__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 24px;
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.icon-button--glass {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(20, 25, 22, 0.28);
  color: white;
  backdrop-filter: blur(10px);
}

.album-hero__content {
  position: absolute;
  inset: auto clamp(26px, 5vw, 72px) 48px;
}

.album-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 20px;
  background: color-mix(in srgb, var(--trip-accent) 88%, transparent);
  font-size: 30px;
  backdrop-filter: blur(12px);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.74);
}

.album-hero h1 {
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(46px, 7vw, 76px);
  line-height: 1;
}

.album-hero__content > p:last-child {
  max-width: 640px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.album-toolbar,
.album-summary,
.photo-grid {
  margin-right: clamp(26px, 5vw, 72px);
  margin-left: clamp(26px, 5vw, 72px);
}

.album-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0 24px;
}

.segmented-control {
  display: inline-flex;
  border-radius: 999px;
  background: var(--paper-deep);
  padding: 4px;
}

.segmented-control button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 7px 17px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.segmented-control svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--trip-accent);
  box-shadow: 0 3px 12px rgba(50, 45, 37, 0.1);
}

.album-view .button--primary {
  background: var(--trip-accent);
}

.album-view .button--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--trip-accent) 82%, black);
}

.album-toolbar__actions {
  display: flex;
  gap: 10px;
}

.album-summary {
  display: flex;
  gap: clamp(28px, 5vw, 70px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 21px 0;
}

.album-summary div {
  display: flex;
  flex-direction: column;
}

.album-summary strong {
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 18px;
}

.album-summary span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.itinerary-panel {
  margin: 30px clamp(26px, 5vw, 72px) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(20px, 3vw, 30px);
}

.itinerary-panel__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.itinerary-panel__heading h2 {
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(24px, 3vw, 32px);
}

.itinerary-manage-button__icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 17px;
}

.itinerary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.itinerary-card {
  position: relative;
  display: grid;
  min-height: 112px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--paper);
  padding: 13px;
  cursor: pointer;
  color: var(--muted);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.itinerary-card::after {
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 70px;
  height: 70px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.08;
}

.itinerary-card:hover {
  border-color: color-mix(in srgb, var(--trip-accent) 45%, transparent);
  transform: translateY(-2px);
}

.itinerary-card.is-active {
  border-color: var(--trip-accent);
  background: color-mix(in srgb, var(--trip-accent) 12%, white);
  color: color-mix(in srgb, var(--trip-accent) 76%, black);
  box-shadow: 0 7px 20px rgba(145, 60, 41, 0.12);
}

.itinerary-card__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  font-size: 27px;
}

.itinerary-card:first-child .itinerary-card__icon {
  border-radius: 50%;
}

.itinerary-card__copy strong,
.itinerary-card__copy small {
  display: block;
}

.itinerary-card__copy strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.itinerary-card__copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.itinerary-card__marker {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.itinerary-card.is-active .itinerary-card__marker {
  background: var(--trip-accent);
  color: white;
}

.photo-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 12px;
  padding-top: 28px;
}

.photo-tile {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: #ded7cc;
  padding: 0;
  cursor: zoom-in;
}

.photo-tile:nth-child(1),
.photo-tile:nth-child(6) {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-tile:nth-child(4) {
  grid-column: span 2;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease, filter 500ms ease;
}

.photo-tile:hover img {
  filter: saturate(1.08);
  transform: scale(1.035);
}

.photo-tile__label {
  position: absolute;
  inset: auto 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 9px;
  background: rgba(24, 26, 24, 0.56);
  color: white;
  padding: 8px 10px;
  font-size: 10px;
  opacity: 0;
  backdrop-filter: blur(8px);
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.photo-tile:hover .photo-tile__label,
.photo-tile:focus-visible .photo-tile__label {
  opacity: 1;
  transform: translateY(0);
}

.photo-tile__video {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(20, 22, 20, 0.62);
  color: white;
  padding: 5px 8px;
  font-size: 10px;
  backdrop-filter: blur(8px);
}

.photo-tile__stop {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 78px);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--ink);
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.photo-grid__empty {
  display: flex;
  min-height: 310px;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #b8b3a9;
  border-radius: 18px;
  background: var(--surface);
  padding: 32px;
  text-align: center;
}

.photo-grid__empty > span {
  display: grid;
  width: 78px;
  height: 78px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 24px;
  background: var(--accent-soft);
  font-size: 34px;
}

.photo-grid__empty strong {
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 21px;
}

.photo-grid__empty small {
  margin: 6px 0 18px;
  color: var(--muted);
}

.dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 28px 90px rgba(30, 30, 27, 0.32);
}

.dialog::backdrop {
  background: rgba(25, 28, 25, 0.62);
  backdrop-filter: blur(4px);
}

.dialog__header,
.dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
}

.dialog--login {
  width: min(520px, calc(100vw - 32px));
}

.login-dialog__header {
  justify-content: flex-start;
}

.login-dialog__brand {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: #20231f;
  font-size: 30px;
}

.login-dialog__body {
  display: grid;
  gap: 20px;
}

.login-dialog__body > p:first-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-status {
  min-height: 24px;
  margin: 0;
  border-radius: 10px;
  background: #eef5ed;
  padding: 10px 12px;
  color: #365442;
  font-size: 12px;
  font-weight: 700;
}

.login-status.is-error {
  background: #fff0ec;
  color: #9b402f;
}

.login-dialog__footer .button {
  width: 100%;
  justify-content: center;
}

.password-field-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.password-field-row input {
  min-width: 0;
  flex: 1 1 auto;
}

.password-field-row .button {
  flex: 0 0 auto;
  padding: 10px 13px;
}

.dialog__header {
  border-bottom: 1px solid var(--line);
}

.dialog__header h2 {
  margin: 0;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 26px;
}

.dialog__body {
  padding: 26px;
}

.dialog__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.split-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 30px;
}

.editor-fields {
  display: grid;
  gap: 23px;
}

.field,
.field-group {
  display: grid;
  gap: 9px;
  margin: 0;
  border: 0;
  padding: 0;
}

.field > span,
.field-group legend {
  font-size: 12px;
  font-weight: 800;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  padding: 12px 13px;
  color: var(--ink);
}

.field small {
  color: var(--muted);
  font-size: 10px;
}

.icon-options,
.color-options,
.background-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.icon-options input,
.color-options input,
.background-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.icon-options label > span {
  display: grid;
  min-width: 67px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px 7px;
  cursor: pointer;
  font-size: 21px;
}

.icon-options small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.icon-options input:checked + span,
.background-options input:checked + span {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(197, 91, 63, 0.12);
}

.swatch {
  position: relative;
  display: flex;
  min-width: 88px;
  height: 46px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch::before {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border: 3px solid white;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 1px currentColor;
  content: "";
}

.swatch i {
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.swatch--persimmon { color: #bd5c43; }
.swatch--indigo { color: #3b526d; }
.swatch--forest { color: #4e6d5c; }
.swatch--plum { color: #785268; }

.color-options input:checked + .swatch {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 9%, white);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
}

.color-options label:nth-child(1) { color: #bd5c43; }
.color-options label:nth-child(2) { color: #3b526d; }
.color-options label:nth-child(3) { color: #4e6d5c; }
.color-options label:nth-child(4) { color: #785268; }

.background-options label > span {
  display: flex;
  width: 130px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  padding-bottom: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.background-options img {
  width: 100%;
  height: 66px;
  margin-bottom: 7px;
  object-fit: cover;
}

.theme-preview {
  position: sticky;
  top: 0;
  align-self: start;
}

.theme-preview > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.theme-preview__card {
  position: relative;
  min-height: 355px;
  overflow: hidden;
  border: 5px solid var(--preview-accent, #bd5c43);
  border-radius: 18px;
  background: #38453e;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--preview-accent, #bd5c43) 24%, transparent);
  color: white;
  isolation: isolate;
}

.theme-preview__card > img,
.theme-preview__veil {
  position: absolute;
  inset: 0;
}

.theme-preview__card > img {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-preview__veil {
  z-index: -1;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--preview-accent, #bd5c43) 58%, transparent), transparent 54%),
    linear-gradient(180deg, transparent, rgba(19, 23, 21, 0.88));
}

.theme-preview__content {
  position: absolute;
  inset: auto 22px 22px;
  border-left: 5px solid var(--preview-accent, #bd5c43);
  padding-left: 14px;
}

.theme-preview__content span,
.theme-preview__content strong,
.theme-preview__content small {
  display: block;
}

.theme-preview__content span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 14px;
  background: var(--preview-accent, #bd5c43);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--preview-accent, #bd5c43) 55%, transparent);
  font-size: 22px;
}

.theme-preview__content strong {
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 25px;
}

.theme-preview__content small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.theme-persimmon { --preview-accent: #bd5c43; }
.theme-indigo { --preview-accent: #3b526d; }
.theme-forest { --preview-accent: #4e6d5c; }
.theme-plum { --preview-accent: #785268; }

.dialog--upload {
  width: min(590px, calc(100vw - 32px));
}

.dialog--guide {
  width: min(1120px, calc(100vw - 32px));
  overflow: hidden;
}

.guide-dialog__shell {
  display: grid;
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.dialog--guide .dialog__body {
  overflow-y: auto;
}

.guide-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 15px;
  background: #f2eee6;
  padding: 13px 16px;
}

.guide-intro > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: white;
  font-size: 23px;
}

.guide-intro strong,
.guide-intro small {
  display: block;
}

.guide-intro strong {
  font-size: 14px;
}

.guide-intro small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.guide-topic-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 22px;
}

.guide-topic-tabs button {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--paper);
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
}

.guide-topic-tabs button > span {
  font-size: 26px;
}

.guide-topic-tabs button strong {
  font-size: 13px;
}

.guide-topic-tabs button.is-active {
  border-color: currentColor;
  background: white;
  color: var(--accent-dark);
  box-shadow: 0 7px 20px rgba(47, 44, 37, 0.1);
}

.guide-topic-tabs button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.guide-panel[hidden] {
  display: none;
}

.guide-flow__heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.guide-flow__heading > span {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: #e5f0e9;
  font-size: 27px;
}

.guide-panel--upload .guide-flow__heading > span { background: #eee6f0; }
.guide-panel--download .guide-flow__heading > span { background: #e7efe7; }

.guide-flow__heading p,
.guide-flow__heading h3 {
  margin: 0;
}

.guide-flow__heading p {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 900;
}

.guide-flow__heading h3 {
  margin-top: 2px;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 21px;
}

.guide-flow__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-instruction {
  position: relative;
  display: grid;
  min-height: 246px;
  align-content: start;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfaf7;
  padding: 18px 13px 15px;
  text-align: center;
}

.guide-instruction__number {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.guide-instruction__icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 7px 0 12px;
  place-items: center;
  border-radius: 22px;
  background: #e5f0e9;
  font-size: 35px;
}

.guide-panel--upload .guide-instruction__icon { background: #eee6f0; }

.guide-instruction strong,
.guide-download-path strong {
  font-size: 14px;
}

.guide-instruction p,
.guide-download-path p {
  margin: 6px 0 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.guide-button-sample {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 6px 11px;
  font-size: 10px;
  font-weight: 900;
}

.guide-button-sample--accent {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.guide-result {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  border-radius: 13px;
  background: #eaf2ec;
  color: #365b47;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 800;
}

.guide-result > span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #416b52;
  color: white;
}

.guide-download-paths {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
}

.guide-download-path {
  border: 1px solid #bed2c4;
  border-radius: 18px;
  background: #f0f6f1;
  padding: 15px;
}

.guide-download-path--many {
  border-color: #c7c9df;
  background: #f2f2f8;
}

.guide-download-path h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
}

.guide-download-path h4 > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #426b53;
  color: white;
  font-size: 12px;
}

.guide-download-path--many h4 > span {
  background: #5a607e;
}

.guide-download-path ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-download-path li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}

.guide-download-path li > span {
  font-size: 21px;
  font-weight: 900;
}

.guide-download-path p {
  margin-bottom: 5px;
}

.dialog__footer--center {
  justify-content: center;
}

.button--large {
  min-width: 190px;
  min-height: 52px;
  font-size: 15px;
}

.dialog--stops {
  width: min(820px, calc(100vw - 32px));
  overflow: hidden;
}

.dialog--stops form {
  display: grid;
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog--stops .dialog__body {
  overflow: auto;
}

.dialog--stops .dialog__footer {
  position: static;
}

.stop-editor {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
}

.stop-editor h3 {
  margin: 0 0 14px;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: 19px;
}

.stop-editor__current {
  border-radius: 16px;
  background: var(--paper);
  padding: 18px;
}

.stop-manager-list {
  display: grid;
  gap: 8px;
}

.stop-manager-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px;
}

.stop-manager-item > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: white;
  font-size: 22px;
}

.stop-manager-item small,
.stop-manager-item strong {
  display: block;
}

.stop-manager-item small {
  color: var(--muted);
  font-size: 9px;
}

.stop-manager-item strong {
  margin-top: 2px;
  font-size: 12px;
}

.stop-manager-list__empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stop-editor__new {
  display: grid;
  align-content: start;
  gap: 19px;
}

.stop-icon-options label > span {
  min-width: 64px;
}

.stop-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 2px solid var(--accent);
  border-radius: 15px;
  background: #fbebe5;
  padding: 13px;
}

.stop-preview > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: white;
  font-size: 27px;
}

.stop-preview small,
.stop-preview strong {
  display: block;
}

.stop-preview small {
  color: var(--muted);
  font-size: 9px;
}

.stop-preview strong {
  margin-top: 2px;
  font-size: 15px;
}

.drop-zone {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #a5a69f;
  border-radius: 18px;
  background: var(--paper);
  padding: 30px;
  cursor: pointer;
  text-align: center;
}

.upload-destination {
  margin-bottom: 14px;
  border: 1px solid #d9d5cc;
  border-radius: 15px;
  background: #fffdfa;
  padding: 14px;
}

.upload-destination__heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.upload-destination__heading > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  font-size: 21px;
}

.upload-destination__heading strong,
.upload-destination__heading small {
  display: block;
}

.upload-destination__heading small,
.upload-destination > p {
  color: var(--muted);
  font-size: 11px;
}

.upload-destination__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.upload-destination__fields label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
}

.upload-destination__fields select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9c4bb;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}

.upload-destination > p {
  margin: 9px 0 0;
}

.upload-destination > p.is-warning {
  color: #9a4b2f;
  font-weight: 700;
}

.drop-zone:hover {
  border-color: var(--accent);
  background: #fbf4ef;
}

.drop-zone__icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 27px;
  font-weight: 800;
}

.drop-zone > span:not(.drop-zone__icon, .button) {
  max-width: 390px;
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 11px;
}

.selected-files {
  margin-top: 12px;
  border-radius: 11px;
  background: #f2eee7;
  color: var(--muted);
  padding: 11px 13px;
  font-size: 11px;
}

.upload-progress {
  margin-top: 12px;
  border: 1px solid #d9d5cc;
  border-radius: 13px;
  background: white;
  padding: 13px;
}

.upload-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress span,
.upload-progress small {
  color: var(--muted);
  font-size: 11px;
}

.upload-progress small {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.upload-progress progress {
  width: 100%;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--accent);
}

.storage-warning {
  display: flex;
  gap: 11px;
  margin-top: 13px;
  border: 1px solid #e7c683;
  border-radius: 13px;
  background: #fff6df;
  color: #6f5018;
  padding: 13px;
  font-size: 11px;
}

.storage-warning p {
  margin: 0;
}

.privacy-note {
  display: flex;
  gap: 11px;
  margin-top: 17px;
  border-radius: 13px;
  background: #eaf0ec;
  color: #3d594b;
  padding: 13px;
  font-size: 11px;
}

.privacy-note p {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
  border: 0;
  background: rgba(14, 16, 14, 0.97);
  color: white;
  padding: 0;
}

.lightbox::backdrop {
  background: #101210;
}

.lightbox figure {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 64px clamp(42px, 8vw, 120px) 42px;
}

.lightbox__image-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  place-items: center;
}

.lightbox figure img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  max-height: none;
  border-radius: 9px;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -50%) rotate(var(--lightbox-rotation, 0deg));
  transform-origin: center center;
}

.lightbox figcaption {
  display: flex;
  width: min(900px, 100%);
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
}

.lightbox figcaption span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
}

.lightbox__close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 27px;
}

.lightbox__nav {
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 37px;
  transform: translateY(-50%);
}

.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }

.profile-popover {
  position: fixed;
  z-index: 90;
  right: 22px;
  top: 80px;
  display: grid;
  width: 250px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  padding: 17px;
  box-shadow: var(--shadow);
}

.profile-popover[hidden] {
  display: none;
}

.profile-popover span {
  color: var(--muted);
  font-size: 11px;
}

.profile-popover button {
  margin-top: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--paper);
  padding: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 28px;
  max-width: calc(100vw - 32px);
  border-radius: 999px;
  background: #242722;
  color: white;
  padding: 11px 18px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1020px) {
  :root {
    --sidebar-width: 92px;
  }

  .sidebar {
    align-items: center;
    padding-right: 13px;
    padding-left: 13px;
  }

  .brand > span:last-child,
  .nav-item span,
  .storage-card,
  .profile-card > span:nth-child(2),
  .profile-card > svg {
    display: none;
  }

  .primary-nav {
    width: 100%;
  }

  .nav-item {
    justify-content: center;
    padding: 13px;
  }

  .profile-card {
    display: grid;
    width: auto;
    grid-template-columns: auto;
    margin-top: auto;
  }

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

  .recent-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions .quick-action:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

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

  .guide-flow__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .prototype-banner {
    min-height: 30px;
    font-size: 10px;
  }

  .app-shell {
    display: block;
    padding-top: 30px;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    width: 100%;
  }

  .mobile-header {
    position: sticky;
    top: 30px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(248, 245, 239, 0.92);
    padding: 12px 18px;
    backdrop-filter: blur(16px);
  }

  .brand--mobile {
    gap: 9px;
  }

  .brand--mobile .brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand--mobile .brand__mark svg {
    width: 24px;
    height: 24px;
  }

  .brand--mobile strong {
    font-size: 16px;
  }

  .mobile-header__tools {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .avatar--button {
    width: 44px;
    height: 44px;
    border: 0;
    cursor: pointer;
  }

  .access-icon {
    width: 44px;
    height: 44px;
  }

  .view {
    padding: 32px 17px 116px;
  }

  .page-heading {
    display: grid;
    gap: 20px;
    margin-bottom: 26px;
  }

  .page-heading h1 {
    font-size: 34px;
  }

  .page-heading .button {
    width: 100%;
  }

  .page-heading__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .page-heading__actions .button--primary {
    grid-column: 1 / -1;
  }

  .recent-heading .button {
    width: 100%;
  }

  .recent-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .recent-toolbar .segmented-control {
    align-self: center;
  }

  .recent-count {
    text-align: center;
  }

  .recent-toolbar__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .recent-toolbar__actions .button {
    width: 100%;
  }

  .recent-status {
    min-height: 230px;
    flex-direction: column;
    padding: 25px 20px;
    text-align: center;
  }

  .recent-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 20px;
  }

  .recent-media-card {
    border-radius: 13px;
  }

  .recent-media-card__copy {
    padding: 9px 10px 11px;
  }

  .recent-media-card__type {
    top: 7px;
    right: 7px;
  }

  .access-button {
    min-height: 48px;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 22px;
  }

  .quick-action {
    min-height: 146px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    padding: 14px 10px;
    text-align: center;
  }

  .quick-action__icon {
    width: 66px;
    height: 66px;
  }

  .quick-action__icon svg {
    width: 39px;
    height: 39px;
  }

  .quick-action__copy strong {
    font-size: 19px;
  }

  .quick-action__arrow {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .featured-trip {
    min-height: 455px;
    border-radius: 21px;
  }

  .featured-trip > img {
    object-position: 68% center;
  }

  .featured-trip__veil {
    background: linear-gradient(180deg, rgba(24, 35, 31, 0.04) 10%, rgba(24, 35, 31, 0.88) 84%);
  }

  .featured-trip__content {
    justify-content: flex-end;
    padding: 26px 23px 32px;
  }

  .featured-trip__content > p {
    margin-top: 18px;
  }

  .featured-trip h2 {
    font-size: 54px;
  }

  .section-heading {
    margin-top: 48px;
  }

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

  .trip-card {
    min-height: 390px;
  }

  .family-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .family-sharing-view {
    padding: 30px 17px 108px;
  }

  .family-sharing-heading {
    padding-right: 0;
    padding-left: 0;
  }

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

  .sharing-explainer > div {
    min-height: 100px;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: start;
    align-content: center;
    column-gap: 10px;
    padding: 14px 16px;
    text-align: left;
  }

  .sharing-explainer span {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 34px;
  }

  .sharing-settings {
    border-radius: 22px;
    padding: 18px 14px;
  }

  .sharing-settings__head {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .sharing-journey-picker {
    min-width: 0;
  }

  .family-status {
    min-height: 210px;
    flex-direction: column;
    text-align: center;
  }

  .family-member-card {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .sharing-role-options {
    gap: 6px;
  }

  .sharing-role-button {
    min-height: 82px;
    padding: 8px 4px;
  }

  .sharing-role-button > span:last-child {
    font-size: 12px;
  }

  .album-view {
    padding: 0 0 108px;
  }

  .album-hero {
    min-height: 510px;
  }

  .album-hero__topbar {
    padding: 18px;
  }

  .album-hero__actions {
    gap: 6px;
  }

  .album-hero__actions .button--glass {
    width: 44px;
    overflow: hidden;
    padding: 0;
    white-space: nowrap;
  }

  .album-hero__actions .button--glass span {
    font-size: 18px;
  }

  .album-hero__content {
    inset: auto 20px 34px;
  }

  .album-toolbar,
  .album-summary,
  .photo-grid {
    margin-right: 17px;
    margin-left: 17px;
  }

  .itinerary-panel {
    margin: 22px 17px 0;
    padding: 18px 14px;
  }

  .itinerary-panel__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .itinerary-manage-button {
    width: 100%;
  }

  .itinerary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .itinerary-card {
    min-height: 142px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    padding: 12px 9px;
    text-align: center;
  }

  .itinerary-card__icon {
    width: 64px;
    height: 64px;
    font-size: 31px;
  }

  .itinerary-card__copy strong {
    font-size: 13px;
  }

  .itinerary-card__marker {
    position: absolute;
    top: 9px;
    right: 9px;
  }

  .album-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    align-self: center;
  }

  .album-toolbar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .album-summary {
    gap: 12px;
    justify-content: space-between;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 160px;
    gap: 7px;
  }

  .photo-tile:nth-child(1),
  .photo-tile:nth-child(6) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .photo-tile:nth-child(4) {
    grid-column: auto;
  }

  .photo-tile__label {
    opacity: 1;
    transform: none;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    height: 74px;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.95);
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
  }

  .mobile-nav button svg {
    width: 21px;
    height: 21px;
  }

  .mobile-nav button.is-active {
    color: var(--accent-dark);
  }

  .mobile-nav .mobile-nav__add {
    align-self: start;
    width: 52px;
    height: 52px;
    justify-self: center;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    transform: translateY(-20px);
    box-shadow: 0 9px 24px rgba(36, 39, 34, 0.28);
  }

  .mobile-nav__add span {
    font-size: 25px;
  }

  .split-editor {
    grid-template-columns: 1fr;
  }

  .theme-preview {
    position: static;
    order: -1;
  }

  .theme-preview__card {
    min-height: 230px;
  }

  .guide-dialog__shell {
    max-height: calc(100dvh - 16px);
  }

  .dialog--guide .dialog__body {
    padding: 16px;
  }

  .guide-intro {
    align-items: flex-start;
    padding: 11px;
  }

  .guide-topic-tabs {
    gap: 6px;
    margin: 12px 0 18px;
  }

  .guide-topic-tabs button {
    min-height: 78px;
    flex-direction: column;
    gap: 3px;
    padding: 8px 4px;
  }

  .guide-topic-tabs button > span {
    font-size: 25px;
  }

  .guide-topic-tabs button strong {
    font-size: 11px;
  }

  .guide-flow__heading {
    align-items: flex-start;
  }

  .guide-flow__heading h3 {
    font-size: 18px;
    line-height: 1.35;
  }

  .guide-flow__steps {
    grid-template-columns: 1fr;
  }

  .guide-instruction {
    min-height: 0;
    grid-template-columns: 38px 54px minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    gap: 9px;
    padding: 11px;
    text-align: left;
  }

  .guide-instruction__number {
    position: static;
    width: 34px;
    height: 34px;
  }

  .guide-instruction__icon {
    width: 54px;
    height: 54px;
    margin: 0;
    border-radius: 16px;
    font-size: 27px;
  }

  .guide-instruction p {
    margin: 3px 0 7px;
  }

  .guide-button-sample {
    min-height: 32px;
  }

  .guide-download-paths {
    grid-template-columns: 1fr;
  }

  .stop-editor {
    grid-template-columns: 1fr;
  }

  .stop-editor__current {
    order: 2;
  }

  .dialog__header,
  .dialog__body,
  .dialog__footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .password-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .password-field-row input {
    grid-column: 1 / -1;
  }

  .dialog--upload {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .dialog--upload form {
    display: grid;
    max-height: calc(100dvh - 16px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .dialog--upload .dialog__body {
    overflow-y: auto;
  }

  .dialog--upload .drop-zone {
    min-height: 220px;
    padding: 22px 16px;
  }

  .upload-destination__fields {
    grid-template-columns: 1fr;
  }

  .dialog--upload .dialog__footer .button {
    min-height: 48px;
  }

  .lightbox figure {
    padding: 72px 12px 70px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 16px;
  }

  .lightbox__nav--prev { left: calc(50% - 58px); }
  .lightbox__nav--next { right: calc(50% - 58px); }

  .lightbox figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 12px 6px 0;
  }

  .toast {
    bottom: 88px;
  }
}

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