/* Apple-like: light, airy typography + soft depth */

.pl-shell {
    font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
    font-feature-settings: "kern" 1;
    -webkit-font-smoothing: antialiased;
    color: #1d1d1f;
    line-height: 1.5;
    background: linear-gradient(165deg, #f5f5f7 0%, #ececf1 45%, #e3e3e8 100%);
    border-radius: 24px;
    padding: 4px 0 28px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.pl-body {
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px);
    max-width: 960px;
}

.pl-body--narrow {
    max-width: 440px;
}

.pl-body--wide {
    max-width: 960px;
}

.pl-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pl-header--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.pl-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: #0d0d0f;
}

.pl-header .pl-title:last-child {
    margin-bottom: 0;
}

.pl-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #6e6e73;
    font-weight: 400;
}

.pl-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 20px;
    padding: 1.25rem 1.25rem 1.1rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.06);
}

.pl-field {
    margin-bottom: 1rem;
}

.pl-field:last-of-type {
    margin-bottom: 0;
}

.pl-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #86868b;
    margin-bottom: 0.35rem;
}

.pl-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.pl-input::placeholder {
    color: #aeaeb2;
}

.pl-input:hover {
    background: #ebebed;
}

.pl-input:focus {
    background: #fff;
    border-color: rgba(0, 113, 227, 0.35);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

textarea.pl-input.pl-textarea,
.pl-textarea.pl-input {
    display: block;
    width: 100%;
    min-height: 10rem;
    padding: 0.85rem 1rem;
    line-height: 1.55;
    resize: vertical;
    font-family: inherit;
    border-radius: 12px;
}

.pl-input--file {
    padding: 0.45rem 0;
    font-size: 0.875rem;
    background: transparent;
    border: none;
}

.pl-input--file:focus {
    box-shadow: none;
}

.pl-image-preview {
    margin-top: 0.5rem;
}

.pl-image-preview__img {
    display: block;
    width: 280px;
    max-width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.pl-search-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 0.75rem;
}

.pl-search-wrap__icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    z-index: 1;
    width: 1.125rem;
    height: 1.125rem;
    transform: translateY(-50%);
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E")
        center / contain no-repeat;
    opacity: 0.85;
}

.pl-input--search {
    margin-bottom: 0.75rem;
    border-radius: 999px;
    padding: 0.75rem 1.15rem 0.75rem 3rem;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
}

.pl-search-wrap .pl-input--search {
    margin-bottom: 0;
}

.pl-input--search:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.pl-input--search:focus {
    background-color: #fff;
    border-color: rgba(0, 113, 227, 0.45);
    box-shadow:
        0 0 0 4px rgba(0, 113, 227, 0.12),
        0 8px 28px rgba(0, 113, 227, 0.08);
}

.pl-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M1 1.5L6 6l5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.25rem;
}

