:root {
  color-scheme: light;
  --page-bg: #f3f5f8;
  --panel-bg: #ffffff;
  --line: #d9dee7;
  --text: #202733;
  --muted: #667085;
  --field-bg: #ffffff;
  --soft-bg: #fbfcfe;
  --chip-bg: #edf1f7;
  --button-text: #344054;
  --hover-bg: rgba(255, 255, 255, 0.5);
  --link: #2563eb;
  --footer-bg: #000000;
  --footer-text: #ffffff;
  --header-h: 50px;
  --min-col-w: 370px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #101418;
  --panel-bg: #171d23;
  --line: #303a45;
  --text: #e6ebf0;
  --muted: #9aa7b4;
  --field-bg: #11171d;
  --soft-bg: #1d242c;
  --chip-bg: #26313b;
  --button-text: #d8e0e8;
  --hover-bg: rgba(255, 255, 255, 0.07);
  --link: #6ea8ff;
  --footer-bg: #0b0f13;
  --footer-text: #e6ebf0;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

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

.five-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: var(--header-h);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-bg);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

/* Tabler 風格大頭貼清單（stacked），靠右顯示 */
.brand-avatars {
  margin-left: auto;
  flex: 0 0 auto;
}

/* 比 app-avatar（34px）小一點點，並加外框線 */
.brand-avatars .avatar {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  z-index: 1;
  transition: transform 0.3s ease, z-index 0s;
}

/* 循環置頂：被選中的頭貼移到最上層並略為放大凸顯 */
.brand-avatars .avatar.is-top {
  z-index: 10;
  transform: scale(1.12);
}

.avatar-list-stacked {
  display: inline-flex;
  align-items: center;
}

.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--chip-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 4px;
  vertical-align: bottom;
}

.avatar.rounded-circle {
  border-radius: 50%;
}

.avatar-list-stacked .avatar {
  margin-right: -0.5rem;
  box-shadow: 0 0 0 2px var(--panel-bg);
}

.avatar-list-stacked .avatar:last-child {
  margin-right: 0;
}

.app-avatar {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.app-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  margin-top: 7px;
}

.column-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 64px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  margin-top: -7px;
}

.app-header h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.column-indicator button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--button-text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.column-indicator [data-left-dot],
.column-indicator [data-right-dot] {
  color: var(--muted);
}

.column-indicator button:disabled {
  color: var(--muted);
  cursor: default;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 100%;
}

.search-wrap {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  width: auto;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  overflow: hidden;
}

.search-wrap:focus-within {
  border-color: #64748b;
}

.quick-search {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 6px 0 8px;
  border: 0;
  background: var(--field-bg);
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.search-status {
  min-width: 38px;
  max-width: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 0.8;
  text-align: right;
}

.search-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--field-bg);
  color: var(--button-text);
  cursor: pointer;
  font-family: math;
  font-size: 11px;
  font-weight: 700;
}

.search-nav:disabled {
  color: #a0a8b3;
  cursor: default;
}

[x-cloak] {
  display: none !important;
}

.auth-email {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--button-text);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.logout-button:hover {
  border-color: #b8c0cc;
  color: var(--text);
}

.search-highlight {
  border-radius: 2px;
  background: #fef08a;
  color: #1f2937;
}

.search-highlight-current {
  background: #f97316;
  color: #ffffff;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  background: var(--page-bg);
}

.auth-box {
  width: 100%;
  max-width: 360px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
}

.auth-cover {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 14px;
  border-radius: 4px;
}

.auth-box h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.auth-box p {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 11px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.auth-form label,
.auth-target {
  color: var(--button-text);
  font-size: 11px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.auth-form input:focus {
  border-color: #64748b;
}

.auth-form button {
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: #1f2937;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-message {
  margin-top: 10px;
  padding: 8px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.auth-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.auth-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.columns {
  display: grid;
  grid-template-columns: repeat(var(--visible-cols, 5), minmax(var(--min-col-w), 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 8px;
  touch-action: pan-y;
}

.column {
  display: flex;
  flex-direction: column;
  min-width: var(--min-col-w);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-bg);
}

.five-app.is-ready .column {
  display: none;
}

.five-app.is-ready .column.is-visible {
  display: flex;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-bg);
  transition: min-height 0.16s ease, padding 0.16s ease, opacity 0.16s ease, border-color 0.16s ease;
  overflow: hidden;
}

.column-header h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.column-header span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: -2px;
}

.column-header strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--button-text);
  font-size: 11px;
  white-space: nowrap;
}

