/* Place Log Pro DB — v2.3.0 Magazine-style design */

/* ========== Base shell ========== */
.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 32px;
    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: 460px; }
.pl-body--wide   { max-width: 960px; }

/* ========== Header ========== */
.pl-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

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

.pl-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

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

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

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

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

/* ========== Form fields ========== */
.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: 9rem;
    padding: 0.85rem 1rem;
    line-height: 1.55;
    resize: vertical;
    font-family: inherit;
    border-radius: 12px;
}

.pl-input--date {
    cursor: pointer;
    font-size: 1rem;
    color: #1d1d1f;
    letter-spacing: 0.02em;
}

.pl-input--date::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
    filter: none;
}

.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: 260px;
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ========== Search ========== */
.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);
}

.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);
}

/* ========== Select ========== */
.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;
}

/* ========== Segment toggle ========== */
.pl-segment {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: #f5f5f7;
    border-radius: 14px;
    margin-bottom: 1.1rem;
}

.pl-segment--large {
    margin-bottom: 1.25rem;
}

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

.pl-segment--large .pl-segment__btn {
    font-size: 0.9375rem;
    padding: 0.75rem 0.5rem;
}

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

/* ========== Stars ========== */
.pl-stars {
    display: flex;
    gap: 0.3rem;
    padding-top: 0.15rem;
}

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

.pl-star:hover { transform: scale(1.1); }
.pl-star.is-on { color: #ffb800; }

/* ========== Buttons ========== */
.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.95rem 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 {
    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 1.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;
}

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; }

/* ========== Footer link ========== */
.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;
}

a.pl-link--footer:hover { text-decoration: underline; }
a.pl-link--footer:active { color: #0066cc; }

/* ========== Expand toggle (progressive disclosure) ========== */
.pl-expand-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6e6e73;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pl-expand-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0071e3;
}

.pl-expand-toggle__icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.pl-details-panel {
    margin-top: 0.75rem;
}

.pl-details-panel[hidden] { display: none; }

/* ========== Sync bar ========== */
.pl-sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0, 113, 227, 0.14);
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.06);
}

.pl-sync-bar__left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.pl-sync-bar__icon {
    flex-shrink: 0;
    color: #0071e3;
}

.pl-sync-bar__text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
}

