:root {
    --bg: #fafafa;
    --surface: #fff;
    --border: #e5e7eb;
    --text: #111827;
    --text-muted: #6b7280;
    --accent: #16a34a;
    --accent-bg: #dcfce7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 18px 0;
}
.brand {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 3px;
}

main { padding: 32px 0 64px; }

/* Search */
.search {
    display: flex;
    gap: 8px;
    max-width: 560px;
    margin: 0 auto 24px;
}
.search input {
    flex: 1;
    padding: 13px 16px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-transform: uppercase;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    background: var(--surface);
}
.search input:focus { outline: none; border-color: var(--text); }
.search button {
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    background: var(--text);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
}
.search button:hover { background: #000; }
.search button:disabled { opacity: 0.5; cursor: wait; }

/* Status */
.status {
    max-width: 560px;
    margin: 0 auto 24px;
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 14px;
}
.status--info  { background: #f3f4f6; color: var(--text-muted); }
.status--error { background: var(--danger-bg); color: var(--danger); }

/* Result wrapper */
.result { margin-top: 8px; }

/* Timeline */
.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.timeline__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.timeline__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
}
.timeline__icon svg { width: 22px; height: 22px; }
.timeline__item--completed .timeline__icon {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}
.timeline__title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.timeline__label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.timeline__value { font-size: 13px; font-weight: 500; }
.timeline__value-hint { color: var(--text-muted); font-weight: 400; font-size: 11px; }

@media (max-width: 720px) {
    .timeline { grid-template-columns: repeat(2, 1fr); }
    .timeline::before { display: none; }
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.card__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card__rows { display: flex; flex-direction: column; gap: 10px; }
.card__row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    font-size: 14px;
    align-items: start;
}
.card__row__label { color: var(--text-muted); }
.card__row__value { color: var(--text); word-break: break-word; }
.card__row__value--mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.card__copy {
    margin-left: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-muted);
}
.card__copy:hover { color: var(--text); border-color: var(--text); }
.card__copy.is-copied { color: var(--accent); border-color: var(--accent); }

/* Photos */
.photos {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.photos__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.photos__buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.photos__btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, transform 0.15s;
    padding: 0;
    font: inherit;
    color: inherit;
}
.photos__btn:not(:disabled):hover { border-color: var(--text); transform: translateY(-1px); }
.photos__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.photos__btn--active { border-color: var(--text); border-width: 2px; }
.photos__btn-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #f3f4f6;
    display: block;
}
.photos__btn-empty {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}
.photos__btn-info { padding: 10px 12px; }
.photos__btn-label { font-weight: 600; font-size: 13px; }
.photos__btn-count { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.photos__gallery {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.photos__gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    background: #f3f4f6;
    border: 1px solid var(--border);
}

/* Map */
.map-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.map-section__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
}
.map {
    height: 380px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.lightbox__img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    user-select: none;
}
.lightbox__close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 30px;
    line-height: 1;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }
.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 64px;
    font-size: 38px;
    line-height: 1;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 0;
    cursor: pointer;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.lightbox__nav--prev { left: 16px; border-radius: 0 8px 8px 0; }
.lightbox__nav--next { right: 16px; border-radius: 8px 0 0 8px; }
.lightbox__counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 12px;
}
