[data-plan-compose-overlay] {
  z-index: 9998 !important;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #26343a;
  --mp-gray-800: #26343a;
  --mp-gray-600: #58676b;
  --mp-gray-500: #64748b;
  --mp-gray-400: #68787e;
  --mp-border: #d8e2e1;
}

[data-plan-panel] {
  width: min(560px, 100%) !important;
  max-width: 560px !important;
  box-sizing: border-box;
  max-height: calc(100vh - 40px) !important;
  max-height: calc(100dvh - 40px) !important;
  border: 1px solid rgba(15, 125, 134, 0.14);
  border-radius: 18px !important;
  box-shadow: 0 24px 64px rgba(12, 35, 42, 0.24) !important;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

[data-plan-header] {
  flex: 0 0 auto;
  padding: 18px 24px !important;
  background: #f5faf9 !important;
  border-bottom: 1px solid #e5efed;
}

[data-plan-header] > div {
  margin-top: 0 !important;
  color: #20363b !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.4;
}

[data-plan-body] {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px 18px !important;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  overscroll-behavior: contain;
}

[data-plan-footer] {
  flex: 0 0 auto;
  padding: 0 24px 14px;
  background: #fff;
  border-top: 1px solid #edf1f1;
}

[data-plan-panel] input,
[data-plan-panel] textarea,
[data-plan-panel] button,
[data-plan-panel] select {
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.4;
}

[data-plan-body] input:not([type="file"]),
[data-plan-body] textarea {
  font-size: 14px !important;
  color: #26343a;
  border-color: #d8e2e1 !important;
  border-radius: 10px !important;
}

[data-plan-panel] :is(input, textarea, button, summary):focus-visible {
  outline: 2px solid rgba(15, 125, 134, 0.2);
  border-color: #0f7d86 !important;
}

[data-plan-body] .plan-compose-label {
  display: block;
  margin: 0 0 6px;
  color: #58676b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

[data-plan-body] div:has(> [data-plan-lang-btn]) > div:first-child,
[data-plan-body] div:has(> [data-plan-join-btn]) > div:first-child {
  color: #58676b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}

[data-plan-body] [data-plan-lang-btn],
[data-plan-body] [data-plan-join-btn] {
  min-height: 44px;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  border-color: #d8e2e1 !important;
  font-size: 14px !important;
}

[data-plan-body] [data-plan-cat],
[data-plan-body] [data-plan-duration],
[data-plan-body] [data-plan-split],
[data-plan-body] [data-plan-vibe],
[data-plan-body] [data-plan-welcome] {
  min-height: 36px;
  padding: 7px 11px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

[data-plan-body] [data-plan-cat][style*="font-weight:800"],
[data-plan-body] [data-plan-duration][style*="font-weight:800"],
[data-plan-body] [data-plan-split][style*="font-weight:800"],
[data-plan-body] [data-plan-vibe][style*="font-weight:800"],
[data-plan-body] [data-plan-welcome][style*="font-weight:800"] {
  font-weight: 800 !important;
}

[data-plan-actions] {
  display: flex;
  gap: 10px;
  padding-top: 12px;
}

[data-plan-actions] button {
  min-height: 44px;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.4;
}

[data-plan-panel] button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

[data-plan-actions] button:not(:disabled):hover,
.pd-button:not(:disabled):hover {
  filter: brightness(0.96);
}

.pd-assistant {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #dceae7;
  border-radius: 12px;
  background: #f5faf9;
  color: #26343a;
  font-size: 13px;
  line-height: 1.6;
}

.pd-toggle,
.pd-text-button {
  padding: 0;
  border: 0;
  background: none;
  color: #0f737b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.pd-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 24px;
  font-size: 14px;
}

.pd-chevron {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.pd-toggle[aria-expanded="true"] .pd-chevron {
  transform: rotate(180deg);
}

.pd-intro {
  margin: 10px 0;
  color: #58676b;
}

[data-plan-panel] .pd-assistant p {
  font-size: 13px;
  line-height: 1.6;
}

[data-plan-panel] .pd-disclosure p {
  font-size: 12px;
}

.pd-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 8px;
  border: 1px solid #d7e8df;
  border-radius: 6px;
  background: #edf6f0;
  color: #286046;
  font-size: 12px;
  font-weight: 500;
}

.pd-badge-demo {
  border-color: #ecdcb7;
  background: #fff7e6;
  color: #805714;
}

.pd-input {
  display: block;
  width: 100%;
  min-height: 96px;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #d8e2e1;
  border-radius: 10px;
  background: #fff;
  line-height: 1.6 !important;
  resize: vertical;
}

.pd-counter {
  margin-top: 5px;
  color: #68787e;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pd-sample {
  float: left;
  margin-top: 5px;
  font-size: 12px;
}

.pd-disclosure {
  clear: both;
  margin: 8px 0 14px;
  color: #58676b;
  font-size: 12px;
}

.pd-disclosure summary {
  width: fit-content;
  cursor: pointer;
}

.pd-disclosure p {
  margin: 8px 0 0;
}

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.pd-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cbdcd8;
  border-radius: 8px;
  background: #fff;
  color: #0f737b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

.pd-primary {
  border-color: #0f7d86;
  background: #0f7d86;
  color: #fff;
}

.pd-result {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid #dce6e3;
}

.pd-result-row {
  padding: 12px 0;
  border-bottom: 1px solid #dce6e3;
}

.pd-field-label,
.pd-reminder-title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.pd-diff {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.pd-current {
  color: #64748b;
}

.pd-suggestion {
  padding: 8px 10px;
  border: 1px solid #e1eae7;
  border-radius: 8px;
  background: #fff;
  color: #26343a;
}

.pd-result-row > button {
  margin: 0 8px 4px 0;
}

.pd-message {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.pd-error {
  color: #b42318;
}

.pd-warning {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #ecdcb7;
  border-radius: 8px;
  background: #fff8e8;
  color: #754c00;
  font-size: 12px;
}

.pd-reminder-title {
  margin-top: 12px;
}

.pd-reminders {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin: 0;
  padding-left: 16px;
  color: #58676b;
  font-size: 12px;
}

[data-plan-actions] [data-plan-submit] {
  background: #0f7d86 !important;
  font-weight: 700 !important;
}

[data-plan-actions] [data-plan-cancel] {
  border-color: #d8e2e1 !important;
  color: #415256 !important;
  font-weight: 600 !important;
}

[data-plan-lang-menu],
[data-plan-join-menu] {
  z-index: 1100 !important;
  max-width: calc(100vw - 24px);
  max-height: min(240px, calc(100dvh - 24px));
  overflow-y: auto !important;
  border: 1px solid #e1e9e8;
  border-radius: 10px !important;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

[data-plan-lang-menu] button,
[data-plan-join-menu] button {
  min-height: 40px;
  padding: 9px 12px !important;
  font-size: 13px !important;
  line-height: 1.4;
}

@media (max-width: 600px) {
  [data-plan-compose-overlay] {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  [data-plan-panel] {
    width: 100% !important;
    max-height: 94vh !important;
    max-height: 94dvh !important;
    border-radius: 18px 18px 0 0 !important;
  }

  [data-plan-header] {
    padding: 15px 18px !important;
  }

  [data-plan-body] {
    padding: 16px 18px 14px !important;
  }

  [data-plan-footer] {
    padding: 0 18px max(14px, env(safe-area-inset-bottom));
  }

  [data-plan-actions] {
    padding-top: 10px;
  }

  [data-plan-body] [data-plan-lang-btn],
  [data-plan-body] [data-plan-join-btn] {
    font-size: 14px !important;
  }

  [data-plan-body] input:not([type="file"]),
  [data-plan-body] textarea {
    min-width: 0;
    max-width: 100%;
    font-size: 16px !important;
  }

  .pd-assistant {
    padding: 12px;
  }
}
