/* 写作模型选择：对齐 components/ys-model-picker */

.mp-mask { position: fixed; inset: 0; z-index: 1200; background: rgba(36, 28, 22, 0.42); }
.mp-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1201;
  max-height: 78vh;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: #fffdf8;
  border: 0.5px solid rgba(196, 165, 116, 0.45);
}
.mp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.mp-copy { min-width: 0; }
.mp-title { display: block; color: #29231e; font-size: 17px; font-weight: 800; }
.mp-sub { display: block; margin-top: 3px; color: #8c8073; font-size: 11px; line-height: 1.5; }
.mp-sheet button.mp-close,
.mp-close {
  flex-shrink: 0;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid #e3d5c4;
  background: #fffdf8;
  color: #29231e;
  font-size: 12px;
  font-weight: 700;
  line-height: 27px;
}
.mp-split { display: flex; gap: 8px; min-height: 0; }
.mp-names { flex: 0 0 118px; max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; }
.mp-sheet button.mp-name,
.mp-name {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 6px;
  padding: 10px 8px;
  border-radius: 8px;
  border: 0.5px solid #e3d5c4;
  background: #fffdf8;
  color: #5c4630;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}
.mp-sheet button.mp-name.is-active { border-color: #b08958; background: #ead9c2; color: #29231e; }
.mp-detail { flex: 1; min-width: 0; max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; }
.mp-pick-title { display: block; color: #29231e; font-size: 15px; font-weight: 800; }
.mp-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mp-pill { padding: 3px 6px; border-radius: 999px; border: 0.5px solid #e3d5c4; background: #fffdf8; color: #8c8073; font-size: 9px; font-weight: 700; }
.mp-pill.is-on { border-color: #c4a574; background: #5c4630; color: #fffdf8; }
.mp-note { display: block; margin-top: 6px; padding: 7px 8px; border-radius: 8px; background: #fbf8f2; color: #8c8073; font-size: 11px; line-height: 1.55; }
.mp-kite-wrap { position: relative; width: 100%; height: 210px; margin: 10px auto 8px; }
.mp-kite-stage { position: relative; width: 148px; height: 148px; margin: 32px auto 0; }
.mp-kite-ring { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border: 1px dashed #d8c6b1; transform: rotate(45deg); }
.mp-kite-axis { position: absolute; background: #e8d7c4; }
.mp-kite-axis-v { left: 50%; top: 28px; width: 1px; height: 92px; margin-left: -0.5px; }
.mp-kite-axis-h { top: 50%; left: 28px; width: 92px; height: 1px; margin-top: -0.5px; }
.mp-kite-poly { position: absolute; inset: 0; background: rgba(196, 165, 116, 0.34); box-shadow: inset 0 0 0 1.5px #c4a574; }
.mp-kite-lab { position: absolute; z-index: 1; color: #8c8073; font-size: 9px; font-weight: 700; line-height: 1.25; }
.mp-kite-n { top: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.mp-kite-s { bottom: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.mp-kite-e { right: 0; top: 50%; transform: translateY(-50%); max-width: 28%; text-align: right; }
.mp-kite-w { left: 0; top: 50%; transform: translateY(-50%); max-width: 28%; text-align: left; }
.mp-sheet button.mp-use,
.mp-use {
  width: 100%;
  height: 40px;
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #29231e;
  color: #fffdf8;
  font-size: 13px;
  font-weight: 800;
}
.mp-family-board { display: flex; flex-direction: column; }
.mp-family-opt { display: block; width: 100%; margin: 5px 0 0; padding: 8px 9px; border-radius: 8px; border: 0.5px solid #e3d5c4; background: #fffdf8; text-align: left; }
.mp-family-opt.is-active { border-color: #b08958; background: #ead9c2; }
.mp-family-name { display: block; color: #29231e; font-size: 13px; font-weight: 800; }
.mp-family-note { display: block; margin-top: 2px; color: #8c8073; font-size: 11px; line-height: 1.45; }
.mp-name:active,
.mp-family-opt:active,
.mp-use:active { opacity: 0.88; }

.mp-sheet.is-studio { background: #f7fbfa; border-color: #dcebe7; }
.mp-sheet.is-studio .mp-title,
.mp-sheet.is-studio .mp-pick-title { color: #163c3a; }
.mp-sheet.is-studio .mp-sub,
.mp-sheet.is-studio .mp-note,
.mp-sheet.is-studio .mp-kite-lab { color: #5e7c78; }
.mp-sheet.is-studio .mp-kite-ring { border-color: #e8b4b4; }
.mp-sheet.is-studio .mp-kite-axis { background: #d7e2de; }
.mp-sheet.is-studio .mp-kite-poly { background: rgba(84, 162, 162, 0.38); box-shadow: inset 0 0 0 1.5px #54a2a2; }
.mp-sheet.is-studio .mp-close,
.mp-sheet.is-studio .mp-name { border-color: #dcebe7; background: #fff; color: #24524f; }
.mp-sheet.is-studio .mp-name.is-active { border-color: #149d91; background: #e3f6f2; color: #0d716b; }
.mp-sheet.is-studio .mp-pill.is-on { border-color: #149d91; background: #54a2a2; }
.mp-sheet.is-studio .mp-use { background: #149d91; }
.mp-sheet.is-studio .mp-family-opt { border-color: #dcebe7; background: #fff; }
.mp-sheet.is-studio .mp-family-opt.is-active { border-color: #149d91; background: #e3f6f2; }
.mp-sheet.is-studio .mp-family-name { color: #163c3a; }
.mp-sheet.is-studio .mp-family-note { color: #5e7c78; }

@media (min-width: 768px) {
  .mp-sheet {
    left: 196px;
    right: 24px;
    top: 48px;
    bottom: 24px;
    width: 640px;
    max-width: calc(100vw - 236px);
    max-height: calc(100vh - 72px);
    margin: 0 auto;
    padding: 16px 18px 18px;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(48, 32, 18, 0.16);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .mp-title { font-size: 18px; line-height: 1.3; }
  .mp-sub { margin-top: 4px; font-size: 12px; line-height: 1.45; }
  .mp-close { height: 32px; padding: 0 12px; font-size: 12px; line-height: 30px; }
  .mp-split { flex: 1; min-height: 0; gap: 12px; overflow: hidden; }
  .mp-names { flex: 0 0 148px; max-height: 100%; }
  .mp-name { margin-bottom: 6px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
  .mp-name:hover { background: #f7efe2; }
  .mp-detail { max-height: none; overflow-x: hidden; overflow-y: auto; }
  .mp-pick-title { font-size: 18px; }
  .mp-note { margin-top: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.5; }
  .mp-family-note { margin-top: 4px; padding: 0; background: transparent; font-size: 12px; line-height: 1.4; }
  .mp-pill { font-size: 11px; }
  .mp-use { height: 40px; margin-top: 10px; font-size: 14px; }
  .mp-family-board { gap: 10px; margin-top: 10px; }
  .mp-family-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .mp-family-opt { margin-top: 0; padding: 10px 12px; border-radius: 12px; }
  .mp-family-name { font-size: 14px; line-height: 1.35; white-space: normal; overflow: visible; }
  .mp-family-viz { width: 100%; min-width: 0; }
  .mp-family-viz .mp-pills { margin-top: 0; }
  .mp-kite-wrap {
    display: grid;
    grid-template-columns: 72px 148px 72px;
    grid-template-rows: auto 148px auto;
    grid-template-areas: ". n ." "w stage e" ". s .";
    justify-content: center;
    align-items: center;
    height: auto;
    margin: 8px auto 4px;
    column-gap: 8px;
    row-gap: 6px;
  }
  .mp-kite-stage { grid-area: stage; margin: 0; }
  .mp-kite-lab { position: static; z-index: auto; max-width: none; font-size: 11px; line-height: 1.3; transform: none; text-align: center; }
  .mp-kite-n { grid-area: n; }
  .mp-kite-s { grid-area: s; }
  .mp-kite-e { grid-area: e; text-align: left; }
  .mp-kite-w { grid-area: w; text-align: right; }
}
