/* ===== スタンプ取得状況リンク ===== */
.use-links {
    margin-bottom: 20px;
}

.use-links a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 9px 18px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 140, 0, 0.08);
    border: 1.5px solid rgba(255, 140, 0, 0.25);
    transition:
        background 0.18s,
        border-color 0.18s,
        transform 0.15s;
}

.use-links a:hover {
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 140, 0, 0.5);
    transform: translateY(-1px);
}

/* ===== スタンプリスト ===== */
.stamp-list-use {
    list-style: none;
    margin-top: 4px;
}

.stamp-list-use > li {
    margin-bottom: 10px;
}

/* ===== エリアセクションヘッダー ===== */
.stamp-list-use li.area-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    margin-bottom: 12px;
    padding: 9px 14px;
    background: linear-gradient(90deg, rgba(255, 140, 0, 0.1), rgba(255, 77, 125, 0.04), transparent);
    border-left: 4px solid #ff8c00;
    border-radius: 0 10px 10px 0;
}

.stamp-list-use li.area-section-header:first-child {
    margin-top: 10px;
}

.area-section-heading {
    font-size: 0.92rem;
    font-weight: 800;
    color: #cc5500;
    margin: 0;
    letter-spacing: 0.02em;
}

/* ===== アコーディオンカード ===== */
.stamp-accordion-item {
    background: #fff;
    border: 1.5px solid #ffe0b0;
    border-left: 4px solid #ff8c00;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.08);
    transition: box-shadow 0.2s;
}

.stamp-accordion-item.locked {
    border-left-color: #c8b8a0;
    border-color: #e8ddd4;
    opacity: 0.78;
}

.stamp-accordion-item.is-open {
    box-shadow: 0 5px 22px rgba(255, 140, 0, 0.18);
}

/* ===== アコーディオンヘッダー ===== */
.stamp-acc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.stamp-acc-header:hover {
    background: rgba(255, 140, 0, 0.04);
}

.stamp-acc-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    border: 2px solid #ffe0b0;
    background: #fff8f0;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.locked .stamp-acc-thumb {
    background: #f0ebe5;
    border-color: #e0d5c5;
}

.stamp-acc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.acc-locked-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: #b89870;
    font-style: italic;
}

.acc-no-img {
    font-size: 0.65rem;
    color: #c07840;
}

.stamp-acc-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #3d1a00;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stamp-acc-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff8c00, #ff4d7d);
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition:
        opacity 0.18s,
        transform 0.15s;
}

.stamp-acc-toggle:hover {
    opacity: 0.88;
    transform: scale(1.03);
}

.acc-arrow {
    font-size: 0.65rem;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    line-height: 1;
}

.stamp-accordion-item.is-open .acc-arrow {
    transform: rotate(180deg);
}

/* ===== アコーディオンボディ ===== */
.stamp-acc-body {
    border-top: 1.5px solid rgba(255, 140, 0, 0.18);
    padding: 18px 16px;
    background: linear-gradient(160deg, #fffaf5, #fff8fc);
}

.stamp-detail-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #3d1a00;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 140, 0, 0.18);
}

.stamp-detail-section {
    margin-bottom: 18px;
}

.stamp-detail-section:last-child {
    margin-bottom: 0;
}

.stamp-detail-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #cc5500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stamp-detail-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: linear-gradient(180deg, #ff8c00, #ff4d7d);
    border-radius: 2px;
    flex-shrink: 0;
}

.stamp-detail-desc {
    font-size: 0.88rem;
    color: #5c3800;
    line-height: 1.7;
    white-space: pre-line;
    margin: 0;
}

.stamp-detail-photo-img {
    width: 100%;
    border-radius: 10px;
    display: block;
    max-height: 240px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ffe0b0;
}

.stamp-detail-placeholder {
    padding: 14px;
    text-align: center;
    font-size: 0.82rem;
    color: #b89870;
    background: #f9f3ec;
    border-radius: 8px;
    border: 1px dashed #ddc090;
}

.stamp-detail-map-box {
    height: 190px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 140, 0, 0.25);
}

/* ===== カメラ起動ボタン ===== */
.stamp-detail-actions {
    margin-top: 18px;
}

.stamp-detail-actions .camera-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 13px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #ff8c00, #ff4d7d);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.35);
    transition:
        opacity 0.2s,
        transform 0.15s;
}

.stamp-detail-actions .camera-start-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.my-stamps-section {
    margin-top: 24px;
}

.my-stamps-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #334155;
}

.record-list {
    list-style: none;
}

.record-list li {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.record-list .record-thumb {
    width: 52px;
    height: 52px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.record-list .record-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.record-list .record-thumb.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #94a3b8;
}

.record-list .record-info {
    flex: 1;
}

.record-list .record-info strong {
    display: block;
    font-size: 0.95rem;
    color: #1e293b;
}

.record-list .record-info time {
    font-size: 0.8rem;
    color: #64748b;
}

.camera-wrap {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
}

.camera-wrap .camera-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-wrap .camera-header a {
    color: #93c5fd;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.camera-wrap .camera-header a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.camera-wrap .camera-status {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 5;
    margin: 0;
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* カメラ: デスクトップは750×750、スマホはヘッダー・保存ボタン以外を全画面表示 */
.camera-view {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 16px 100px;
    box-sizing: border-box;
}

.camera-view__frame {
    position: relative;
    overflow: hidden;
    width: 750px;
    height: 750px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    /* スマホでも枠は正方形（保存される 750×750 と見た目を一致させる）。
       iOS Safari の height:100% 潰れを避けるため vw/vh の具体値でサイズ指定する。 */
    .camera-view {
        position: relative;
        align-items: center;
        justify-content: center;
        padding: 56px 0 96px;
    }

    .camera-view__frame {
        width: min(92vw, 92vh, 750px);
        height: min(92vw, 92vh, 750px);
        max-width: none;
        max-height: none;
    }
}

.camera-view__frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-view__frame .overlay-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}

.camera-view__frame canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* インカメ（自撮り）時は鏡像表示。オーバーレイ画像は反転しない。 */
.camera-view__frame video.mirrored {
    transform: scaleX(-1);
}

.camera-wrap .camera-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    display: flex;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

.camera-wrap .camera-controls button {
    padding: 16px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}

.camera-wrap .camera-controls .btn-capture {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.camera-wrap .camera-controls .btn-switch-cam {
    padding: 16px 18px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.camera-wrap .camera-controls .btn-switch-cam:hover:not(:disabled) {
    transform: scale(1.02);
}

.camera-wrap .camera-controls .btn-capture:hover:not(:disabled) {
    transform: scale(1.02);
}

.camera-wrap .camera-controls .btn-capture:disabled {
    background: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.camera-wrap .camera-error {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 100px;
    z-index: 15;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.camera-wrap .camera-error p {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.camera-wrap .camera-error .btn-capture {
    margin: 0 auto;
}

.login-step {
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.login-step .rule-notice {
    font-size: 0.9rem;
    color: #047857;
    background: #ecfdf5;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #a7f3d0;
}
