:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(17, 20, 32, 0.68);
  --panel-strong: rgba(25, 29, 44, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f7fb;
  --muted: #a7afc2;
  --soft: #737d96;
  --cyan: #68e6ff;
  --green: #9df0c6;
  --amber: #ffd38a;
  --rose: #ff8aa3;
  --violet: #b7a6ff;
  --shadow: 0 30px 120px rgba(0, 0, 0, 0.5);
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
  background: #f0fff3;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(244, 255, 237, 0.42), transparent 42%),
    linear-gradient(0deg, rgba(44, 72, 39, 0.22), rgba(255, 159, 74, 0.08));
}

body.home-view {
  overflow-x: hidden;
  color: #173329;
}

body.home-view::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 42vh;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(57, 54, 25, 0.42));
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 16% 10%, rgba(233, 255, 224, 0.72) 0%, rgba(168, 230, 174, 0.48) 32%, transparent 58%),
    radial-gradient(ellipse at 82% 20%, rgba(255, 170, 82, 0.68) 0%, rgba(232, 126, 54, 0.24) 36%, transparent 62%),
    radial-gradient(ellipse at 52% 78%, rgba(184, 238, 190, 0.48) 0%, rgba(79, 143, 94, 0.32) 36%, transparent 66%),
    linear-gradient(135deg, #dff9df 0%, #a9dca9 38%, #85c395 62%, #de8d4d 100%);
  background-size: 120% 120%;
  transform: translate3d(0, 0, 0);
}

.wallpaper::before,
.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wallpaper::before {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.18) 24%, transparent 32% 100%),
    linear-gradient(145deg, transparent 0 48%, rgba(255, 177, 88, 0.18) 58%, transparent 72% 100%);
  opacity: 0.58;
}

.wallpaper::after {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.2), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(28, 50, 25, 0.42));
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 82%);
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 56px;
  min-height: 100vh;
}

.topbar,
.breadcrumbs,
.hero,
.workspace {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.home-view .topbar {
  position: sticky;
  top: 0;
  justify-content: center;
  padding-top: 0;
  z-index: 3;
}

.home-view .brand {
  position: absolute;
  left: 0;
}

.home-view .status-pill {
  position: absolute;
  right: 0;
}

.home-view .topbar::before {
  content: "Home   About   Review   Archive   Contact";
  display: block;
  white-space: pre;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 0;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  color: rgba(22, 49, 39, 0.78);
  background: linear-gradient(135deg, rgba(235, 255, 226, 0.58), rgba(255, 168, 83, 0.28));
  padding: 16px 34px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px) saturate(125%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  transition: transform 180ms ease;
}

.brand:hover {
  transform: translateY(-2px);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(104, 230, 255, 0.95), rgba(157, 240, 198, 0.8)),
    radial-gradient(circle at 70% 70%, white, transparent 32%);
  box-shadow: 0 0 42px rgba(104, 230, 255, 0.34);
}

.brand-title,
.brand-subtitle {
  display: block;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0;
}

.home-view .brand-title {
  color: #173329;
}

.home-view .brand-subtitle,
.home-view .status-pill,
.home-view .eyebrow {
  color: rgba(23, 51, 41, 0.68);
}

.brand-subtitle,
.eyebrow,
.meta,
.breadcrumbs,
.empty-copy {
  color: var(--muted);
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 10px 14px;
  backdrop-filter: blur(8px) saturate(125%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 22px;
  font-size: 13px;
}

.home-view .breadcrumbs {
  display: none;
}

.crumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  padding: 7px 11px;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

button.crumb:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.hero {
  max-width: 880px;
  margin-bottom: 28px;
  transition: opacity 160ms ease;
}

.travel-hero {
  display: grid;
  justify-items: center;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: clamp(46px, 8vh, 86px) 0 clamp(28px, 5vh, 54px);
  text-align: center;
}

.hero.compact {
  opacity: 0.72;
}

.hero.compact.travel-hero {
  display: block;
  min-height: auto;
  margin-bottom: 28px;
  padding-top: 0;
  text-align: left;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.travel-hero h1 {
  max-width: min(1100px, 100%);
  margin: -10px 0 10px;
  text-transform: uppercase;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(18, 43, 33, 0.9);
  text-shadow: 0 14px 56px rgba(24, 57, 43, 0.22);
}

.hero.compact.travel-hero h1 {
  max-width: 850px;
  margin-bottom: 18px;
  text-transform: none;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  color: #c7cede;
  font-size: 17px;
  line-height: 1.7;
}

.travel-hero .eyebrow {
  font-size: 14px;
  letter-spacing: 0.42em;
}

.travel-hero .hero-copy {
  width: min(760px, 100%);
  max-width: none;
  color: rgba(23, 51, 41, 0.72);
  text-shadow: none;
}

.hero.compact.travel-hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
}

.hero.compact.travel-hero .hero-copy {
  width: auto;
  max-width: 650px;
  color: #c7cede;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(310px, 100%);
  height: 54px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  color: rgba(20, 47, 36, 0.84);
  background: linear-gradient(135deg, rgba(236, 255, 228, 0.58), rgba(255, 166, 82, 0.3));
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px) saturate(125%);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  color: #061018;
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.78);
}

.hero.compact .hero-cta {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-view .workspace {
  margin-top: 0;
  padding-bottom: 34px;
}

.home-view .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  max-width: 880px;
  margin: 0 auto;
}