.column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #a9b2c0 transparent;
  touch-action: pan-y;
}

.column-body::-webkit-scrollbar {
  width: 8px;
}

.column-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #a9b2c0;
  background-clip: padding-box;
}

.column-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.column-footer > span {
  min-width: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* min-width: 52px; */
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--button-text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--button-text);
  outline: none;
}

.col-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 56px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.col-nav:hover,
.col-nav:focus-visible {
  border-color: currentColor;
  outline: none;
}

.col-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.col-footer-hint {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  /* opacity: 0.85; */
}

/* 寬螢幕顯示五欄（含以上）時，不顯示 column-footer */
.five-app.cols-5plus .column-footer {
  display: none;
}

.color-block {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-block:hover {
  transform: translateY(-1px);
  background: var(--hover-bg);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.22);
}

.color-block.is-actionable {
  cursor: pointer;
}

.color-block.is-actionable:focus-visible {
  outline: 2px solid var(--block-color);
  outline-offset: 2px;
}

.column-body--iframe {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.column-iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
  background: var(--field-bg);
  display: block;
}

.color-block > i {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 22px;
  color: color-mix(in srgb, var(--block-color) 58%, transparent);
  pointer-events: none;
  transition: color 0.15s ease;
}

.color-block:hover > i {
  color: var(--block-color);
}

.color-block strong {
  padding-right: 30px;
  font-size: 13px;
  font-weight: 700;
}

