:root {
  --bg-base: #f6f7f9;
  --bg-panel: #ffffff;
  --bg-soft: #eef3f8;
  --border: #dde3ea;
  --border-strong: #c9d3df;
  --text: #171b22;
  --muted: #5b6675;
  --faint: #8a96a7;
  --blue: #1769e0;
  --blue-dark: #0f4fb2;
  --cyan: #0c9fb0;
  --green: #12805c;
  --amber: #a16207;
  --rose: #be123c;
  --violet: #6d4aff;
  --shadow: 0 12px 32px rgba(23, 27, 34, 0.08);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: Inter, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: flex;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  transition: width 0.18s ease, flex-basis 0.18s ease, transform 0.2s ease;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand-mark,
.footer-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 8px 18px rgba(23, 105, 224, 0.24);
}

.brand-mark svg,
.footer-icon svg,
.nav-item svg,
.icon-button svg,
.sync-badge svg {
  width: 17px;
  height: 17px;
}

.brand-row {
  display: flex;
  gap: 7px;
  align-items: center;
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand p {
  margin: 3px 0 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.sidebar-controls {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.sidebar-icon-button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.version-pill {
  border: 0;
  border-radius: 6px;
  padding: 3px 6px;
  color: #fff;
  background: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
}

.nav-section,
.nav-section-row {
  margin: 18px 8px 8px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-section-row .nav-section {
  margin: 0;
}

.accent { color: var(--blue); }
.muted-section { margin-top: 28px; }

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.nav-item,
.subnav button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
}

.nav-item:hover,
.nav-item.active {
  color: var(--blue);
  background: #eaf2ff;
}

.nav-item .chevron {
  margin-left: auto;
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.nav-item.closed .chevron {
  transform: rotate(-90deg);
}

.subnav {
  display: none;
  margin: 3px 0 8px 19px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.subnav.open {
  display: block;
}

.subnav button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.subnav button:hover,
.subnav button.active {
  color: var(--blue);
  background: #f0f5fb;
}

.sidebar-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.footer-settings-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin-left: auto;
}

.footer-settings-button:hover,
.footer-settings-button.active {
  color: var(--blue);
  background: #eaf2ff;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  font-size: 12px;
}

.sidebar-footer span {
  margin-top: 2px;
  font-size: 10px;
  color: var(--faint);
}

.main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topbar {
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--bg-panel);
}

.sidebar.collapsed {
  width: 78px;
  flex-basis: 78px;
}

.sidebar.collapsed .brand {
  justify-content: center;
  padding: 18px 12px;
}

.sidebar.collapsed .brand-mark {
  display: none;
}

.sidebar.collapsed .brand-copy,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .subnav,
.sidebar.collapsed .sidebar-footer div:not(.footer-icon) {
  display: none;
}

.sidebar.collapsed .sidebar-controls {
  margin-left: 0;
  flex-direction: column;
}

.sidebar.collapsed .nav {
  padding: 14px 10px;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  gap: 0;
  padding: 9px;
}

.sidebar.collapsed .nav-item .chevron {
  display: none;
}

.sidebar.collapsed .sidebar-footer {
  flex-direction: column;
  justify-content: center;
}

.sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--blue);
  background: #eef5ff;
  font-size: 11px;
  font-weight: 800;
}

.sync-badge svg {
  color: var(--green);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}

.view {
  animation: slide-up 0.22s ease-out;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.hero-card,
.metric-card,
.tool-card,
.notice,
.tool-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.hero-card {
  min-height: 144px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.hero-card.primary {
  grid-column: span 2;
  color: #fff;
  background: #3e1450;
}

.hero-card.weather {
  grid-column: span 2;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.hero-card.meal,
.hero-card.rooms {
  grid-column: span 3;
}

.card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-topline {
  margin-bottom: 12px;
}

.card-topline .card-label {
  margin-bottom: 0;
}

.hero-card.meal > .future-badge,
.hero-card.rooms > .future-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.hero-card.primary .card-label,
.hero-card.weather .card-label {
  color: rgba(255, 255, 255, 0.7);
}

.hero-title {
  margin: 0;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.hero-card.primary .hero-copy,
.hero-card.weather .hero-copy {
  color: rgba(255, 255, 255, 0.75);
}

.weather-row,
.room-grid,
.meal-grid {
  display: grid;
  gap: 10px;
}

.weather-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.weather-condition-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.weather-condition-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 2.2;
}

.weather-temp {
  font-size: 32px;
  font-weight: 900;
}

.weather-location {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.weather-detail-grid div {
  min-width: 0;
  padding: 9px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.weather-detail-grid strong,
.weather-detail-grid span {
  display: block;
}

.weather-detail-grid strong {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-detail-grid span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 850;
}

.meal-grid,
.room-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-box {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-soft);
}

.mini-box strong,
.mini-box span {
  display: block;
}

.mini-box strong {
  font-size: 18px;
  font-weight: 900;
}

.mini-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 14px;
}

.dashboard-heading {
  justify-content: space-between;
  margin-top: 0;
}

.dashboard-heading h3 {
  margin-right: auto;
}

.dashboard-heading .compact-button {
  min-height: 34px;
  margin-left: auto;
  padding: 7px 10px;
}

.dashboard-heading .compact-button svg,
.dashboard-form-actions svg {
  width: 14px;
  height: 14px;
}

.section-heading::before {
  content: "";
  width: 6px;
  height: 24px;
  border-radius: 3px;
  background: var(--blue);
}

.section-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue);
  background: #eef5ff;
  font-size: 11px;
  font-weight: 800;
}

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

.tool-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.tool-category,
.tool-status {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-category { color: var(--faint); }

.tool-status {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef5ff;
}

.tool-card h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.tool-card p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tool-card button,
.primary-button,
.secondary-button,
.danger-button {
  align-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 850;
  gap: 7px;
}

.tool-card button,
.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  justify-content: center;
}

.tool-card button,
.primary-button {
  margin-top: auto;
  color: #fff;
  background: var(--blue);
}

.secondary-button {
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.danger-button {
  color: #fff;
  background: var(--rose);
}

.notice {
  margin-top: 26px;
  padding: 22px;
  border-left: 6px solid var(--blue);
}

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

.notice h4 {
  margin: 0 0 7px;
  font-size: 13px;
}

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

.dashboard-editor {
  margin: -12px 0 28px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

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

.form-group {
  min-width: 0;
}

.form-group.wide {
  grid-column: span 2;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-form-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.tool-panel {
  min-height: calc(100dvh - 100px);
  overflow: hidden;
}

.tool-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.tool-panel-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.tool-panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tool-body {
  padding: 20px;
}

.placeholder-box {
  display: grid;
  place-items: center;
  min-height: 380px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: #fafcff;
  text-align: center;
}

.placeholder-box svg {
  width: 44px;
  height: 44px;
  color: var(--blue);
}

.placeholder-box h4 {
  margin: 14px 0 6px;
  font-size: 18px;
}

.placeholder-box p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cleaner-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}

.signature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.signature-main,
.signature-control {
  min-width: 0;
}

.signature-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.signature-section-head h4,
.signature-guide h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.signature-preview {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}

.signature-html-output {
  min-height: 170px;
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
}

.signature-form {
  display: grid;
  gap: 12px;
}

.signature-form .form-group span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signature-guide {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.signature-guide ol {
  margin: 10px 0 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.text-area-card {
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.text-area-card label,
.control-card h4 {
  margin: 0 0 9px;
  font-size: 13px;
  font-weight: 900;
}

textarea {
  width: 100%;
  min-height: 380px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  background: #fbfcfe;
  line-height: 1.55;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #fbfcfe;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

input[type="color"] {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  background: #fbfcfe;
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(23, 105, 224, 0.18);
  border-color: var(--blue);
}

.control-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.option-list {
  display: grid;
  gap: 10px;
}

.check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stat-box {
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-soft);
}

.stat-box strong,
.stat-box span {
  display: block;
}

.stat-box strong {
  font-size: 17px;
  font-weight: 900;
}

.stat-box span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.diff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.diff-workspace {
  min-width: 0;
  overflow-x: auto;
}

.diff-input-grid,
.diff-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.diff-input-grid {
  min-width: 620px;
}

.diff-output-grid {
  margin-top: 14px;
}

.diff-input-grid .text-area-card {
  min-height: 0;
}

.diff-textarea {
  min-height: 260px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.diff-input-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.diff-input-head label {
  margin: 0;
}

.diff-input-head input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.diff-file-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--blue);
  background: #eef5ff;
  font-size: 11px;
  font-weight: 900;
}

.diff-file-button svg {
  width: 13px;
  height: 13px;
}

.diff-file-name {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diff-table-card,
.diff-unified-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.diff-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.diff-card-head strong,
.diff-card-head small {
  display: block;
}

.diff-card-head strong {
  font-size: 13px;
  font-weight: 900;
}

.diff-card-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.diff-table {
  max-height: 390px;
  overflow: auto;
}

.diff-table-header,
.diff-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
}

.diff-table-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  background: #f4f7fb;
}

.diff-table-header span,
.diff-table-header strong {
  padding: 8px 10px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diff-table-header span {
  border-left: 0;
  text-align: right;
}

.diff-row {
  border-bottom: 1px solid var(--border);
}

.diff-row:last-child {
  border-bottom: 0;
}

.diff-line {
  padding: 9px 8px;
  color: var(--faint);
  background: var(--bg-soft);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.diff-row pre,
.diff-unified {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.diff-row pre {
  min-height: 38px;
  padding: 9px 10px;
  border-left: 1px solid var(--border);
}

.diff-row.equal pre {
  background: #fff;
}

.diff-row.change pre {
  background: #fff7e6;
}

.diff-row.insert pre:last-child {
  background: #eaf8f1;
}

.diff-row.delete pre:first-of-type {
  background: #fff0f3;
}

.diff-unified {
  max-height: 390px;
  min-height: 180px;
  padding: 12px;
  color: #e5edf7;
  background: #0f172a;
}

.diff-controls .option-list {
  margin-top: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.directory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.directory-summary article {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 5px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.directory-summary svg {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.directory-summary strong {
  font-size: 22px;
  font-weight: 900;
}

.directory-summary span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.directory-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 310px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96)),
    var(--bg-panel);
}

.directory-card.disabled {
  color: var(--muted);
  background: #fbfcfe;
}

.directory-card.enabled {
  border-color: rgba(23, 105, 224, 0.45);
  box-shadow: 0 10px 26px rgba(23, 105, 224, 0.1);
}

.directory-card.ok {
  border-color: rgba(18, 128, 92, 0.38);
  box-shadow: 0 12px 30px rgba(18, 128, 92, 0.09);
}

.directory-card.warn {
  border-color: rgba(161, 98, 7, 0.38);
  box-shadow: 0 12px 30px rgba(161, 98, 7, 0.08);
}

.directory-card.fail {
  border-color: rgba(190, 18, 60, 0.38);
  box-shadow: 0 12px 30px rgba(190, 18, 60, 0.08);
}

.directory-card-head,
.directory-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.directory-card-head {
  justify-content: space-between;
  gap: 14px;
}

.directory-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.directory-icon svg {
  width: 20px;
  height: 20px;
}

.directory-title h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.directory-title small,
.directory-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.directory-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef5ff;
  font-size: 10px;
  font-weight: 900;
}

.directory-status.ok {
  color: var(--green);
  background: #eaf8f1;
}

.directory-status.warn {
  color: var(--amber);
  background: #fff7e6;
}

.directory-status.fail {
  color: var(--rose);
  background: #fff0f3;
}

.directory-status.none {
  color: var(--muted);
  background: var(--bg-soft);
}

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

.directory-health div {
  min-width: 0;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 8px;
  background: var(--bg-soft);
}

.directory-health strong,
.directory-health span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-health strong {
  font-size: 20px;
  font-weight: 900;
}

.directory-health span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-meta-strip {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.directory-meta-strip div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.directory-meta-strip span {
  display: block;
  color: var(--faint);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-meta-strip strong {
  display: block;
  min-width: 0;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
}

.directory-links {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.settings-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.directory-link {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.directory-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.directory-note {
  min-height: 34px;
  margin: 0;
}

.directory-settings {
  margin-top: 22px;
}

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

.directory-form-section {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.directory-form-section.featured {
  border-color: rgba(23, 105, 224, 0.42);
  background: #f7fbff;
}

.directory-form-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.directory-form-title svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.directory-form-title h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.directory-form-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.directory-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.directory-field {
  min-width: 0;
}

.directory-field.wide {
  grid-column: span 2;
}

.directory-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-form-actions {
  margin-top: 0;
}

.speed-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.speed-readout {
  min-width: 0;
}

.speed-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.speed-value {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.speed-value strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 84px;
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
}

.speed-value span {
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
}

.speed-state {
  margin-top: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.speed-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.speed-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 0;
}

.speed-actions svg {
  width: 15px;
  height: 15px;
}

.speed-progress {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-soft);
}

.speed-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.24s ease;
}

.download-chart-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  margin-bottom: 12px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.chart-head strong,
.chart-head small {
  display: block;
}

.chart-head strong {
  font-size: 13px;
  font-weight: 900;
}

.chart-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chart-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.download-chart {
  height: 240px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.download-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-grid {
  stroke: #e8edf3;
  stroke-width: 1;
}

.chart-axis {
  stroke: #d5dde7;
  stroke-width: 1;
}

.chart-label,
.chart-unit,
.chart-x-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.chart-area {
  fill: rgba(23, 105, 224, 0.08);
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: var(--blue);
  stroke: #fff;
  stroke-width: 2;
}

.chart-dot.major {
  fill: var(--bg-panel);
  stroke: var(--blue);
  stroke-width: 2.5;
}

.chart-current {
  stroke: rgba(23, 105, 224, 0.3);
  stroke-width: 1.5;
}

.chart-current-label {
  fill: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}

.chart-average {
  stroke: rgba(18, 128, 92, 0.4);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.chart-average-label {
  fill: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.chart-empty {
  fill: var(--faint);
  font-size: 13px;
  font-weight: 800;
}

.speed-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}

.speed-metric {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.speed-metric span,
.speed-metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.speed-metric strong {
  display: block;
  min-width: 0;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 26px;
  font-weight: 900;
  white-space: nowrap;
}

.speed-metric small {
  margin-top: 5px;
  color: var(--faint);
  text-transform: none;
}

.tab-bar {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--border);
}

.tab-button {
  min-height: 38px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.tab-button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.net-tab-panel {
  display: none;
}

.net-tab-panel.active {
  display: block;
}

.pdf-tab-panel {
  display: none;
}

.pdf-tab-panel.active {
  display: block;
}

.pdf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.pdf-drop-card {
  min-height: 254px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: #fbfcfe;
}

.pdf-drop-card label,
.field-list span {
  font-size: 12px;
  font-weight: 900;
}

.pdf-file-info {
  flex: 1;
  min-height: 150px;
  overflow: auto;
  white-space: pre-line;
  border-radius: 8px;
  padding: 13px;
  color: var(--muted);
  background: var(--bg-soft);
  font-size: 12px;
  line-height: 1.5;
}

.field-list {
  display: grid;
  gap: 11px;
}

.field-list label {
  display: grid;
  gap: 7px;
}

.helper-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.image-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.image-workbench {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.image-drop-zone {
  min-height: 154px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfe;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.image-drop-zone.dragging,
.image-drop-zone:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef5ff;
}

.image-drop-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.image-drop-zone svg {
  width: 30px;
  height: 30px;
  color: var(--blue);
}

.image-drop-zone strong,
.image-drop-zone span {
  display: block;
}

.image-drop-zone strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.image-drop-zone span {
  max-width: 440px;
  font-size: 12px;
  line-height: 1.5;
}

.image-preview-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.image-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.image-preview-head strong,
.image-preview-head small {
  display: block;
}

.image-preview-head strong {
  font-size: 13px;
  font-weight: 900;
}

.image-preview-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.image-preview-stage {
  min-height: 430px;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(45deg, #eef3f8 25%, transparent 25%),
    linear-gradient(-45deg, #eef3f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef3f8 75%),
    linear-gradient(-45deg, transparent 75%, #eef3f8 75%);
  background-color: #fff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(23, 27, 34, 0.14);
}

.image-control-card {
  position: sticky;
  top: 0;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.image-check-row {
  margin: 2px 0;
}

.image-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.primary-button svg,
.secondary-button svg,
.danger-button svg {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}

.script-box,
.settings-panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.script-box {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.script-box strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.script-box p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.settings-list {
  display: grid;
  gap: 8px;
}

.security-panel {
  max-width: 620px;
}

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

.security-form .wide,
.security-actions,
.security-form .result-list {
  grid-column: 1 / -1;
}

.settings-row {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1fr) 46px;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.settings-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-icon {
  grid-column: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #eef5ff;
}

.settings-icon svg {
  width: 16px;
  height: 16px;
}

.settings-copy {
  grid-column: 2;
  min-width: 0;
}

.settings-copy strong,
.settings-copy small {
  display: block;
}

.settings-copy strong {
  font-size: 13px;
  font-weight: 900;
}

.settings-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.toggle-track {
  grid-column: 3;
  justify-self: end;
  width: 42px;
  height: 24px;
  position: relative;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.16s ease;
}

.toggle-track::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(23, 27, 34, 0.18);
  transition: transform 0.16s ease;
}

.settings-row input:checked ~ .toggle-track {
  background: var(--blue);
}

.settings-row input:checked ~ .toggle-track::after {
  transform: translateX(18px);
}

.netcheck-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.netcheck-layout.secondary {
  margin-top: 0;
}

.net-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.net-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.net-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.net-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.compact-button {
  flex: 0 0 auto;
  min-height: 34px;
  margin-top: 0;
}

.target-list {
  display: grid;
  gap: 8px;
}

.target-list label {
  font-size: 12px;
  font-weight: 900;
}

#targetUrls {
  min-height: 92px;
}

#netLogInput {
  min-height: 210px;
}

.net-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stat-box.ok {
  background: #eaf8f1;
}

.stat-box.warn {
  background: #fff7e6;
}

.stat-box.fail {
  background: #fff0f3;
}

.result-list,
.analysis-panel {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.result-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.result-row.ok {
  border-color: rgba(18, 128, 92, 0.28);
}

.result-row.warn {
  border-color: rgba(161, 98, 7, 0.32);
}

.result-row.fail {
  border-color: rgba(190, 18, 60, 0.3);
}

.result-status {
  display: grid;
  place-items: center;
  min-height: 26px;
  align-self: start;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.result-row.warn .result-status {
  background: var(--amber);
}

.result-row.fail .result-status {
  background: var(--rose);
}

.result-row strong,
.result-row p,
.result-row small {
  display: block;
}

.result-row strong {
  font-size: 13px;
  font-weight: 900;
}

.result-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.result-row small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.35;
}

.analysis-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue-dark);
}

.analysis-score strong {
  font-size: 19px;
  font-weight: 900;
}

.analysis-score span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.82;
}

.recommend-box {
  padding: 13px;
  border-radius: 8px;
  background: var(--bg-soft);
}

.recommend-box strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
}

.recommend-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.empty-state {
  min-height: 94px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--bg-panel);
  text-align: center;
  font-size: 12px;
  font-weight: 750;
}

.empty-state svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.custom-scrollbar::-webkit-scrollbar { width: 7px; height: 7px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #c4ceda; border-radius: 99px; }

@media (max-width: 1120px) {
  .hero-card.primary,
  .hero-card.weather,
  .hero-card.meal,
  .hero-card.rooms {
    grid-column: span 5;
  }

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

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

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    z-index: 40;
    width: 264px;
    flex-basis: 264px;
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

  .sidebar.collapsed {
    width: 264px;
    flex-basis: 264px;
  }

  .sidebar.collapsed .brand {
    justify-content: flex-start;
    padding: 22px 20px;
  }

  .sidebar.collapsed .brand-mark {
    display: grid;
  }

  .sidebar.collapsed .brand-copy,
  .sidebar.collapsed .nav-section,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .sidebar-footer div:not(.footer-icon) {
    display: block;
  }

  .sidebar.collapsed .subnav.open {
    display: block;
  }

  .sidebar.collapsed .sidebar-controls {
    margin-left: auto;
    flex-direction: row;
  }

  .sidebar.collapsed .nav {
    padding: 16px 14px;
  }

  .sidebar.collapsed .nav-item {
    justify-content: flex-start;
    gap: 11px;
    padding: 9px 10px;
  }

  .sidebar.collapsed .nav-item .chevron {
    display: block;
  }

  .sidebar.collapsed .sidebar-footer {
    justify-content: flex-start;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-overlay.show {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(23, 27, 34, 0.38);
  }

  .topbar {
    padding: 0 12px;
  }

  .sync-badge {
    display: none;
  }

  .content {
    padding: 14px;
  }

  .hero-grid,
  .tool-grid,
  .notice-grid,
  .cleaner-layout,
  .signature-layout,
  .diff-layout,
  .dashboard-form,
  .image-studio-layout,
  .pdf-layout,
  .netcheck-layout,
  .net-summary-grid,
  .speed-hero,
  .speed-metrics,
  .security-form,
  .directory-summary,
  .directory-field-grid,
  .settings-links {
    grid-template-columns: 1fr;
  }

  .directory-grid,
  .directory-health {
    grid-template-columns: 1fr;
  }

  .hero-card.primary,
  .hero-card.weather,
  .hero-card.meal,
  .hero-card.rooms {
    grid-column: span 1;
  }

  .tool-panel {
    min-height: calc(100dvh - 84px);
  }

  .tool-panel-header {
    flex-direction: column;
  }

  .meal-grid,
  .room-grid {
    grid-template-columns: 1fr;
  }

  .net-card-head {
    flex-direction: column;
  }

  .compact-button {
    width: 100%;
  }

  .script-box {
    flex-direction: column;
  }

  .speed-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .image-control-card {
    position: static;
  }

  .image-preview-head {
    flex-direction: column;
  }

  .image-preview-stage {
    min-height: 280px;
  }

  .settings-row {
    grid-template-columns: 32px minmax(0, 1fr) 46px;
  }

  .form-group.wide {
    grid-column: span 1;
  }

  .directory-field.wide {
    grid-column: span 1;
  }

  .speed-value {
    gap: 8px;
  }

  .speed-value span {
    font-size: 16px;
  }
}
