@font-face {
  font-family: 'Noto Sans SC Local';
  src: url('../vendor/NotoSansSC-Regular.otf') format('opentype');
  font-display: swap;
}

:root {
  color-scheme: light;
  --primary: #19c8b9;
  --primary-hover: #3dd4c6;
  --primary-active: #11a89b;
  --primary-soft: #e6f9f6;
  --ink: #794f27;
  --text: #725d42;
  --muted: #8a7b66;
  --faint: #a99c88;
  --canvas: #f8f8f0;
  --paper: #f7f3df;
  --paper-light: #fffdf5;
  --line: #c4b89e;
  --line-strong: #a89878;
  --focus: #ffcc00;
  --success: #5a9e1e;
  --danger: #c94444;
  --shadow-button: #bdaea0;
  --radius-small: 12px;
  --radius-card: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; background: var(--canvas); }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #70c691;
  color: var(--text);
  font-family: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background: #70c691 url('../images/home.webp') 100% 0 / auto repeat;
  content: "";
  pointer-events: none;
  animation: background-scroll 80s linear infinite;
}

::selection { background: rgba(25, 200, 185, .24); color: var(--ink); }
a { color: inherit; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; transform: none !important; box-shadow: none !important; }

.welcome-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #70c691 url('../images/home.webp') 100% 0 / auto repeat;
  color: #fffdf5;
  opacity: 0;
  visibility: hidden;
  animation: background-scroll 80s linear infinite;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.welcome-overlay.is-visible { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
.welcome-overlay.is-leaving { opacity: 0; pointer-events: none; }
.welcome-overlay > div { position: relative; z-index: 1; text-align: center; }
.welcome-overlay h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.45; text-shadow: 0 3px 0 rgba(75, 104, 70, .32); }
.welcome-overlay h1 + h1 { margin-top: 4px; font-size: clamp(1.35rem, 3vw, 2rem); }

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1160px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0 30px;
}

.masthead {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 104px;
  margin-bottom: 18px;
  padding: 20px 26px;
  overflow: hidden;
  border: 2px solid rgba(255, 253, 245, .78);
  border-radius: 24px;
  background:
    radial-gradient(circle, rgba(25, 200, 185, .12) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(255, 255, 255, .45) 1px, transparent 1px) 7px 7px / 14px 14px,
    rgba(255, 253, 245, .9);
}
.masthead::after {
  position: absolute;
  top: -44px;
  right: 42px;
  width: 146px;
  height: 146px;
  border: 22px solid rgba(25, 200, 185, .13);
  border-radius: 50%;
  content: "";
}
.masthead > div { position: relative; z-index: 1; }
.brand { margin: 0; color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.55rem); font-weight: 800; line-height: 1.05; text-shadow: 0 2px 0 rgba(255, 253, 245, .8); }
.tagline, .muted { color: var(--muted); }
.tagline { margin: 10px 0 0; font-size: .95rem; }

