/* 2026-09 スマホ体験の改善分（style.css の後に読む）。まとめて外せるよう別ファイルにしている。 */

/* ---- タイルメニュー: ひとこと説明・おすすめ・危険コマンド ---- */
.qcmd-hint {
    margin: 8px 12px 4px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(99, 179, 237, 0.16);
    color: #d6ecff;
    font-size: 12.5px;
    line-height: 1.5;
}
.qcmd-section-label {
    padding: 10px 16px 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
}
.qcmd-item.qcmd-rec {
    margin: 2px 8px;
    width: calc(100% - 16px);
    border-radius: 8px;
    background: rgba(72, 187, 120, 0.22);
    font-weight: bold;
}
.qcmd-item.qcmd-rec .qcmd-item-cost {
    color: rgba(255, 255, 255, 0.75);
}
.qcmd-item.qcmd-danger .qcmd-item-name {
    color: #feb2b2;
}

/* ---- 📋 通常モード: 幅の狭い画面では 地図 → 入力 → 計画一覧 の縦積みにする ---- */
@media (max-width: 767px) {
    table.dev-classic,
    table.dev-classic > tbody,
    table.dev-classic > tbody > tr {
        display: block;
        width: 100%;
    }
    table.dev-classic > tbody > tr {
        display: flex;
        flex-direction: column;
    }
    table.dev-classic > tbody > tr > td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }
    table.dev-classic td.MapCell { order: 1; }
    table.dev-classic td.InputCell { order: 2; }
    table.dev-classic td.CommandCell { order: 3; }
    table.dev-classic td.MapCell .hako-map-container {
        min-height: 60vh;
    }
}

/* ---- 島を見つけた直後の「さっそく開発」 ---- */
.hako-start-card {
    margin: 16px auto;
    max-width: 520px;
    padding: 16px;
    border-radius: 14px;
    background: #f0fff4;
    border: 2px solid #68d391;
    text-align: center;
}
.hako-start-card h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #276749;
}
.hako-start-card ol {
    text-align: left;
    margin: 8px 0 12px;
    padding-left: 1.4em;
    font-size: 0.92rem;
    line-height: 1.7;
}
.hako-start-card .btn {
    font-size: 1.1rem;
    padding: 12px 20px;
}

/* ---- 新米島主ガイド（開発画面の上） ---- */
.hako-mission {
    margin: 8px 0 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffbea, #fef3c7);
    border: 1px solid #f6d860;
    font-size: 0.9rem;
}
.hako-mission summary {
    cursor: pointer;
    font-weight: bold;
    color: #744210;
    list-style: none;
}
.hako-mission summary::-webkit-details-marker { display: none; }
.hako-mission .mission-bar {
    height: 6px;
    margin: 6px 0 2px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.hako-mission .mission-bar > span {
    display: block;
    height: 100%;
    background: #48bb78;
}
.hako-mission ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}
.hako-mission li {
    padding: 3px 0;
}
.hako-mission li.done {
    color: #718096;
    text-decoration: line-through;
}
.hako-mission li.now {
    font-weight: bold;
    color: #22543d;
}
.hako-mission .mission-tip {
    display: block;
    font-weight: normal;
    font-size: 0.82rem;
    color: #4a5568;
    text-decoration: none;
}

/* ---- トップ: 古いお知らせは折りたたむ ---- */
.hako-old-notice > summary {
    cursor: pointer;
    color: #718096;
    font-size: 0.85rem;
}
.hako-start-card button[type="submit"] {
    display: block;
    width: 100%;
    border: none;
    border-radius: 10px;
    background: #38a169;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 3px 0 #276749;
}
.hako-start-card button[type="submit"]:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #276749;
}

/* ---- トップ: 前回の島がある人は「○○島に行く」を先頭に ---- */
.has-saved-island {
    display: flex;
    flex-direction: column;
}
.has-saved-island > .top-newuser-section {
    order: 9;
    margin-top: 12px;
}

/* ---- 島を自慢する / 招待 ---- */
.hako-share {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin: 6px 0 8px;
    flex-wrap: wrap;
}
.hako-share-btn {
    border: none;
    border-radius: 999px;
    padding: 7px 14px;
    background: #dd6b20;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
}
.hako-share-x {
    font-size: 0.85rem;
    color: #2d3748;
}
.hako-invite {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    font-size: 0.92rem;
}
.hako-invite a {
    font-weight: bold;
    white-space: nowrap;
}

/* ---- トップ: 休眠中の島は折りたたむ ---- */
.hako-dormant {
    margin: 8px 0 16px;
}
.hako-dormant > summary {
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    background: #edf2f7;
    color: #4a5568;
    font-weight: bold;
}
.hako-dormant > summary small {
    font-weight: normal;
    color: #718096;
}
