/* Place app — list, detail, my_places */

.place-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px;
    color: #1a1a1a;
}

.place-header,
.place-detail-head {
    text-align: center;
    margin-bottom: 20px;
}

.place-title {
    margin: 0 0 6px;
    font-size: 1.8rem;
    color: #1a1a1a;
}

.place-subtitle {
    margin: 0 0 12px;
    color: #444;
    font-size: 0.95rem;
}

.place-cta,
.place-back {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    background: #2a2a2a;
    color: #e8e8e8;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #3a3a3a;
}

.place-cta:hover,
.place-back:hover {
    background: #3a3a3a;
}

.place-owner-line {
    color: #222;
    margin: 8px 0;
}

.place-budget {
    margin: 10px 0;
    color: #222;
}
.place-budget small {
    color: #555;
}

/* List */
.place-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.place-card {
    display: block;
    padding: 12px;
    background: #1f1f1f;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
}
.place-card:hover {
    border-color: #4a9d4a;
}

.place-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.place-card-id { color: #888; }
.place-card-owner { color: #eee; font-weight: 600; }

.place-card-meter {
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
}
.place-card-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a9d4a, #7ed97e);
}
.place-card-count {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #aaa;
    text-align: right;
}

.place-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #555;
    padding: 32px;
}

/* Legend */
.place-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
    font-size: 0.85rem;
    color: #222;
}
.legend-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid #000;
}
.legend-green  { background: #4a9d4a; }
.legend-red    { background: #c0392b; }
.legend-blue   { background: #2980b9; }
.legend-gold   { background: #d4a018; }
.legend-black  { background: #2b2b2b; border-color: #555; }

/* Grid */
.place-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-width: 520px;
    margin: 16px auto;
    padding: 8px;
    background: #111;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
}

.place-cell {
    background: #242424;
    border: 1px solid #2f2f2f;
    border-radius: 2px;
    aspect-ratio: 1 / 1;
    padding: 0;
    cursor: pointer;
    transition: transform .05s, border-color .1s;
}
.place-cell:hover:not(:disabled) {
    border-color: #fff;
    transform: scale(1.08);
}
.place-cell:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.place-cell.color-green  { background: #4a9d4a; border-color: #69b569; }
.place-cell.color-red    { background: #c0392b; border-color: #d65548; }
.place-cell.color-blue   { background: #2980b9; border-color: #3fa0d0; }
.place-cell.color-gold   { background: #d4a018; border-color: #e8b840; }
.place-cell.color-black  { background: #111; border-color: #444; }

/* Status */
.place-status {
    text-align: center;
    margin-top: 10px;
    min-height: 1.2em;
    font-size: 0.9rem;
}
.place-status.is-ok    { color: #2a7a2a; }
.place-status.is-error { color: #a03030; }

/* Mobile — minimum padding at 480px */
@media (max-width: 480px) {
    .place-wrap {
        padding: 12px 4px;
    }
    .place-title {
        font-size: 1.4rem;
    }
    .place-grid {
        padding: 4px;
        gap: 1px;
        max-width: 100%;
    }
    .place-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
