/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[hidden] {
  display: none !important;
}

:root {
  --bg: #111110;
  --surface: #1c1c1a;
  --surface-2: #252523;
  --border: #2e2e2b;
  --border-strong: #3d3d39;
  --text: #e8e6e1;
  --text-secondary: #9e9b94;
  --text-tertiary: #5c5a54;
  --accent: #e8e6e1;
  --accent-hover: #ccc9c1;
  --danger: #e05c4b;
  --danger-bg: #2a1a18;
  --danger-border: #5c2e28;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
}

html {
  font-size: 16px;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Header ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
  padding-right: 32px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}

.site-header h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.site-title {
  cursor: text;
  border-radius: 4px;
  transition: background 0.15s;
}
.site-title:hover {
  background: var(--surface-2);
  padding: 0 4px;
  margin: 0 -4px;
}

.title-input {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px solid #6366f1;
  border-radius: 4px;
  padding: 0 6px;
  outline: none;
  width: 220px;
  line-height: 1.4;
}

.site-header .subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Import toast ── */
.import-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #111110;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  z-index: 300;
  white-space: nowrap;
}

.import-toast.error {
  background: var(--danger);
}

/* ── Hamburger Menu Button ── */
.hamburger-menu {
  display: none;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}

.hamburger-menu:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ── Mobile Menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-content {
  position: fixed;
  top: var(--header-h, 60px);
  right: 0;
  width: 100%;
  max-width: 280px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-height: calc(100vh - var(--header-h, 60px));
  overflow-y: auto;
  z-index: 401;
  display: flex;
  flex-direction: column;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  text-decoration: none;
}

.mobile-menu-item:hover {
  background: rgba(232, 230, 225, 0.05);
  color: var(--text);
}

.mobile-menu-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.mobile-menu-add-company {
  color: var(--text);
  font-weight: 500;
  border-bottom: none;
}

/* ── Toolbar ── */
.toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: var(--header-h, 0px);
  z-index: 90;
}

.toolbar .container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar .container::-webkit-scrollbar {
  display: none;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.15s;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--border-strong);
  background: var(--surface);
}

.filter-tags {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.tag-pill {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
}

.tag-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.tag-pill.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ── Grid ── */
main.container {
  padding-top: 24px;
  padding-bottom: 48px;
  min-height: 500px;
}

.results-count {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: "DM Mono", monospace;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s,
    transform 0.12s;
  cursor: default;
}

.card {
  cursor: grab;
  user-select: none;
}

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

.card--expanded {
  border: 2px solid #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(99, 102, 241, 0.06);
}

.card--dragging {
  opacity: 0.35;
  cursor: grabbing;
  box-shadow: none;
  transform: none;
}

.card--drag-over {
  border-color: var(--text);
  border-style: dashed;
  background: var(--surface-2);
  transform: scale(1.02);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 20px;
  margin-top: 2px;
}

.card-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-url {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-open {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}

.btn-open:hover {
  background: var(--accent-hover);
}

.btn-open svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-icon-sm {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.btn-icon-sm:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}

.btn-icon-sm.danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.btn-icon-sm svg {
  width: 14px;
  height: 14px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 64px 0;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.empty-state span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-open,
[data-theme="dark"] .tag-pill.active {
  color: #111110;
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
  margin-top: -1px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ── Market pulse button ── */
.btn-ghost.btn-market {
  text-decoration: none;
  border-color: #22c55e;
  color: #22c55e;
}

.btn-ghost.btn-market:hover {
  text-decoration: none;
  border-color: #16a34a;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.08);
}

/* ── LinkedIn button override ── */
.btn-ghost.btn-linkedin {
  background: #0a66c2;
  color: #fff;
  border: none;
}

.btn-ghost.btn-linkedin:hover {
  background: #004182;
}

.btn-danger {
  padding: 9px 16px;
  background: var(--danger);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.12s;
}

.btn-danger:hover {
  opacity: 0.88;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
  animation: modal-in 0.15s ease;
}

.modal--sm {
  max-width: 340px;
}

.modal--lg {
  max-width: 620px;
}

/* ── Guide Modal ── */
.guide-body {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 8px;
}

.guide-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 10px;
  color: var(--text);
}

.guide-body h4 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

.guide-body p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 8px 0;
}

.guide-body ul {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 20px;
}

.guide-body li {
  margin-bottom: 6px;
}

.guide-section {
  margin-bottom: 12px;
}

.guide-section.caution {
  padding: 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
}

.guide-section.caution p {
  margin: 0;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition:
    background 0.12s,
    color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.req {
  color: var(--danger);
}

.field input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--border-strong);
  background: var(--surface);
}

.field input.error {
  border-color: var(--danger);
}

.field-hint {
  font-size: 11px;
  color: var(--text-tertiary);
}

.field-error {
  font-size: 11px;
  color: var(--danger);
}

.modal-footer {
  padding: 0 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Daily progress (toolbar) ── */
.dp-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 8px;
}

.dp-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.dp-label {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dp-count {
  font-size: 13px;
  font-weight: 600;
  font-family: "DM Mono", monospace;
  color: var(--text);
}

.dp-bar-track {
  width: 80px;
  height: 5px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.dp-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

.dp-history-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  flex-shrink: 0;
}

.dp-history-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}

/* ── Visited card state ── */
.card--visited {
  border-top: 2px solid #22c55e;
}

.visited-chip {
  font-size: 10px;
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 99px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
}

.visited-chip:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* ── Calendar ── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-month-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cal-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.cal-nav-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text);
}
.cal-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 0 6px;
}