.color-block span {
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

/* 免費 OpenCart 健檢卡片：綠底白字 */
.color-block[data-view="checkup"] {
  --block-color: #065f46;
  background: #047857;
  border-color: #047857;
  color: #ffffff;
}

.color-block[data-view="checkup"]:hover {
  background: #065f46;
  border-color: #065f46;
}

.color-block[data-view="checkup"] span {
  color: rgba(255, 255, 255, 0.88);
}

.post-card {
  position: relative;
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.post-card.is-unread::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.post-card:hover {
  transform: translateY(-1px);
  background: var(--hover-bg);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.14);
  text-decoration: none;
}

.post-card.selected {
  border-color: #2563eb;
  background: var(--soft-bg);
}

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

.post-search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.post-search-input {
  min-width: 0;
  height: 34px;
  flex: 1;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.post-search-input:focus {
  border-color: #64748b;
}

.post-search-form button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--button-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.post-search-recent,
.post-search-selected {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.post-search-recent h3,
.post-search-selected h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.post-search-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-search-keyword {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--button-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.post-search-keyword span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-search-keyword strong {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid var(--field-bg);
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 16px;
  transform: translateY(-0.5px);
}

.post-search-result-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.post-list-loading {
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.post-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.post-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  margin-top: 5px;
}

.post-keyword {
  /* color: #2563eb; */
  font-size: 12px;
  /* font-weight: 700; */
  padding: 0 2px 0 2px;
}

.post-title {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.post-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-state {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.comments-panel .comment-list > .empty-state {
  display: none;
}

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

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-card small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 700;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.client-section {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.client-section h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
}

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

.client-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field-bg);
}

.client-card img {
  display: block;
  max-width: 100%;
  /* max-height: 105px; */
  object-fit: contain;
}

.post-detail,
.comment-detail,
.comments-panel {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
}

.post-detail-time,
.comment-detail time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.post-detail h3 {
  margin: 6px 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.post-detail-desc {
  display: none;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.post-detail-content {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.post-detail-content p {
  margin: 3px 0;
}

.post-detail-content img,
.post-detail-content iframe {
  max-width: 100%;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.detail-tag {
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
}

.comments-panel h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 13px;
}

.comment-card {
  display: flex;
  width: 100%;
  gap: 8px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.comment-card:hover {
  background: var(--hover-bg);
}

.comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  object-fit: cover;
}

.comment-card-body {
  display: block;
  min-width: 0;
  flex: 1;
}

.comment-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.comment-card-head strong,
.comment-detail strong {
  color: var(--text);
  font-size: 12px;
}

.comment-card-head time {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.comment-card-text {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.comment-card-replies {
  display: block;
  margin-top: 4px;
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
}

.comment-detail-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.comment-detail-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.comment-replies {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.comment-replies h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.comment-reply {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.comment-reply:first-of-type {
  border-top: 0;
}

.comment-form {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.comment-input-wrap {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.comment-input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  outline: none;
}

.comment-input:focus {
  border-color: #64748b;
}

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

.comment-submit {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #2563eb;
  border-radius: 4px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.comment-submit:disabled {
  border-color: var(--line);
  background: #edf1f7;
  color: #98a2b3;
  cursor: default;
}

.visit-timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 18px;
}

.visit-timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 4px;
  width: 1px;
  background: var(--line);
}

.visit-item {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 0 0 14px 0;
}

.visit-item::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -16px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
}

.visit-item time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.visit-item strong {
  color: var(--text);
  font-size: 13px;
}

.visit-item a {
  color: var(--link);
  font-size: 14px;
  /* font-weight: 700; */
  overflow-wrap: anywhere;
  text-decoration: none;
}

.visit-link-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.visit-link-row a {
  min-width: 0;
}

.visit-link-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--button-text);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}

.visit-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

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

.price-item {
  position: relative;
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.price-item:last-child {
  border-bottom: 1px solid var(--line);
}

a.price-item {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.price-item:hover {
  transform: translateY(-1px);
  background: var(--hover-bg);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.14);
  text-decoration: none;
}

.price-keyword {
  position: absolute;
  top: 8px;
  right: 10px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 6px;
  border: 1px solid #2563eb;
  border-radius: 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
}

.price-item .price-title {
  padding-right: 72px;
}

.price-title {
  display: block;
  color: var(--button-text);
  font-size: 13px;
  /* font-weight: 800; */
}

.price-amount {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.price-amount span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.price-highlights {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 8px 0 0;
  background: var(--panel-bg);
}

.price-highlight {
  padding: 12px;
  border: 1px solid #9cc6f7;
  border-radius: 6px;
  background: var(--soft-bg);
}

.price-highlight .price-title {
  /* color: #1d4ed8; */
}

@media (max-width: 760px) {
  body {
    font-size: 12px;
  }

  .app-header {
    min-height: 46px;
    padding: 7px 10px;
  }

  .header-actions {
    gap: 6px;
  }

  .auth-email {
    display: none;
  }

  .search-wrap {
    width: 184px;
    height: 28px;
  }

  .quick-search {
    font-size: 12px;
  }

  .search-status {
    min-width: 34px;
  }

  .app-header h1 {
    font-size: 13px;
  }

  .columns {
    padding: 8px;
  }

  .column {
    height: 100%;
    max-height: 100%;
  }

  .column-body {
    overflow-y: scroll;
  }

  .column-header {
    min-height: 42px;
  }

  .color-block {
    min-height: 82px;
  }
}

@media (min-width: 764px) {
  /* 寬螢幕一律單欄：內容置中成窄欄，兩側以背景圖填滿（參考 mydomain.com.tw 作法） */
  body {
    background-image: linear-gradient(rgba(16, 20, 24, 0.15), rgba(16, 20, 24, 0.45)),
                      var(--bg-image-url);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
  }

  .five-app {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: var(--page-bg);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 761px) {
  .five-app.has-col3-focus .column:not([data-column-key="posts"]) {
    opacity: .38;
    filter: grayscale(.15);
  }

  .five-app.has-col3-focus .column:hover,
  .five-app.has-col3-focus .column:focus-within,
  .five-app.has-col3-focus .column[data-column-key="posts"] {
    opacity: 1;
    filter: none;
  }
}