.section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  position: relative;
  --glare-x: 50%;
  --glare-y: 20%;
  --lift: 0px;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    var(--panel);
  padding: 22px;
  text-align: left;
  box-shadow: var(--shadow);
  backdrop-filter: none;
  transform: none;
  opacity: 0;
  animation: fadeIn 240ms ease forwards;
  transition:
    transform 160ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.home-view .card {
  min-height: 142px;
  border-color: rgba(255, 255, 255, 0.34);
  color: #173329;
  background:
    linear-gradient(145deg, rgba(238, 255, 226, 0.54), rgba(255, 174, 91, 0.22)),
    rgba(236, 255, 230, 0.28);
  box-shadow: 0 22px 90px rgba(33, 57, 38, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px) saturate(125%);
}

.home-view .card-content {
  min-height: 106px;
}

.home-view .card-kicker {
  font-size: 11px;
  opacity: 0.9;
}

.home-view .card-title {
  margin-top: 14px;
  font-size: 21px;
}

.home-view .card-copy {
  color: rgba(23, 51, 41, 0.62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.home-view .card-footer {
  font-size: 12px;
  color: rgba(23, 51, 41, 0.62);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--glare-x) var(--glare-y), rgba(255, 255, 255, 0.28), transparent 7rem),
    radial-gradient(circle at 25% 0%, color-mix(in srgb, var(--accent) 44%, transparent), transparent 16rem),
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  opacity: 0.72;
  transition: opacity 180ms ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 28%, rgba(255, 255, 255, 0.08));
  opacity: 0.42;
  mask-image: linear-gradient(#000, transparent 58%);
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
  box-shadow: 0 36px 140px rgba(0, 0, 0, 0.62), 0 0 48px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-2px);
}

.card:active,
.note-row:active,
.primary-button:active,
.ghost-button:active,
.danger-button:active,
.crumb:active {
  transform: translateY(1px) scale(0.99);
}

.card:hover::before {
  opacity: 0.95;
}

.card-content {
  position: relative;
  display: flex;
  min-height: 184px;
  flex-direction: column;
}

.card-kicker,
.meta {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-kicker {
  color: var(--accent);
}

.card-title {
  margin: 18px 0 12px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.card-copy {
  color: #c4cbda;
  line-height: 1.58;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  color: var(--muted);
}

.arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}

.card:hover .arrow {
  transform: translateX(3px);
  color: #061018;
  background: var(--accent);
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 27, 0.68);
  backdrop-filter: none;
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 0%, rgba(255, 255, 255, 0.09), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 42%);
  opacity: 0.72;
}

.panel > * {
  position: relative;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel h2 {
  margin-bottom: 6px;
  font-size: 28px;
  letter-spacing: 0;
}

.note-list {
  display: grid;
  gap: 12px;
}

.note-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  padding: 16px;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.note-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(104, 230, 255, 0.16), transparent 14rem);
  opacity: 0;
  transition: opacity 180ms ease;
}

.note-row:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.09);
}

.note-row:hover::before {
  opacity: 1;
}

.note-row > * {
  position: relative;
}

.note-title {
  margin-bottom: 7px;
  font-weight: 800;
  line-height: 1.25;
}

.note-preview {
  color: var(--muted);
  line-height: 1.45;
}

.note-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
}

.empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
  padding: 32px;
}

.empty h2,
.empty h3 {
  margin-bottom: 8px;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, rgba(104, 230, 255, 0.95), rgba(157, 240, 198, 0.9));
  color: #061018;
  border: 0;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: 0 12px 40px rgba(104, 230, 255, 0.22);
}

.ghost-button,
.danger-button {
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
}

.danger-button {
  color: #ffd5dc;
  border-color: rgba(255, 138, 163, 0.36);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
}

.ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  left: var(--ripple-x);
  top: var(--ripple-y);
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 244, 225, 0.5);
  transform: translate(-50%, -50%) scale(1);
  animation: touchPulse 420ms ease-out forwards;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden,
.hidden {
  display: none;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: none;
}

.editor-panel {
  position: relative;
  width: min(760px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(12, 15, 25, 0.96);
  box-shadow: var(--shadow);
  padding: 22px;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.editor-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

.editor-panel input,
.editor-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  outline: 0;
  padding: 13px 14px;
}

.editor-panel textarea {
  resize: vertical;
  min-height: 220px;
  line-height: 1.65;
}

.editor-panel input:focus,
.editor-panel textarea:focus {
  border-color: rgba(104, 230, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(104, 230, 255, 0.1);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-spacer {
  flex: 1;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes touchPulse {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(22);
  }
}

@keyframes bottomInText {
  from {
    opacity: 0;
    transform: translateY(120px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes topIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 920px) {
  .grid,
  .section-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-view .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .home-view .topbar {
    justify-content: flex-start;
  }

  .home-view .brand {
    position: static;
  }

  .home-view .topbar::before {
    display: none;
  }

  .status-pill {
    display: none;
  }

  h1 {
    font-size: 42px;
  }

  .travel-hero {
    min-height: 0;
    padding: 42px 0 26px;
  }

  .travel-hero h1 {
    font-size: clamp(44px, 16vw, 74px);
    letter-spacing: 0.02em;
  }

  .travel-hero .eyebrow {
    letter-spacing: 0.18em;
  }

  .home-view .workspace {
    margin-top: 0;
  }

  .grid,
  .section-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .home-view .grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 190px;
  }

  .home-view .card {
    min-height: 128px;
  }

  .card-content {
    min-height: 146px;
  }

  .panel-head,
  .editor-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .note-row {
    grid-template-columns: 1fr;
  }
}
