/* ============================================================
   知乎盐选内容提取（zhihu-extract）
   只服务一种交互：贴链接 → 生成 → 复制正文
   外壳复用 mock-studio.css 的 ms- 卡片，这里只管本工具专有部分
   ============================================================ */

/* ---------- 输入区 ---------- */
.yy-box { position: relative; }

.yy-area {
    width: 100%;
    box-sizing: border-box;
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fbfcfe;
    padding: 13px 14px;
    font-size: 14px;
    line-height: 1.8;
    color: #0f172a;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.yy-area:focus {
    border-color: #a9baf9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, .12);
}
.yy-area::placeholder { color: #9aa6b8; }

/* 输入框底部给「生成」按钮留出空间，避免长文本压在按钮下面 */
#yyInput { padding-bottom: 56px; min-height: 132px; }

.yy-go {
    position: absolute;
    right: 12px;
    bottom: 12px;
    height: 34px;
    padding: 0 16px;
    border-radius: 17px;
    font-size: 13.5px;
}
.yy-go[disabled] { opacity: .62; cursor: not-allowed; }

/* ---------- 结果区 ---------- */
.yy-out {
    min-height: 320px;
    background: #fff;
    color: #1f2937;
    font-size: 14.5px;
    line-height: 1.9;
    resize: vertical;
}
.yy-out:focus { border-color: #e2e8f0; box-shadow: none; }

/* ---------- 识别提示条 ---------- */
.yy-detect {
    display: block;
    margin: 11px 0 0;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.65;
    background: #eef4ff;
    border: 1px solid #d8e5ff;
    color: #2f4c8f;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.yy-detect.is-ok { background: #effaf3; border-color: #cdeddb; color: #1c6b45; }
.yy-detect.is-bad { background: #fff5f5; border-color: #fbdada; color: #a13b3b; }
.yy-detect code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    background: rgba(255, 255, 255, .75);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ---------- 徽标 ---------- */
.yy-badge {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    white-space: nowrap;
}
.yy-badge.is-ok { background: #e9f9f0; color: #128a53; }
.yy-badge.is-bad { background: #fdeeee; color: #c2413d; }
.yy-badge.is-busy { background: #eef2ff; color: #4f6ef7; }

/* ---------- 今日热门 ---------- */
.yy-hot {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 9px;
}
.yy-hot-item {
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    border: 1px solid #e4e9f1;
    background: #fbfcfe;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: inherit;
    transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.yy-hot-item:hover {
    border-color: #b9c8f5;
    background: #f5f8ff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(79, 110, 247, .10);
}
.yy-hot-item:active { transform: translateY(0); }
.yy-hot-item.is-pin {
    background: linear-gradient(180deg, #fffaf2, #fffdf8);
    border-color: #f2ddba;
}
.yy-hot-item.is-pin:hover {
    border-color: #e4bd82;
    background: #fff6e8;
    box-shadow: 0 3px 10px rgba(214, 158, 68, .12);
}
.yy-hot-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.yy-hot-item.is-pin .yy-hot-title { color: #8a5a16; }
.yy-hot-meta {
    font-size: 11.5px;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.yy-hot-item.is-pin .yy-hot-meta { color: #c08a2e; }

/* ---------- 错误 / 成功提示 ---------- */
.yy-alert {
    margin-top: 11px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.7;
    background: #fff7f7;
    border: 1px solid #fbdada;
    color: #a13b3b;
}
.yy-alert b { display: block; margin-bottom: 3px; font-size: 13px; color: #8f2f2f; }
.yy-alert.is-info { background: #f5f8ff; border-color: #dbe5fb; color: #33518f; }
.yy-alert.is-info b { color: #24407a; }

/* ---------- 窄屏 ---------- */
@media (max-width: 940px) {
    .yy-out { min-height: 240px; }
}
@media (max-width: 620px) {
    .yy-area { font-size: 15px; }
    /* 窄屏不悬浮：内容滚动时悬浮按钮会盖住最后一行文字，改为普通按钮排在框下方 */
    #yyInput { min-height: 116px; padding-bottom: 13px; }
    .yy-go {
        position: static;
        display: flex;
        width: 100%;
        height: 40px;
        margin-top: 10px;
        border-radius: 10px;
        justify-content: center;
    }
}
