/* ---------- v3: 打开方式 / 重复提示 / 本地历史 / 提示页 / 内嵌页 ---------- */

.page-mode-fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.page-mode-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.page-mode-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.page-mode-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page-mode-card .page-mode-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.page-mode-card .page-mode-text {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.page-mode-card.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: var(--brand-soft);
  color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.page-mode-card.is-active .page-mode-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 3px #fff;
}

.page-mode-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.replace-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f5c76b;
  border-radius: 14px;
  background: #fffaeb;
  color: #7a4b00;
}

.replace-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.replace-panel-head svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  stroke: #b54708;
}

.replace-panel strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

.replace-panel p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.replace-panel p code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(180, 83, 9, 0.1);
  color: #7a4b00;
  font-size: 12px;
}

.replace-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.replace-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.replace-cancel {
  border: 1px solid #e9d7b1;
  background: transparent;
  color: #7a4b00;
}

.replace-confirm {
  border: 0;
  background: #b54708;
  color: #fff;
  box-shadow: 0 6px 14px rgba(181, 71, 8, 0.22);
}

.replace-confirm:disabled,
.replace-cancel:disabled {
  opacity: .55;
  cursor: wait;
}

.result-page-line {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.result-page-line strong {
  color: var(--ink-soft);
}

.recent-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recent-count {
  color: var(--muted);
  font-size: 12.5px;
}

.recent-item .recent-expiry {
  white-space: normal;
}

.recent-item .recent-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.page-mode-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: #eef4ff;
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 提示页 ---------- */

.notice-page {
  min-height: 100vh;
  background: var(--bg);
}

.notice-shell {
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: 22px 0 44px;
}

.notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 34px;
}

.notice-home {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.notice-home:hover {
  color: var(--brand);
}

.notice-card {
  padding: 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
}

.notice-card h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.notice-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.notice-target {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 22px 0 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.notice-target-label {
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.notice-host {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notice-path {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.notice-warning {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #f5d08d;
  border-radius: 12px;
  background: #fffaeb;
  color: #7a4b00;
}

.notice-warning strong {
  display: block;
  font-size: 13px;
}

.notice-warning p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
}

.notice-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  text-decoration: none;
}

.notice-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 9px;
}

.notice-copy svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.notice-foot {
  margin: 14px 0 0;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}

/* ---------- 内嵌页 ---------- */

.inline-page {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f2f4f7;
}

.inline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.inline-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.inline-brand .brand-mark {
  width: 26px;
  height: 26px;
}

.inline-target {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.inline-target strong {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
}

.inline-target span {
  overflow: hidden;
  color: var(--muted-light);
  text-overflow: ellipsis;
}

.inline-open {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.inline-note {
  padding: 6px 12px;
  background: #fffaeb;
  color: #7a4b00;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.inline-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 54px - 28px);
  border: 0;
  background: #fff;
}

@media (max-width: 680px) {
  .page-mode-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .page-mode-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .page-mode-card .page-mode-text {
    font-size: 12px;
  }

  .notice-shell {
    width: min(100% - 24px, 560px);
    padding-top: 16px;
  }

  .notice-header {
    margin-bottom: 20px;
  }

  .notice-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .notice-card h1 {
    font-size: 32px;
  }

  .replace-actions {
    justify-content: stretch;
  }

  .replace-actions button {
    flex: 1;
  }

  .inline-target span {
    display: none;
  }
}
