:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --ink: #132530;
  --muted: #4d6270;
  --line: #d6e0e7;
  --card: #ffffff;
  --brand: #0f6a7f;
  --brand-2: #da6f2c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 20% -10%, #d8eef7 0%, transparent 35%), var(--bg);
  color: var(--ink);
  font-family: 'Manrope', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans KR', sans-serif;
}

a {
  color: var(--brand);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.app-quickbar-shell {
  position: sticky;
  top: 4.35rem;
  z-index: 18;
  padding: 0.55rem 1rem 0;
}

.app-quickbar {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(10, 41, 61, 0.08);
}

.app-quickbar-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 0 0.2rem;
}

.app-quickbar a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0.3rem 0.62rem;
  font-size: 0.88rem;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  color: var(--brand);
}

.app-nav {
  display: flex;
  gap: 0.75rem;
}

.app-nav a {
  text-decoration: none;
}

.app-container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(10, 41, 61, 0.07);
}

h1,
h2,
h3 {
  margin: 0 0 0.65rem;
  line-height: 1.25;
}

p {
  margin: 0 0 0.65rem;
}

.muted {
  color: var(--muted);
}

.btn,
button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover,
button:hover {
  filter: brightness(0.98);
}

.btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: none;
}

.btn-secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.6rem 0.65rem;
  font: inherit;
  background: #fff;
}

label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
}

.inline {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-field {
  display: grid;
  gap: 0.2rem;
  min-width: 150px;
}

.inline-field input {
  min-width: 110px;
}

.grid {
  display: grid;
  gap: 0.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.list {
  display: grid;
  gap: 0.55rem;
}

.list-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem;
}

.list-item.is-dragging {
  opacity: 0.65;
  border-style: dashed;
}

.list-item.drop-before {
  box-shadow: inset 0 3px 0 var(--brand);
}

.list-item.drop-after {
  box-shadow: inset 0 -3px 0 var(--brand);
}

.item-edit-shell {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
}

.item-edit-form {
  gap: 0.7rem;
}

.item-edit-actions {
  margin-top: 0.2rem;
}

.item-edit-status {
  margin: 0;
  min-height: 1.2rem;
}

.share-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.share-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.share-copy a {
  word-break: break-all;
}

.share-expiry-form {
  padding-top: 0.2rem;
  border-top: 1px dashed var(--line);
}

.day-action-grid {
  display: grid;
  gap: 0.75rem;
}

.action-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fcfe 0%, #ffffff 100%);
  padding: 0.9rem;
}

.readiness-shell {
  display: grid;
  gap: 0.8rem;
}

.readiness-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.readiness-kpi {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
}

.readiness-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.readiness-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.8rem;
}

.readiness-item.is-ready {
  border-color: rgba(15, 122, 68, 0.24);
  background: #f1fbf5;
}

.readiness-item.is-missing {
  border-color: rgba(218, 111, 44, 0.24);
  background: #fff8f1;
}

.readiness-item p:last-child {
  margin-bottom: 0;
}

.action-row {
  margin-top: 0.6rem;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.45rem 0.75rem;
  border: 1px dashed var(--brand);
  border-radius: 999px;
  background: #eef7fa;
  color: var(--brand);
  font-weight: 700;
  cursor: grab;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.plain-list {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

.plain-list li {
  display: grid;
  gap: 0.15rem;
}

.plain-list.compact {
  margin-top: 0.55rem;
  gap: 0.3rem;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.notice {
  border-left: 4px solid var(--brand-2);
  background: #fff8f1;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}

details {
  margin-top: 0.8rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.auth-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr;
  margin-bottom: 0.45rem;
}

.auth-widget {
  display: grid;
  gap: 0.7rem;
}

.auth-flow {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.auth-step {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #f6f9fb;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-step.active {
  border-color: var(--brand);
  background: #eef7fb;
  color: var(--brand);
}

.auth-step.done {
  border-color: rgba(15, 122, 68, 0.22);
  background: #eefaf3;
  color: #0f7a44;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-status-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fbfdff;
}

.auth-status-list {
  margin: 0.6rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
}

.auth-banner {
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  font-weight: 600;
}

.auth-banner.error {
  background: #fff1f1;
  border-color: #e5a4a4;
  color: #b42318;
}

.auth-banner.success {
  background: #eefaf3;
  border-color: #a8d9bd;
  color: #0f7a44;
}

.auth-banner.info {
  background: #eef7fb;
  border-color: #b6d4e0;
  color: var(--ink);
}

.auth-caption {
  margin-top: -0.1rem;
}

.google-attribution {
  margin-top: 0.8rem;
  font-size: 0.86rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 0.6rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(19, 37, 48, 0.42);
}

.modal-card {
  width: min(560px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 22px 48px rgba(10, 41, 61, 0.22);
}

.trip-picker-list {
  margin-top: 0.85rem;
}

.trip-picker-option {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.trip-picker-option:hover {
  border-color: var(--brand);
  background: #f4fbfd;
}

.review-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
}

.trip-map-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.reservation-item {
  background: linear-gradient(180deg, #f7fbfd 0%, #ffffff 100%);
}

.reservation-list-compact {
  border-top: 1px dashed var(--line);
  padding-top: 0.65rem;
}

.import-shell {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
}

.import-shell summary {
  cursor: pointer;
  font-weight: 600;
}

.import-shell[open] summary {
  margin-bottom: 0.7rem;
}

.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 760px) {
  .app-header {
    flex-wrap: wrap;
  }

  .app-quickbar-shell {
    top: 6.5rem;
  }

  .app-nav {
    width: 100%;
    overflow-x: auto;
  }

  .app-quickbar {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}