.pl-segment {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: #f5f5f7;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.pl-segment__btn {
    flex: 1;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    color: #6e6e73;
    background: transparent;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.pl-segment__btn--active {
    background: #fff;
    color: #1d1d1f;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pl-stars {
    display: flex;
    gap: 0.35rem;
    padding-top: 0.15rem;
}

.pl-star {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.15rem;
    color: #d2d2d7;
    transition: color 0.15s, transform 0.1s;
}

.pl-star:hover {
    transform: scale(1.08);
}

.pl-star.is-on {
    color: #ffb800;
}

.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.pl-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.pl-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pl-btn--primary {
    margin-top: 1.25rem;
    background: linear-gradient(180deg, #0a84ff 0%, #0071e3 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
}

.pl-btn--small {
    width: auto;
    margin-top: 0;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 999px;
    text-decoration: none;
    background: #0071e3;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* 追加リンクが押下時に赤／紫に変わらないよう固定（モバイルのタップハイライトも無効化済み） */
a.pl-btn--small:link,
a.pl-btn--small:visited,
a.pl-btn--small:hover,
a.pl-btn--small:active {
    color: #fff;
    background: #0071e3;
}

a.pl-btn--small:hover {
    background: #0077ed;
}

a.pl-btn--small:active {
    background: #0066cc;
    transform: none;
    opacity: 1;
}

.pl-footer-link {
    text-align: center;
    margin: 1rem 0 0;
}

.pl-link {
    font-size: 0.8125rem;
    color: #0071e3;
    text-decoration: none;
}

.pl-link:hover {
    text-decoration: underline;
}

/* 一覧へ：タップ・訪問済みで赤／紫にならない */
a.pl-link--footer,
a.pl-link--footer:link,
a.pl-link--footer:visited,
a.pl-link--footer:hover,
a.pl-link--footer:active {
    color: #0071e3;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

a.pl-link--footer:hover {
    text-decoration: underline;
}

a.pl-link--footer:active {
    color: #0066cc;
    opacity: 1;
}

.pl-toolbar {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pl-chips--prefecture .pl-chip--pref {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
}

.pl-select--filter {
    max-width: 260px;
    min-width: 180px;
}

.pl-chip {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #f5f5f7;
    color: #6e6e73;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.pl-chip--active {
    background: #0071e3;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.pl-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.pl-column {
    min-width: 0;
}

@media (min-width: 768px) {
    .pl-columns {
        grid-template-columns: 1fr 1fr;
    }

    .pl-columns--want-first .pl-column:nth-child(1) {
        order: 2;
    }

    .pl-columns--want-first .pl-column:nth-child(2) {
        order: 1;
    }
}

.pl-column__title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #0d0d0f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pl-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #f5f5f7;
    color: #6e6e73;
}

.pl-record-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---------- 記録一覧カード ---------- */
.pl-place-card {
    text-align: left;
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1rem 0.75rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

/* 場所名の直下にアップロード写真（固定枠） */
.pl-place-card__head {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pl-place-card__titlewrap {
    box-sizing: border-box;
    padding: 0.15rem 0 0.35rem;
    border: none;
    background: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.pl-place-card__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.8vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    color: #1d1d1f;
    line-height: 1.35;
    font-feature-settings: "palt" 1;
    word-break: break-word;
}

.pl-place-card__body {
    margin-top: 0.65rem;
}

.pl-place-card__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.4rem;
}

.pl-place-card__rating--empty {
    margin-bottom: 0.4rem;
}

.pl-place-card__rating-num {
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1d1d1f;
}

.pl-place-card__rating-muted {
    font-size: 0.8125rem;
    color: #86868b;
}

.pl-place-card__rating-count {
    font-size: 0.8125rem;
    color: #6e6e73;
    font-variant-numeric: tabular-nums;
}

.pl-place-card__starbar {
    position: relative;
    display: inline-block;
    font-size: 0.875rem;
    line-height: 1;
    letter-spacing: 0.06em;
}

.pl-place-card__starbar-track {
    color: #d2d2d7;
}

.pl-place-card__starbar-fill {
    position: absolute;
    left: 0;
    top: 0;
    color: #ffb800;
    overflow: hidden;
    white-space: nowrap;
    width: calc(var(--fill, 0) * 100%);
    pointer-events: none;
}

/* ジャンル・ステータス・日付（従来行）＋ 地図リンク */
.pl-place-card__metarow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
}

.pl-place-card__metaleft {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    min-width: 0;
}

.pl-place-card__genre-chip {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.pl-place-card__date-line {
    font-size: 0.6875rem;
    color: #86868b;
    font-variant-numeric: tabular-nums;
}

.pl-place-card__maps-link {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0071e3;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.pl-place-card__maps-link:hover {
    text-decoration: underline;
}

.pl-place-card__photo-frame {
    width: 280px;
    max-width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background: #eceef2;
    border: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.pl-place-card__photo-frame--empty {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 45%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E")
        center / 36px no-repeat,
        #eceef2;
}

.pl-place-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.pl-place-card__comment {
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #f5f5f7;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.pl-place-card__comment-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #1d1d1f;
    white-space: pre-wrap;
    word-break: break-word;
}

.pl-place-card__details {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 0.35rem;
}

.pl-place-card__summary {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0071e3;
    cursor: pointer;
    padding: 0.35rem 0;
    list-style: none;
}

.pl-place-card__summary::-webkit-details-marker {
    display: none;
}

.pl-place-card__history {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.5rem;
}

.pl-place-card__history--single {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 0.35rem;
}

.pl-place-card__mono {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pl-place-card__actionbtn {
    flex: 1;
    min-height: 44px;
    padding: 0.5rem 0.65rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.pl-place-card__actionbtn--edit {
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
}

.pl-place-card__actionbtn--edit:hover {
    background: rgba(0, 113, 227, 0.16);
}

.pl-place-card__actionbtn--del {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.pl-place-card__actionbtn--del:hover {
    background: rgba(255, 59, 48, 0.16);
}

.pl-place-card__actionbtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pl-history-row {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
}

.pl-history-row__main {
    flex: 1;
    min-width: 0;
    text-align: left;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: rgba(245, 245, 247, 0.9);
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
}

.pl-history-row__main:hover {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 113, 227, 0.2);
}

.pl-history-row__main:active {
    transform: scale(0.992);
}

.pl-history-row__delete {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.35rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: inherit;
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.08);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.pl-history-row__delete:hover {
    background: rgba(255, 59, 48, 0.15);
}

.pl-history-row__delete:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pl-history-row__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.25rem;
}

.pl-history-badge {
    font-size: 0.625rem;
    font-weight: 700;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.12);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.pl-history-row__date {
    font-size: 0.6875rem;
    color: #86868b;
    font-variant-numeric: tabular-nums;
    flex: 1;
    min-width: 0;
}

.pl-history-row__stars {
    font-size: 0.8125rem;
    color: #ffb800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.pl-history-row__stars--empty {
    color: #aeaeb2;
    font-size: 0.6875rem;
    font-style: italic;
    letter-spacing: normal;
}

.pl-history-row__memo {
    margin: 0;
    font-size: 0.8125rem;
    color: #424245;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.pl-record-card__memo--empty {
    color: #aeaeb2;
    font-style: italic;
}

.pl-empty {
    font-size: 0.875rem;
    color: #86868b;
    padding: 0.5rem 0;
}

.pl-no-scroll {
    overflow: hidden;
}

.pl-image-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.84);
}

.pl-image-modal[hidden] {
    display: none !important;
}

.pl-image-modal__img {
    max-width: min(96vw, 1200px);
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.pl-image-modal__close {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