.pl-sync-bar__status {
    font-size: 0.75rem;
    color: #86868b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-sync-bar__status--none { color: #ff3b30; }

.pl-sync-bar__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
    border: none;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.pl-sync-bar__btn:hover { background: rgba(0, 113, 227, 0.18); }
.pl-sync-bar__btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ========== Toolbar & Chips ========== */
.pl-toolbar {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

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

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

.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: rgba(255, 255, 255, 0.75);
    color: #6e6e73;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.pl-chip:hover { border-color: rgba(0, 0, 0, 0.12); }

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

.pl-chip--rating {
    color: #a07800;
    letter-spacing: 0.05em;
}

.pl-chip--rating.pl-chip--active {
    background: #ffb800;
    color: #3d2e00;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(255, 184, 0, 0.4);
}

/* ========== Columns (kanban) ========== */
.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: 1rem;
    font-weight: 700;
    margin: 0 0 0.875rem;
    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: rgba(255, 255, 255, 0.75);
    color: #6e6e73;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

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

/* ========== Place card — photo-first magazine style ========== */
.pl-place-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.pl-place-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 36px rgba(0, 0, 0, 0.13);
}

/* Hero image area */
.pl-place-card__hero {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(160deg, #e8ecf2 0%, #d4dae6 100%);
}

.pl-place-card__hero--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pl-place-card__hero--empty .pl-place-card__genre-badge {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.55);
}

/* Column-tinted empty states */
[data-pl-column="want"] .pl-place-card__hero--empty {
    background: linear-gradient(160deg, #ece8f5 0%, #ddd7ef 100%);
}

[data-pl-column="done"] .pl-place-card__hero--empty {
    background: linear-gradient(160deg, #e8f3ed 0%, #d4eadc 100%);
}

.pl-place-card__hero--empty::after {
    content: '';
    width: 40px;
    height: 40px;
    opacity: 0.2;
    background: 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='%23555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

.pl-place-card__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.pl-place-card:hover .pl-place-card__hero-img {
    transform: scale(1.04);
}

/* Bottom gradient scrim — readability for genre badge */
.pl-place-card__hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

/* Genre badge anchored to bottom-left of hero */
.pl-place-card__hero-foot {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.pl-place-card__genre-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Visit count pill — inside content area */
.pl-place-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.pl-place-card__visit-pill {
    flex-shrink: 0;
    margin-top: 0.2rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

/* Content area */
.pl-place-card__content {
    padding: 0.9rem 1rem 0;
    flex: 1;
}

.pl-place-card__title {
    margin: 0;
    flex: 1;
    font-size: clamp(1rem, 2.5vw, 1.175rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    line-height: 1.3;
    word-break: break-word;
    font-feature-settings: "palt" 1;
}

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

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

.pl-place-card__rating-count {
    font-size: 0.75rem;
    color: #86868b;
    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__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    font-size: 0.75rem;
    color: #86868b;
    margin-bottom: 0.6rem;
}

.pl-place-card__meta-sep { color: #c7c7cc; }

.pl-place-card__comment {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #424245;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer action bar */
.pl-place-card__footer {
    padding: 0.7rem 1rem 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pl-place-card__map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0071e3;
    text-decoration: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

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

.pl-place-card__footer-actions {
    display: flex;
    gap: 0.4rem;
}

.pl-place-card__actionbtn {
    padding: 0.35rem 0.8rem;
    min-height: 32px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    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;
}

/* History details (multi-visit) */
.pl-hist-details { margin-top: 0; }

.pl-hist-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0071e3;
    cursor: pointer;
    list-style: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.pl-hist-summary::-webkit-details-marker { display: none; }

.pl-hist-chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.pl-hist-details[open] .pl-hist-chevron {
    transform: rotate(180deg);
}

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

/* History rows */
.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.3rem 0.5rem;
    font-size: 0.75rem;
    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;
}

.pl-history-row__delete:hover { background: rgba(255, 59, 48, 0.16); }
.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;
}

/* ---- iOS Shortcut setup ---- */
.pl-ios-setup {
    margin-top: 1.25rem;
    background: rgba(245, 245, 247, 0.7);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
}

.pl-ios-setup__summary {
    padding: 0.85rem 1.1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
}

.pl-ios-setup__summary::-webkit-details-marker { display: none; }
.pl-ios-setup__summary::after {
    content: '▸';
    margin-left: auto;
    color: #aeaeb2;
    font-size: 0.75rem;
    transition: transform 0.2s;
}
.pl-ios-setup[open] .pl-ios-setup__summary::after { transform: rotate(90deg); }

.pl-ios-setup__body {
    padding: 0 1.1rem 1rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.pl-ios-setup__desc {
    font-size: 0.75rem;
    color: #6e6e73;
    line-height: 1.55;
    margin: 0.75rem 0 0.85rem;
}

.pl-ios-setup__row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.pl-ios-setup__label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pl-ios-setup__value {
    display: block;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
    color: #1d1d1f;
    word-break: break-all;
    font-family: 'SF Mono', 'Fira Code', monospace;
    cursor: text;
    user-select: all;
}

.pl-ios-setup__hint {
    font-size: 0.6875rem;
    color: #aeaeb2;
    margin: 0.25rem 0 0;
}

/* ---- Bookmarklet card ---- */
.pl-bookmarklet {
    margin-top: 1.5rem;
    background: rgba(245, 245, 247, 0.7);
    border: 1.5px dashed rgba(0, 113, 227, 0.3);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1rem;
    text-align: center;
}

.pl-bookmarklet__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.4rem;
}

.pl-bookmarklet__desc {
    font-size: 0.75rem;
    color: #6e6e73;
    line-height: 1.55;
    margin: 0 0 0.9rem;
}

.pl-bookmarklet__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.25rem;
    background: #0071e3;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 999px;
    text-decoration: none;
    cursor: grab;
    transition: background 0.15s, transform 0.12s;
    user-select: none;
}

.pl-bookmarklet__btn:hover {
    background: #0077ed;
    transform: scale(1.03);
    color: #fff;
}

.pl-bookmarklet__btn:active {
    cursor: grabbing;
    transform: scale(0.97);
}

.pl-bookmarklet__hint {
    font-size: 0.6875rem;
    color: #aeaeb2;
    margin: 0.65rem 0 0;
}

.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;
}

/* ========== Empty state ========== */
.pl-empty {
    text-align: center;
    padding: 2.5rem 1rem;
}

.pl-empty__icon {
    font-size: 2.25rem;
    opacity: 0.5;
    margin-bottom: 0.6rem;
}

.pl-empty__text {
    margin: 0;
    font-size: 0.875rem;
    color: #86868b;
}

/* ========== Calendar date filter ========== */
.pl-cal-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6e6e73;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.pl-cal-toggle:hover {
    background: rgba(255, 255, 255, 1);
    color: #1d1d1f;
}

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

.pl-cal-toggle--active:hover {
    background: #0077ed;
    color: #fff;
}

.pl-cal-panel[hidden] { display: none; }

.pl-cal {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-radius: 16px;
    padding: 1rem 1rem 1.1rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.06),
        0 8px 28px rgba(0, 0, 0, 0.1);
}

.pl-cal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.pl-cal__nav-btn {
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    color: #0071e3;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.15rem 0.6rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.pl-cal__nav-btn:hover { background: rgba(0, 113, 227, 0.1); }

.pl-cal__month {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.025em;
}

.pl-cal__week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.35rem;
}

.pl-cal__dow {
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #86868b;
    padding: 0.1rem 0;
}

.pl-cal__dow--sun { color: #ff3b30; }
.pl-cal__dow--sat { color: #0071e3; }

.pl-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.pl-cal__day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-size: 0.8125rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    border-radius: 50%;
    border: none;
    cursor: default;
    background: transparent;
    color: #1d1d1f;
    padding: 0;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}

.pl-cal__day--out,
.pl-cal__day--empty { color: #c7c7cc; }

.pl-cal__day--has {
    cursor: pointer;
    font-weight: 700;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
}

.pl-cal__day--has:hover { background: rgba(0, 113, 227, 0.2); }

.pl-cal__day--sun.pl-cal__day--has { color: #ff3b30; background: rgba(255, 59, 48, 0.1); }
.pl-cal__day--sat.pl-cal__day--has { color: #0071e3; }

.pl-cal__day--today {
    box-shadow: inset 0 0 0 1.5px rgba(0, 113, 227, 0.55);
}

.pl-cal__day--today.pl-cal__day--empty,
.pl-cal__day--today.pl-cal__day--out {
    color: rgba(0, 113, 227, 0.5);
}

.pl-cal__day--sel {
    background: #0071e3 !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.4) !important;
}

/* ========== Draft Inbox (input page) ========== */
.pl-draft-inbox { margin-bottom: 1.5rem; }
.pl-draft-inbox[hidden] { display: none; }

.pl-draft-inbox__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.pl-draft-inbox__badge {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.pl-draft-inbox__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.pl-draft-inbox__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pl-draft-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.pl-draft-item:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }

.pl-draft-item__main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    text-align: left;
    padding: 0.8rem 0.8rem 0.8rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.08s;
}

.pl-draft-item__main:hover { background: rgba(0, 113, 227, 0.04); }
.pl-draft-item__main:active { transform: scale(0.99); }

.pl-draft-item__del {
    flex-shrink: 0;
    padding: 0 0.9rem;
    align-self: stretch;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    color: #c7c7cc;
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pl-draft-item__del:hover {
    background: rgba(255, 59, 48, 0.07);
    color: #ff3b30;
}

.pl-draft-item__del:disabled { opacity: 0.4; cursor: not-allowed; }

.pl-draft-item__type { font-size: 1.05rem; flex-shrink: 0; }

.pl-draft-item__name {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.pl-draft-item__pref {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #86868b;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.pl-draft-item__arrow {
    font-size: 1.1rem;
    color: #c7c7cc;
    flex-shrink: 0;
}
