:root {
  color-scheme: light;
  --bg: #eef5ff;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-solid: #ffffff;
  --panel-soft: rgba(244, 248, 255, 0.82);
  --text: #172033;
  --muted: #6b7890;
  --line: rgba(119, 150, 190, 0.22);
  --accent: #3478ff;
  --accent-2: #7b61ff;
  --accent-3: #22c7ff;
  --danger: #ff6b2b;
  --shadow: 0 22px 60px rgba(48, 94, 170, 0.14);
  --shadow-hover: 0 28px 74px rgba(48, 94, 170, 0.22);
  --radius: 22px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --panel: rgba(22, 29, 43, 0.78);
  --panel-solid: #151d2d;
  --panel-soft: rgba(30, 40, 60, 0.82);
  --text: #f2f6ff;
  --muted: #a4afc2;
  --line: rgba(148, 163, 184, 0.22);
  --accent: #72a7ff;
  --accent-2: #9d8cff;
  --accent-3: #4fd8ff;
  --danger: #ff9266;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 32px 84px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8rem, rgba(72, 198, 255, 0.28), transparent 22rem),
    radial-gradient(circle at 74% 5rem, rgba(123, 97, 255, 0.22), transparent 26rem),
    radial-gradient(circle at 88% 38rem, rgba(53, 120, 255, 0.14), transparent 22rem),
    linear-gradient(135deg, #f5faff 0%, #edf4ff 48%, #f8fbff 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 8rem, rgba(52, 120, 255, 0.2), transparent 22rem),
    radial-gradient(circle at 76% 6rem, rgba(123, 97, 255, 0.18), transparent 26rem),
    linear-gradient(135deg, #0f1724 0%, #111827 48%, #0d1320 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header,
main,
.site-footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  margin-top: 16px;
  padding: 12px 16px 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(48, 94, 170, 0.12);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .site-header {
  border-color: var(--line);
  background: rgba(18, 25, 38, 0.72);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 152px;
  height: 46px;
  object-fit: contain;
}

.brand-mark,
.brand strong,
.brand small {
  display: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 14px;
}

.top-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.top-nav a:hover {
  background: rgba(52, 120, 255, 0.08);
  color: var(--accent);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

[data-theme="dark"] .theme-toggle {
  background: rgba(20, 28, 42, 0.82);
}

.hero {
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: 74px 0 46px;
  text-align: center;
}

.hero-copy {
  display: grid;
  justify-items: center;
}

.eyebrow,
.section-title span {
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hero h1 {
  max-width: 960px;
  font-size: clamp(52px, 5.6vw, 68px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p:last-of-type {
  max-width: 790px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.search-shell {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(620px, 100%);
  min-height: 56px;
  margin-top: 34px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(48, 94, 170, 0.12);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.search-shell:focus-within {
  border-color: rgba(52, 120, 255, 0.5);
  box-shadow: 0 18px 52px rgba(52, 120, 255, 0.22);
}

.search-icon {
  color: var(--accent);
}

.search-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.search-shell input::placeholder {
  color: #9aa8ba;
}

.tool-direct {
  margin: 8px 0 48px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .tool-direct {
  border-color: var(--line);
}

.section-title {
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
}

.tool-direct-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.quick-tool {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  min-height: 124px;
  align-content: center;
  align-items: start;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  box-shadow: 0 14px 36px rgba(48, 94, 170, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

[data-theme="dark"] .quick-tool {
  background: rgba(24, 33, 50, 0.72);
}

.quick-tool:hover,
.resource-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 120, 255, 0.46);
  box-shadow: var(--shadow-hover);
}

.quick-icon {
  display: grid;
  grid-row: 1 / span 2;
  align-self: center;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a8dff, #22c7ff);
  color: #fff;
  box-shadow: 0 14px 30px rgba(52, 120, 255, 0.22);
}

.quick-icon svg {
  width: 29px;
  height: 29px;
  fill: #fff;
  stroke: #fff;
  stroke-width: 0;
}

.quick-tool strong,
.quick-tool small {
  display: block;
  grid-column: 2;
  min-width: 0;
}

.quick-tool strong {
  overflow: hidden;
  align-self: end;
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-tool small {
  margin-top: 0;
  align-self: start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: visible;
}

.quick-tool:nth-child(2n) .quick-icon {
  background: linear-gradient(135deg, #ff6b5f, #ffb142);
}

.quick-tool:nth-child(3n) .quick-icon {
  background: linear-gradient(135deg, #20c997, #42d4f4);
}

.quick-tool:nth-child(4n) .quick-icon {
  background: linear-gradient(135deg, #8b7cff, #4f8cff);
}

.quick-tool[data-tool="外卖省钱助手"] .quick-icon {
  background: linear-gradient(135deg, #ff4d4f, #ff9f1c);
  box-shadow: 0 14px 32px rgba(255, 107, 43, 0.25);
}

.quick-tool[data-tool="外卖省钱助手"] .quick-icon svg {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-layout {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.side-tabs {
  position: sticky;
  top: 108px;
  z-index: 15;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(48, 94, 170, 0.1);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .side-tabs {
  border-color: var(--line);
}

.side-tabs button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  text-align: left;
}

.side-tabs button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(52, 120, 255, 0.22);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.category-stack {
  display: grid;
  gap: 20px;
}

.sub-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(48, 94, 170, 0.08);
  backdrop-filter: blur(16px);
}

.sub-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
}

.sub-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(52, 120, 255, 0.18);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.resource-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 18px;
  min-height: 154px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 38px rgba(48, 94, 170, 0.08);
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

[data-theme="dark"] .resource-card {
  background: rgba(24, 33, 50, 0.72);
}

.resource-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 0;
  height: 0;
  border-top: 13px solid rgba(107, 120, 144, 0.32);
  border-left: 13px solid transparent;
}

.external-arrow {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: color-mix(in srgb, var(--accent), transparent 25%);
  font-weight: 900;
}

.featured-badge {
  position: absolute;
  top: 16px;
  right: 34px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(52, 120, 255, 0.14), rgba(123, 97, 255, 0.14));
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.resource-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--icon-a, #2f7df6), var(--icon-b, #23c7ff));
  box-shadow: 0 14px 32px rgba(47, 125, 246, 0.2);
}

.resource-icon img,
.resource-icon svg {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: contain;
}

.resource-icon svg {
  fill: #fff;
  stroke: #fff;
  stroke-width: 0;
}

.resource-meta {
  display: grid;
  gap: 9px;
  min-width: 0;
  align-content: start;
  padding-right: 22px;
}

.resource-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-meta small {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.resource-meta em {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(52, 120, 255, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 48px;
  color: var(--muted);
}

.icp-link:hover {
  color: var(--accent);
}

.admin-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 30px 0 54px;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  width: min(100% - 32px, 480px);
  margin: 0 auto;
}

.login-card,
.admin-panel {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card h1 {
  font-size: 30px;
}

.login-card p,
.login-card small,
.admin-form label,
.admin-category p,
.admin-item small,
.admin-item em {
  color: var(--muted);
  line-height: 1.6;
  font-style: normal;
}

.login-card label,
.admin-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.login-card input,
.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.login-card button,
.admin-form button {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
}

.admin-panel.wide {
  grid-column: 1 / -1;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form.compact,
.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-field {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analytics-grid article,
.admin-category {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
}

.analytics-grid strong {
  color: var(--accent);
  font-size: 34px;
  line-height: 1;
}

.analytics-grid span {
  color: var(--muted);
  font-weight: 800;
}

.admin-list,
.admin-category header,
.admin-item,
.item-actions {
  display: grid;
  gap: 12px;
}

.admin-sortbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 120, 255, 0.22);
  border-radius: 16px;
  background: rgba(52, 120, 255, 0.08);
  color: var(--text);
  font-weight: 800;
}

.admin-sortbar[hidden] {
  display: none;
}

.admin-sortbar div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-category header,
.admin-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.item-actions button,
.admin-category header button,
.admin-link-button,
.admin-sortbar button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
}

.admin-link-button {
  display: inline-flex;
  align-items: center;
}

.item-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.admin-sortbar button:first-child {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.takeout-main {
  display: grid;
  gap: 28px;
  padding: 58px 0 20px;
}

.takeout-header {
  position: sticky;
}

.takeout-hero,
.takeout-guide,
.takeout-section {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .takeout-hero,
[data-theme="dark"] .takeout-guide,
[data-theme="dark"] .takeout-section {
  border-color: var(--line);
}

.takeout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: 420px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 151, 54, 0.16), transparent 18rem),
    radial-gradient(circle at 85% 18%, rgba(52, 120, 255, 0.14), transparent 22rem),
    var(--panel);
}

.takeout-hero-copy h1 {
  max-width: 760px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
}

.takeout-hero-copy p:not(.takeout-eyebrow) {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.takeout-eyebrow {
  margin: 0 0 12px;
  background: linear-gradient(90deg, #ff6b2b, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.takeout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.takeout-button,
.takeout-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.takeout-button:hover,
.takeout-card-link:hover {
  transform: translateY(-2px);
}

.takeout-button-primary,
.takeout-card-link {
  background: linear-gradient(135deg, #ff6b2b, #ffb142);
  color: #fff;
  box-shadow: 0 14px 34px rgba(255, 107, 43, 0.22);
}

.takeout-button-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
}

.takeout-hero-card,
.takeout-entry-card,
.takeout-qrcode,
.takeout-tip {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 48px rgba(48, 94, 170, 0.1);
}

[data-theme="dark"] .takeout-hero-card,
[data-theme="dark"] .takeout-entry-card,
[data-theme="dark"] .takeout-qrcode,
[data-theme="dark"] .takeout-tip,
[data-theme="dark"] .takeout-button-ghost {
  background: rgba(24, 33, 50, 0.72);
}

.takeout-hero-card {
  padding: 30px;
}

.takeout-icon,
.takeout-entry-icon {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff4d4f, #ffb142);
}

.takeout-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(255, 107, 43, 0.24);
}

.takeout-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.takeout-hero-card h2,
.takeout-guide h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.18;
}

.takeout-hero-card p,
.takeout-guide-copy > p,
.takeout-entry-card p,
.takeout-note li {
  color: var(--muted);
  line-height: 1.75;
}

.takeout-hero-card p {
  margin-top: 14px;
  font-size: 16px;
}

.takeout-section,
.takeout-guide {
  padding: clamp(24px, 4vw, 36px);
}

.takeout-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.takeout-entry-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.takeout-entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 120, 255, 0.46);
  box-shadow: var(--shadow-hover);
}

.takeout-entry-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 900;
}

.takeout-entry-card h3 {
  font-size: 21px;
}

.takeout-entry-card small {
  color: var(--muted);
  line-height: 1.6;
}

.takeout-card-link {
  width: fit-content;
  margin-top: auto;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.takeout-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 520px);
  gap: 24px;
  align-items: stretch;
}

.takeout-guide-copy > p {
  margin-top: 14px;
  font-size: 16px;
}

.takeout-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style-position: inside;
  color: var(--text);
  font-weight: 800;
}

.takeout-steps li::marker {
  color: var(--accent);
  font-weight: 900;
}

.takeout-tip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 107, 43, 0.1), rgba(52, 120, 255, 0.08)),
    rgba(255, 255, 255, 0.68);
}

.takeout-tip strong {
  grid-column: 1 / -1;
}

.takeout-tip span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid rgba(52, 120, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.takeout-qrcode {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
}

.takeout-qrcode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(36, 190, 96, 0.14), rgba(52, 120, 255, 0.1));
}

.takeout-qrcode-head strong {
  color: var(--muted);
  font-size: 13px;
}

.takeout-qrcode-head span {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.takeout-qrcode img {
  display: block;
  width: 100%;
  max-width: none;
  border-radius: 18px;
}

.takeout-qrcode-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.takeout-qrcode-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.takeout-qrcode-meta span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.takeout-note ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

@media (max-width: 1180px) {
  .tool-direct-grid,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1240px);
  }

  main {
    width: min(100% - 24px, 1240px);
  }

  .site-header {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-logo {
    width: 132px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-nav a {
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
    padding: 52px 0 34px;
  }

  .hero h1 {
    font-size: clamp(34px, 9vw, 42px);
  }

  .hero-copy p:last-of-type {
    font-size: 16px;
  }

  .search-shell {
    width: 100%;
  }

  .app-layout,
  .admin-shell,
  .analytics-grid,
  .admin-form.compact,
  .grid-form,
  .takeout-hero,
  .takeout-guide {
    grid-template-columns: 1fr;
  }

  .takeout-main {
    padding-top: 34px;
  }

  .takeout-entry-grid {
    grid-template-columns: 1fr;
  }

  .takeout-steps,
  .takeout-tip,
  .takeout-qrcode-meta {
    grid-template-columns: 1fr;
  }

  .side-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 10px;
    scroll-snap-type: x proximity;
  }

  .side-tabs button {
    flex: 0 0 auto;
    min-width: 116px;
    scroll-snap-align: start;
  }

  .sub-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .sub-tabs button {
    flex: 0 0 auto;
  }

  .admin-panel.wide,
  .wide-field {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .tool-direct {
    padding: 20px;
  }

  .tool-direct-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .quick-tool {
    min-height: 96px;
  }

  .takeout-hero,
  .takeout-section,
  .takeout-guide {
    border-radius: 22px;
  }

  .takeout-hero-copy h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .takeout-actions,
  .takeout-button {
    width: 100%;
  }

  .resource-card {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 20px;
  }

  .resource-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .resource-icon img {
    width: 36px;
    height: 36px;
  }

  .site-footer,
  .admin-category header,
  .admin-item {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .item-actions {
    justify-content: flex-start;
  }
}