.tablist {
  position: sticky;
  z-index: 20;
  top: 10px;
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  border: 2px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 253, 245, .94);
  box-shadow: 0 5px 18px rgba(82, 62, 39, .08);
  scrollbar-width: thin;
  backdrop-filter: blur(12px);
}
.tab {
  flex: 0 0 auto;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  padding: 9px 16px;
  font-weight: 700;
  transition: color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.tab:hover { background: rgba(25, 200, 185, .1); color: var(--ink); transform: translateY(-1px); }
.tab[aria-selected="true"] { background: #0cc0b5; color: #fff9e3; }

.tab:focus-visible,
.action:focus-visible,
.secondary-action:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.panel { padding-top: 28px; animation: panel-in .28s var(--ease); }
.panel[hidden] { display: none; }
.panel-heading {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0 0 10px 12px;
  padding: 7px 24px;
  border-radius: 6px;
  background: var(--primary);
  color: #fffdf5;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  transform: rotate(-1deg);
  filter: drop-shadow(0 3px 0 rgba(17, 168, 155, .45));
}
.panel-heading::before,
.panel-heading::after {
  position: absolute;
  z-index: -1;
  top: 8px;
  width: 22px;
  height: 34px;
  background: var(--primary-active);
  content: "";
}
.panel-heading::before { left: -15px; clip-path: polygon(100% 0, 100% 100%, 0 100%, 35% 50%, 0 0); }
.panel-heading::after { right: -15px; clip-path: polygon(0 0, 100% 0, 65% 50%, 100% 100%, 0 100%); }
.panel-intro { width: fit-content; max-width: 880px; margin: 0 0 20px; padding: 5px 10px; border-radius: 10px; background: rgba(255, 253, 245, .72); color: var(--text); }
#panel-pdf { padding-top: 0; }
#panel-pdf > .panel-heading { display: none; }
#panel-pdf > .panel-intro { width: 100%; max-width: none; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pdf-editor-layout { display: grid; grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) 76px; gap: 16px; align-items: start; min-height: min(680px, calc(100dvh - 210px)); }
.pdf-editor-controls { min-width: 0; height: var(--pdf-editor-stage-height); max-height: none; overflow-y: auto; border: 1.5px solid #82d5bb; border-radius: var(--radius-card); background: radial-gradient(circle, rgba(25, 200, 185, .13) 1.5px, transparent 1.5px) 0 0 / 28px 28px, var(--paper); padding: 18px; scrollbar-color: var(--primary) transparent; }
.pdf-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pdf-editor-heading h3 { margin-bottom: 0; }
.eyebrow { margin: 0 0 5px !important; color: var(--primary-active) !important; font-size: .78rem !important; font-weight: 800; }
.pdf-editor-badge { flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 8px; color: var(--primary-active); font-size: .76rem; font-weight: 800; }
.pdf-editor-section { margin-top: 16px; }
.pdf-editor-section + .pdf-editor-section { border-top: 1px dashed var(--line); padding-top: 16px; }
.pdf-editor-section h4 { margin: 0; color: var(--ink); font-size: .96rem; }
.pdf-editor-section .tool-form { margin-top: 10px; }
.pdf-editor-operations > p { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.pdf-operation-launcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pdf-operation-launcher .action, .pdf-operation-launcher .secondary-action { min-height: 38px; padding: 7px 8px; font-size: .82rem; }
.pdf-operation-dialog { width: min(460px, calc(100% - 32px)); margin: auto; border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--paper-light); color: var(--text); box-shadow: 0 18px 46px rgba(51, 41, 28, .28); }
.pdf-operation-dialog::backdrop { background: rgba(28, 55, 48, .48); backdrop-filter: blur(3px); }
.pdf-operation-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.pdf-operation-dialog-heading h3 { margin: 0; font-size: 1.05rem; }
.pdf-operation-dialog-description { margin: 14px 18px 0; color: var(--muted); font-size: .86rem; }
.pdf-operation-dialog .tool-form { padding: 14px 18px 18px; }
.pdf-merge-files { display: grid; gap: 7px; max-height: 190px; margin: 0; padding: 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 253, 245, .65); list-style: none; }
.pdf-merge-files[hidden] { display: none; }
.pdf-merge-files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; color: var(--text); font-size: .82rem; }
.pdf-merge-files li span { min-width: 0; overflow-wrap: anywhere; }
.pdf-merge-file-remove { flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper-light); color: var(--primary-active); padding: 4px 7px; font-weight: 800; cursor: pointer; }
.pdf-merge-file-remove:hover { border-color: var(--primary); background: #edfff6; }
.pdf-operation-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.pdf-editor-toolbar { display: flex; flex-wrap: wrap; gap: 7px; }
.pdf-editor-toolbar .secondary-action { min-height: 35px; padding: 6px 10px; border-radius: 8px; font-size: .82rem; }
.pdf-watermark-grid-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.pdf-watermark-grid-controls label { min-width: 0; }
.pdf-watermark-grid-controls input[type="number"] { min-width: 0; }
.pdf-editor-hint { margin: 14px 0 0 !important; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .8rem !important; }
.pdf-editor-pages { height: var(--pdf-editor-stage-height); max-height: none; overflow-y: auto; border: 1.5px solid #82d5bb; border-radius: var(--radius-card); background: #f4fff9; padding: 13px 9px; scrollbar-color: var(--primary) transparent; }
.pdf-editor-pages > p { position: sticky; z-index: 1; top: -13px; margin: 0 0 9px; padding: 4px 0; background: #f4fff9; color: var(--muted); font-size: .75rem; font-weight: 800; text-align: center; }
.pdf-editor-pages ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pdf-editor-pages li { display: grid; min-height: 38px; place-items: center; border: 1px solid #82d5bb; border-radius: 6px; background: #fffdf5; color: var(--primary-active); font-size: .82rem; font-weight: 800; cursor: pointer; }
.pdf-editor-pages li.is-active { border-color: var(--primary); background: var(--primary); color: #fff; }
.pdf-editor-stage { min-width: 0; max-height: none; overflow: visible; border: 1.5px solid #82d5bb; border-radius: var(--radius-card); background: #f4fff9; }
.pdf-editor-stagebar { position: static; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #82d5bb; background: #edfff6; padding: 11px 15px; color: var(--primary-active); font-size: .82rem; font-weight: 800; }
.pdf-editor-paper { position: relative; width: min(92%, 820px); max-height: none; aspect-ratio: var(--pdf-page-ratio, 1 / 1.414); margin: 18px auto; overflow: hidden; border: 1px solid #d1cbc0; background: linear-gradient(90deg, transparent 36px, rgba(17, 168, 155, .12) 37px, transparent 38px), repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(42, 48, 49, .07) 32px), #fffefa; box-shadow: 7px 9px 0 rgba(17, 168, 155, .16); outline: 0; }
.pdf-editor-paper canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.pdf-editor-paper:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pdf-editor-placeholder { position: absolute; top: 11%; left: 11%; right: 11%; margin: 0; color: #5f6872; font-size: .86rem; font-weight: 700; text-align: center; }
.pdf-editor-layer { position: absolute; z-index: 1; max-width: 70%; border: 2px solid transparent; border-radius: 5px; background: #fff6a4; color: #20252b; padding: 5px 8px; font: inherit; font-size: .86rem; font-weight: 800; line-height: 1.25; cursor: grab; transform: translate(-50%, -50%); touch-action: none; }
.pdf-editor-layer.is-watermark { width: max-content; border: 0; background: transparent; color: #0b8c83; font-size: 1.75rem; letter-spacing: 0; pointer-events: none; }
.pdf-editor-layer.is-watermark.is-diagonal { transform: translate(-50%, -50%) rotate(-32deg); }
.pdf-editor-layer.is-watermark.is-repeat { font-size: 1rem; }
.pdf-editor-layer.is-text { background: #c8f5e2; color: #075943; }
.pdf-editor-layer.is-rectangle { min-width: 96px; min-height: 52px; border: 3px solid #e05a5a; background: transparent; color: #b23a3a; }
.pdf-editor-layer.is-ink { border-radius: 50% 44% 50% 46%; background: #d8e2ff; color: #304ca2; transform: translate(-50%, -50%) rotate(-4deg); }
.pdf-editor-layer.is-selected { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(255, 204, 0, .28); }
.card,
.text-tool,
.store-package {
  position: relative;
  overflow: hidden;
  border: 1.5px solid #82d5bb;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle, rgba(25, 200, 185, .13) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1px) 7px 7px / 14px 14px,
    var(--paper);
  color: var(--text);
  padding: 20px;
}
.grid .card:nth-child(even),
.text-tool:nth-child(4n + 2),
.store-package:nth-child(4n + 2) {
  border-color: #f7cd67;
  background:
    radial-gradient(circle, rgba(247, 195, 28, .15) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1px) 7px 7px / 14px 14px,
    #fff8dc;
}
.text-tool:nth-child(4n + 3),
.store-package:nth-child(4n + 3) {
  border-color: #f3a6af;
  background:
    radial-gradient(circle, rgba(224, 90, 90, .11) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1px) 7px 7px / 14px 14px,
    #fdebed;
}
.text-tool:nth-child(4n),
.store-package:nth-child(4n) {
  border-color: #aeb9ee;
  background:
    radial-gradient(circle, rgba(99, 116, 190, .11) 1.5px, transparent 1.5px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1px) 7px 7px / 14px 14px,
    #eff1fc;
}
.card h3,
.text-tool h3,
.store-package h3 { margin: 0 0 8px; color: var(--ink); font-size: 1.02rem; font-weight: 800; }
.card p,
.store-package p { margin: 0; color: var(--muted); font-size: .92rem; }

.details-list { display: grid; gap: 0; margin: 0; }
.details-list div { display: grid; grid-template-columns: minmax(118px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 10px 0; border-bottom: 1px dashed rgba(168, 152, 120, .55); }
.details-list div:last-child { border-bottom: 0; }
.details-list dt { color: var(--muted); font-size: .82rem; }
.details-list dd { margin: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }

.tool-form { display: grid; gap: 11px; margin-top: 16px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .88rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 253, 245, .92);
  color: var(--text);
  padding: 10px 13px;
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
input, select { min-height: 44px; }
textarea { min-height: 116px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #aa9f8d; font-weight: 400; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); background: #fffdf7; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(255, 204, 0, .16); }
input[type="file"] { padding: 7px; }
input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--canvas);
  color: var(--ink);
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 43px;
  border-radius: 14px;
  padding: 9px 18px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.action { border: 2px solid var(--paper-light); background: var(--paper-light); color: var(--ink); box-shadow: 0 5px 0 var(--shadow-button); }
.action:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--shadow-button); }
.action:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow-button); }
.secondary-action { border: 2px solid var(--line-strong); background: rgba(255, 253, 245, .7); color: var(--text); box-shadow: 0 2px 4px rgba(61, 52, 40, .06); }
.secondary-action:hover { border-color: var(--primary); color: var(--primary-active); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(61, 52, 40, .1); }
.secondary-action:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(61, 52, 40, .06); }

.notice { min-height: 1.5em; margin: 20px 0 0; color: var(--muted); font-size: .88rem; }
.notice[data-type="error"], .status[data-type="error"] { color: var(--danger); }
.status { min-height: 1.5em; margin: 14px 0 0 !important; color: var(--success); font-size: .9rem; font-weight: 700; }

.dns-results { overflow-wrap: anywhere; }
.dns-results ul, .webrtc-results ul { margin: 10px 0 0; padding-left: 20px; }
.dns-details, .cidr-result, .webrtc-results { margin-top: 12px; overflow-wrap: anywhere; }
.network-details { display: grid; gap: 8px; margin: 0; }
.network-details div { display: grid; gap: 2px; padding-bottom: 7px; border-bottom: 1px dashed rgba(168, 152, 120, .45); }
.network-details div:last-child { border-bottom: 0; }
.network-details dt { color: var(--muted); font-size: .82rem; }
.network-details dd { margin: 0; color: var(--ink); }
.webrtc-results ul { margin-top: 0; }
.webrtc-verdict {
  padding-left: 12px;
  border-left: 3px solid var(--line-strong);
}
.webrtc-verdict[data-level="safe"] { border-left-color: var(--success); }
.webrtc-verdict[data-level="warning"],
.webrtc-verdict[data-level="high"] { border-left-color: var(--danger); }
.webrtc-verdict h4 { margin: 0; color: var(--ink); font-size: 1rem; }
.webrtc-verdict p { margin: 4px 0 0; }
.webrtc-limitation { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.network-utilities { margin-top: 16px; }

.store-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); align-items: start; gap: 16px; }
.store-layout > .card { position: sticky; top: 90px; }
.store-results { display: grid; align-content: start; gap: 12px; min-width: 0; }
.store-package { padding: 17px; overflow-wrap: anywhere; }
.store-package h3 { color: var(--ink); font-size: .95rem; }
.store-package p { margin: 0 0 11px; font-size: .84rem; }
.store-package .secondary-action { display: inline-flex; }

.privacy { margin-top: auto; padding-top: 34px; color: var(--muted); font-size: .82rem; text-align: center; }
.privacy::before { display: block; width: 52px; margin: 0 auto 16px; border-top: 3px dotted rgba(25, 200, 185, .5); content: ""; }

.error-shell { position: relative; z-index: 1; display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.error-card { width: min(540px, 100%); padding: 42px 30px; text-align: center; }
.error-card .error-code { margin: 0; color: var(--primary-active); font-size: clamp(4.6rem, 15vw, 7.5rem); font-weight: 800; line-height: .9; }
.error-card h1 { margin: 22px 0 8px; color: var(--ink); font-size: 1.5rem; }
.error-card p { color: var(--muted); }
.error-card .action { margin-top: 16px; }

.text-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.text-tool { padding: 20px; }
.text-tool .tool-form { margin-top: 12px; }
.text-tool-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.text-tool-split .tool-form + .tool-form { border-left: 1px dashed var(--line); padding-left: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.file-order { display: grid; gap: 8px; margin: 0; padding-left: 24px; color: var(--muted); }
.file-order li { display: flex; align-items: center; justify-content: space-between; gap: 9px; overflow-wrap: anywhere; }
.file-order-controls { display: flex; flex: 0 0 auto; gap: 5px; }
.file-order .secondary-action { min-height: 32px; padding: 4px 9px; border-radius: 10px; font-size: .8rem; }
.text-tool textarea { min-height: 96px; }
.qr-canvas { display: block; width: min(220px, 100%); height: auto; border: 8px solid #fff; border-radius: 14px; background: #fff; image-rendering: pixelated; }

.office-preview { max-height: 420px; overflow: auto; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: #111827; padding: 14px; font-family: Arial, sans-serif; }
.office-preview:empty { display: none; }
.office-preview img { max-width: 100%; height: auto; }
.office-pdf-page { color: #111827; font-family: 'Noto Sans SC Local', 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif; }
.office-pdf-page h1 { margin: 28px; color: #0b4567; font-size: 20px; }
.office-pdf-page table { width: calc(100% - 56px); margin: 0 28px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.office-pdf-page th, .office-pdf-page td { border: 1px solid #64748b; padding: 5px; text-align: left; overflow-wrap: anywhere; vertical-align: top; }
.office-pdf-page th { background: #e7f0f4; color: #0b4567; }
.office-pdf-presentation { padding: 50px; box-sizing: border-box; }
.office-pdf-presentation p { margin: 0 0 14px; font-size: 24px; line-height: 1.35; overflow-wrap: anywhere; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes background-scroll {
  from { background-position: 100% 0; }
  to { background-position: 0 100%; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1160px); padding-top: 14px; }
  .masthead { min-height: 92px; padding: 18px 20px; border-radius: 20px; }
  .masthead::after { right: -28px; }
  .brand { font-size: 1.85rem; }
  .tagline { margin-top: 7px; }
  .tablist { top: 6px; gap: 4px; margin-inline: -2px; padding: 6px; border-radius: 16px; }
  .tab { min-height: 39px; padding: 8px 13px; border-radius: 11px; font-size: .9rem; }
  .panel { padding-top: 24px; }
  .panel-heading { margin-left: 10px; font-size: 1.08rem; }
  .panel-intro { font-size: .9rem; }
  .grid, .store-layout, .text-tools, .text-tool-split, .pdf-editor-layout { grid-template-columns: 1fr; }
  .pdf-editor-layout { min-height: 0; }
  .pdf-editor-paper { width: min(92%, 510px); max-height: none; }
  .pdf-editor-controls { order: 1; height: auto; }
  .pdf-watermark-grid-controls { grid-template-columns: 1fr; }
  .pdf-editor-pages { order: 2; height: auto; max-height: 260px; }
  .pdf-editor-pages ol { grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)); }
  .pdf-editor-stage { order: 3; min-height: 0; }
  .store-layout > .card { position: static; }
  .text-tool-split .tool-form + .tool-form { border-top: 1px dashed var(--line); border-left: 0; padding-top: 14px; padding-left: 0; }
  .card, .text-tool, .store-package { padding: 17px; border-radius: 17px; }
  .details-list div { grid-template-columns: 1fr; gap: 2px; }
  .form-actions { align-items: stretch; }
  .form-actions .action, .form-actions .secondary-action { flex: 1 1 auto; }
}

@media (max-width: 430px) {
  .shell { width: min(100% - 18px, 1160px); }
  .masthead { min-height: 86px; margin-bottom: 12px; padding: 16px; }
  .brand { font-size: 1.65rem; }
  .tagline { font-size: .84rem; }
  .tablist { overflow-x: auto; flex-wrap: nowrap; }
  .panel-intro { margin-bottom: 16px; }
  .action, .secondary-action { max-width: 100%; }
  .error-card { padding: 34px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  body::before { animation: none !important; background-position: 50% 50%; }
}
