:root {
  --bg: #0f1116;
  --card: #1a1f2e;
  --text: #fff;
  --muted: #aab;
  --accent: #ffd166;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  min-height: 100vh;
  padding: 16px;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
header { text-align: center; margin-bottom: 24px; }
h1 { font-size: 26px; }
h2 { font-size: 16px; margin: 16px 0 12px; color: var(--muted); }
section { max-width: 720px; margin: 0 auto; }

.trip-card, .schedule-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.trip-card:hover, .schedule-card:hover { border-color: var(--accent); }
.trip-card .title { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.trip-card .meta { font-size: 13px; color: var(--muted); }

.schedule-card .when { font-size: 14px; color: var(--accent); font-weight: bold; }
.schedule-card .title { font-size: 16px; margin: 4px 0; }
.schedule-card .memo { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.schedule-card.done {
  opacity: 0.5;
}
.schedule-card.done .title {
  text-decoration: line-through;
}

button {
  background: var(--accent);
  color: #0f1116;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  font-family: inherit;
}
button.link {
  background: transparent;
  color: var(--muted);
  width: auto;
  margin: 0 0 12px;
  padding: 4px 0;
  font-weight: normal;
  font-size: 14px;
}
button.danger {
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  font-weight: normal;
  margin-top: 24px;
}
button.del {
  background: transparent;
  color: var(--muted);
  width: auto;
  padding: 4px 8px;
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: normal;
}

dialog {
  background: var(--card);
  color: var(--text);
  border: none;
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 90%;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h3 { margin-bottom: 16px; font-size: 18px; }
dialog label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
dialog input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}
dialog input:focus { outline: none; border-color: var(--accent); }
.actions { display: flex; gap: 8px; margin-top: 16px; }
.actions button { margin: 0; flex: 1; }
.actions button[data-action="cancel"] { background: #333; color: var(--text); }

.empty { text-align: center; color: var(--muted); padding: 32px 16px; font-size: 14px; }

.schedule-card .thumb {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin: 8px 0 4px;
  cursor: zoom-in;
}
.schedule-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.schedule-card .row button {
  margin: 0;
}
.photo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
  padding: 16px;
}
.photo-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}