.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  min-height: 46px;
  border: 1px solid transparent;
}

.cal-cell--empty {
  border: none;
}

.cal-cell--active {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.cal-cell--future {
  opacity: 0.35;
}

.cal-day-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-cell--today .cal-day-num {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.cal-tally {
  font-size: 9px;
  font-family: "DM Mono", monospace;
  font-weight: 600;
  color: #16a34a;
  line-height: 1;
}

.cal-summary {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  font-family: "DM Mono", monospace;
}

/* ── Contact toggle ── */
.card-contact-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  padding: 8px 0 0;
  margin-top: 4px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: color 0.12s;
}

.card-contact-toggle:hover {
  color: var(--text);
}

.card-contact-toggle.active {
  color: #6366f1;
  font-weight: 600;
}

.card-contact-toggle svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.card-contact-toggle span {
  flex: 1;
}

/* ── Email panel (full-width grid breakout) ── */
.email-panel {
  grid-column: 1 / -1;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid #6366f1;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

.email-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.email-panel-title svg {
  width: 14px;
  height: 14px;
}

.email-panel-close {
  font-size: 12px;
  padding: 6px 12px;
}

.card-emails-empty {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 4px 0 8px;
}

/* ── Contact table ── */
.contact-table-wrap {
  overflow-x: auto;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.contact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.contact-table thead tr {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.contact-table th {
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.contact-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.contact-table tbody tr:last-child td {
  border-bottom: none;
}

.contact-table tbody tr:hover {
  background: var(--surface-2);
}

.ct-actions {
  display: flex;
  gap: 4px;
}

.ct-name {
  font-weight: 500;
  white-space: nowrap;
}

.ct-role {
  color: var(--text-secondary);
  white-space: nowrap;
}

.ct-empty {
  color: var(--text-tertiary);
}

.ct-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.ct-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.ct-linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #0a66c2;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.12s;
}

.ct-linkedin-btn:hover {
  opacity: 0.85;
}

.email-add-btn {
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  width: 100%;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.12s;
}

.email-add-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}

/* ── Email modal select ── */
.field-select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%239e9b94' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.field-select:focus {
  outline: none;
  border-color: var(--border-strong);
  background-color: var(--surface);
}

/* ── Responsive ── */

/* Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Tablets & Small laptops (max-width: 768px) */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  /* Header */
  .site-header {
    padding: 14px 0;
  }

  .site-header .container {
    gap: 12px;
    padding-left: 12px;
    padding-right: 16px;
  }

  .logo-mark {
    font-size: 22px;
  }

  .site-header h1 {
    font-size: 16px;
  }

  .site-header .subtitle {
    display: none;
  }

  .header-actions {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Buttons */
  .btn-ghost,
  .btn-primary {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .btn-icon {
    font-size: 16px;
  }

  /* Toolbar */
  .toolbar {
    padding: 10px 0;
  }

  .toolbar .container {
    gap: 8px;
    flex-wrap: wrap;
  }

  .search-wrap {
    min-width: 120px;
    max-width: 100%;
    flex: 1 1 100%;
    order: -1;
  }

  .filter-tags {
    gap: 4px;
  }

  .tag-pill {
    padding: 4px 10px;
    font-size: 11px;
  }

  /* Grid */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  main.container {
    padding-top: 16px;
    padding-bottom: 32px;
  }

  /* Card */
  .card {
    padding: 12px;
    gap: 10px;
  }

  .card-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .card-name {
    font-size: 13px;
  }

  .card-tag {
    font-size: 10px;
    padding: 0 6px;
  }

  .card-note {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }

  .card-url {
    font-size: 9px;
  }

  .btn-open {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Modal */
  .modal-content {
    max-width: 90vw;
    margin: 16px;
  }

  .modal-header h2 {
    font-size: 16px;
  }

  .modal--lg {
    max-width: 90vw;
  }

  .guide-body {
    max-height: 60vh;
  }

  .guide-body h3 {
    font-size: 14px;
    margin-top: 14px;
  }

  .guide-body h4 {
    font-size: 12px;
  }

  .guide-body p,
  .guide-body ul {
    font-size: 12px;
  }

  /* Form */
  .field-group {
    margin-bottom: 12px;
  }

  .field-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .field-input,
  .field-textarea,
  .field-select {
    font-size: 14px;
    padding: 8px 10px;
  }

  /* Daily progress */
  .dp-wrap {
    gap: 8px;
    font-size: 11px;
  }

  .dp-label {
    font-size: 11px;
  }

  .dp-count {
    font-size: 12px;
  }

  /* History calendar */
  .cal-container {
    max-width: 85vw;
  }

  .cal-header h3 {
    font-size: 14px;
  }

  .cal-grid {
    gap: 4px;
  }

  .cal-cell {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 12px;
  }

  /* Header */
  .site-header {
    padding: 10px 0;
  }

  .site-header .container {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-left: 8px;
    padding-right: 12px;
  }

  .header-left {
    flex-shrink: 0;
  }

  .logo-mark {
    font-size: 20px;
  }

  .site-header h1 {
    font-size: 14px;
  }

  .hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions {
    display: none;
  }

  /* Buttons */
  .btn-ghost,
  .btn-primary {
    height: 38px;
    padding: 0 10px;
    font-size: 11px;
    gap: 4px;
    flex-shrink: 0;
  }

  .btn-ghost svg,
  .btn-primary svg {
    width: 12px;
    height: 12px;
  }

  .btn-icon {
    font-size: 14px;
  }

  /* Toolbar */
  .toolbar {
    padding: 8px 0;
  }

  .toolbar .container {
    gap: 6px;
  }

  .search-wrap {
    min-width: 100px;
  }

  .search-wrap input {
    padding: 8px 10px 8px 30px;
    font-size: 12px;
  }

  .search-icon {
    width: 14px;
    height: 14px;
  }

  .filter-tags {
    gap: 3px;
  }

  .tag-pill {
    padding: 3px 8px;
    font-size: 10px;
  }

  /* Grid */
  .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  main.container {
    padding-top: 12px;
    padding-bottom: 24px;
  }

  /* Card */
  .card {
    padding: 10px;
    gap: 8px;
  }

  .card-top {
    gap: 10px;
  }

  .card-avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .card-name {
    font-size: 12px;
  }

  .card-tag {
    font-size: 9px;
    padding: 0 5px;
  }

  .card-note {
    font-size: 10px;
    -webkit-line-clamp: 1;
  }

  .card-url {
    font-size: 8px;
  }

  .btn-open {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* Modal */
  .modal {
    padding: 0;
  }

  .modal-content {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 12px 12px;
  }

  .modal-header h2 {
    font-size: 14px;
  }

  .modal--lg {
    max-width: 100%;
  }

  .guide-body {
    max-height: 65vh;
    padding-right: 4px;
  }

  .guide-body h3 {
    font-size: 13px;
    margin-top: 12px;
    margin-bottom: 8px;
  }

  .guide-body h4 {
    font-size: 11px;
  }

  .guide-body p,
  .guide-body ul {
    font-size: 11px;
    line-height: 1.5;
  }

  .guide-section {
    margin-bottom: 10px;
  }

  .guide-section.caution {
    padding: 10px;
  }

  .modal-close {
    width: 24px;
    height: 24px;
  }

  .modal-body {
    padding: 12px;
  }

  /* Form */
  .field-group {
    margin-bottom: 10px;
  }

  .field-label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .field-input,
  .field-textarea,
  .field-select {
    font-size: 16px;
    padding: 10px 8px;
  }

  .field-textarea {
    min-height: 80px;
  }

  /* Results count */
  .results-count {
    font-size: 11px;
    margin-bottom: 10px;
  }

  /* Daily progress */
  .dp-wrap {
    gap: 6px;
    font-size: 10px;
  }

  .dp-stat {
    min-width: 50px;
  }

  .dp-label {
    font-size: 10px;
  }

  .dp-count {
    font-size: 11px;
  }

  /* History calendar */
  .cal-container {
    max-width: 100%;
    max-height: 70vh;
    padding: 10px;
  }

  .cal-header h3 {
    font-size: 12px;
  }

  .cal-grid {
    gap: 3px;
  }

  .cal-cell {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  /* Contact list in modal */
  .contact-item {
    padding: 10px;
    gap: 8px;
  }

  .ct-avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .ct-name {
    font-size: 12px;
  }

  .ct-role {
    font-size: 10px;
  }

  .ct-details {
    gap: 4px;
  }

  .ct-link {
    font-size: 10px;
  }

  .ct-linkedin-btn {
    padding: 3px 8px;
    font-size: 10px;
  }
}
/* ── Footer ── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  text-align: center;
  padding: 24px 0 32px;
  font-size: 12px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.footer-heart {
  color: #ef4444;
}

.footer-dot {
  color: var(--border-strong);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--text);
}
.footer-github {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
