:root {
  --bg: #F4EFE6;
  --bg2: #FBF7F0;
  --ink: #1C1A17;
  --ink2: #56514A;
  --ink3: #8A847A;
  --accent: #A8392E;
  --accent-soft: #E8C8C0;
  --rule: rgba(28, 26, 23, 0.10);
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Layout */
.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px 32px;
}

/* Header */
.header {
  display: flex;
  align-items: baseline;
  padding: 12px 0 14px;
}
.header h1 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0;
  font-weight: 400;
  line-height: 1.05;
}
.header h1 em { display: block; font-style: italic; font-weight: 400; }
.header .meta {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--ink2);
}
.rule { height: 0.5px; background: var(--rule); margin-bottom: 18px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 12px;
}
.tile {
  cursor: pointer;
}
.tile-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000 center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.tile-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.55) 100%);
}
.tile-name {
  position: absolute;
  left: 12px; bottom: 10px;
  color: white;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  z-index: 1;
}
.tile-name em { display: block; font-style: italic; }
.tile-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink2);
}
.tile-foot .min { color: var(--ink3); }

/* Detail */
.hero {
  position: relative;
  width: 100%;
  height: 300px;
  background: #000 center/cover no-repeat;
  margin: 0 -20px;
  width: calc(100% + 40px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18), transparent 30%, transparent 70%, var(--bg));
}
.back {
  position: absolute;
  top: 16px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  font-size: 18px;
  font-weight: 600;
}
.title-block {
  padding-top: 4px;
}
.area {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 8px;
}
.title-block h2 {
  font-family: var(--serif);
  font-size: 30px;
  margin: 6px 0 0;
  font-weight: 400;
  line-height: 1.05;
}
.title-block h2 em { display: block; font-style: italic; }
.description {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.5;
  margin-top: 14px;
}
.summary {
  display: flex;
  gap: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 16px;
  color: var(--ink2);
}
.summary .sep { color: var(--ink3); }
.title-block hr {
  border: 0;
  height: 0.5px;
  background: var(--rule);
  margin: 14px 0 0;
}

/* Start block */
.start {
  margin-top: 18px;
}
.start .label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--ink3);
  font-weight: 500;
}
.start .where {
  font-family: var(--serif);
  font-size: 16px;
  margin-top: 8px;
  line-height: 1.4;
}
.start .maps {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(168,57,46,0.55);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* Segment list */
.segments { margin-top: 24px; padding-bottom: 220px; }
.segment {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--rule);
  cursor: pointer;
}
.segment:last-child { border-bottom: 0; }
.segment .badge {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  flex-shrink: 0;
  transition: all 0.2s;
}
.segment.current .badge {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.segment .text {
  flex: 1;
  min-width: 0;
}
.segment .seg-title {
  font-family: var(--serif);
  font-size: 16px;
}
.segment.current .seg-title { font-weight: 600; }
.segment .status {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--ink3);
  margin-top: 3px;
}
.segment.current .status { color: var(--accent); }
.segment .upnext-icon {
  color: var(--accent);
  font-size: 22px;
  display: none;
}
.segment.upnext .upnext-icon { display: block; animation: pulse 1.2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1.0; transform: scale(1.08); }
}
.segment .progress {
  height: 2px;
  background: var(--rule);
  margin-top: 4px;
  display: none;
  position: relative;
  overflow: hidden;
}
.segment.current.has-progress .progress { display: block; }
.segment .progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  width: 0;
}

/* Player bar */
.player-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: 20px;
  background: rgba(28, 26, 23, 0.96);
  border-radius: 20px;
  padding: 14px 18px;
  color: white;
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
  display: none;
  max-width: 696px;
  margin: 0 auto;
}
.player-bar.show { display: block; }
.pb-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pb-title .left { flex: 1; min-width: 0; }
.pb-title .seg-label {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-title .now {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-title .time {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.pb-progress {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  margin-top: 10px;
  cursor: pointer;
}
.pb-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 999px;
  width: 0;
}
.pb-progress .mark {
  position: absolute;
  top: -2px;
  width: 1.5px;
  height: 8px;
  background: rgba(255,255,255,0.55);
  pointer-events: none;
}
.pb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 10px;
}
.pb-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 16px;
}
.pb-btn[disabled] { color: rgba(255,255,255,0.22); cursor: default; }
.pb-play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.pb-skip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 0.5px solid rgba(255,255,255,0.1);
}
.pb-rate {
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  font-family: -apple-system-rounded, var(--sans);
}

.hidden { display: none !important; }
