:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1f2330;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --accent: #f59e0b;
  --danger: #dc2626;
  --today: #fef3c7;
  --weekend-sat: #2563eb;
  --weekend-sun: #dc2626;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hidden { display: none !important; }

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

h1 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}

.tab:hover { color: var(--text); }

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

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.view { display: none; }
.view.active { display: block; }

/* ----- Add panel (in list view) ----- */
.add-panel {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.add-toggle {
  width: 100%;
  appearance: none;
  background: var(--surface);
  border: 0;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary);
}

.add-toggle:hover { background: var(--primary-soft); }

.add-panel-body {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}

.search-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#search-input {
  flex: 1;
  min-width: 240px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--surface);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.all-stock-list {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden auto;
  max-height: 480px;
  background: var(--surface);
}

.all-stock-list .stock-row {
  grid-template-columns: 70px 1fr 110px auto;
}

/* ----- Favorite list ----- */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.action-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

.count {
  color: var(--text-muted);
  font-size: 13px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.sort-control select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.favorite-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.favorite-list .stock-row {
  grid-template-columns: 70px 1fr 130px 80px auto auto;
}

/* ----- Stock row (shared) ----- */
.stock-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

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

.stock-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  font-size: 13px;
}

.stock-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-link {
  color: inherit;
  text-decoration: none;
}

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

.stock-date {
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.countdown-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
}

.countdown-badge.past {
  background: #f3f4f6;
  color: var(--text-muted);
}

.countdown-badge.today-cd {
  background: var(--accent);
  color: #fff;
}

.link-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

.fav-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
}

.fav-btn:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

.fav-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.fav-btn.active:hover { background: #d97706; color: #fff; border-color: #d97706; }

.empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.status {
  text-align: center;
  color: var(--text-muted);
  padding: 12px;
  font-size: 13px;
}

/* ----- Calendar ----- */
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.calendar-toolbar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  min-width: 130px;
  text-align: center;
}

.mode-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.mode-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
}

.mode-btn:hover { color: var(--text); }

.mode-btn.active {
  background: var(--primary);
  color: #fff;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}

.nav-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.today-btn {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
}

.today-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.calendar-header > div {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.calendar-header > div:first-child { color: var(--weekend-sun); }
.calendar-header > div:last-child { color: var(--weekend-sat); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(76px, auto);
}

.day-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: var(--surface);
  position: relative;
  min-height: 76px;
}

.day-cell:nth-child(7n) { border-right: 0; }
.day-cell.outside { background: #fafbfc; }
.day-cell.outside .day-num { color: #c7cdd6; }
.day-cell.today { background: var(--today); }
.day-cell.selected { outline: 2px solid var(--primary); outline-offset: -2px; z-index: 1; }
.day-cell:hover { background: var(--primary-soft); }
.day-cell.today:hover { background: #fde68a; }

.day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.day-cell.sun .day-num { color: var(--weekend-sun); }
.day-cell.sat .day-num { color: var(--weekend-sat); }

.day-count {
  margin-top: auto;
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

.day-cell.outside .day-count { background: #d1d5db; }

.day-detail {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.day-detail h3 {
  margin: 0 0 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-mode {
  font-size: 11px;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
}

.day-detail .stock-row { grid-template-columns: 70px 1fr auto auto; }

/* ----- Info Links Section ----- */
.info-links {
  background: var(--primary-soft);
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.info-links-content {
  max-width: 1100px;
  margin: 0 auto;
}

.info-links-content h3 {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--text);
}

.info-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.info-link:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.info-link-title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.info-link-desc {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .info-links-grid {
    grid-template-columns: 1fr;
  }
  .info-links {
    padding: 20px 12px;
  }
}

/* ----- Content Page Styles ----- */
.content-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

.content-page article {
  background: var(--surface);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.content-page article h2 {
  font-size: 24px;
  margin: 0 0 24px;
  color: var(--text);
}

.content-page article section {
  margin-bottom: 32px;
}

.content-page article section:last-child {
  margin-bottom: 0;
}

.content-page article h3 {
  font-size: 18px;
  margin: 0 0 16px;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-soft);
  padding-bottom: 8px;
}

.content-page article h4 {
  font-size: 15px;
  margin: 16px 0 8px;
  color: var(--text);
  font-weight: 600;
}

.content-page article p {
  margin: 0 0 12px;
  line-height: 1.7;
  color: var(--text);
}

.content-page article p:last-child {
  margin-bottom: 0;
}

.content-page article ul,
.content-page article ol {
  margin: 12px 0;
  padding-left: 24px;
  color: var(--text);
}

.content-page article li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.content-page article li:last-child {
  margin-bottom: 0;
}

.content-page article dl {
  margin: 12px 0;
}

.content-page article dt {
  font-weight: 600;
  margin-top: 12px;
  color: var(--text);
}

.content-page article dt:first-child {
  margin-top: 0;
}

.content-page article dd {
  margin: 4px 0 0 20px;
  color: var(--text-muted);
  line-height: 1.6;
}

.breadcrumb {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .content-page {
    padding: 16px 12px;
  }
  .content-page article {
    padding: 20px 16px;
  }
  .content-page article h2 {
    font-size: 20px;
    margin: 0 0 16px;
  }
  .content-page article h3 {
    font-size: 16px;
  }
}

/* ----- Share Panel ----- */
.share-panel {
  max-width: 900px;
  margin: 0 auto;
}

.import-section-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.import-section-container h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--primary);
}

.no-candidates-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.no-candidates-message p {
  margin: 0 0 8px;
  font-size: 14px;
}

.no-candidates-message .sub-text {
  font-size: 12px;
  margin-top: 12px;
}

.import-candidates-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.import-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-header p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.share-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.select-all-label input {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.share-stocks-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
}

.share-stock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.share-stock-item:last-child {
  border-bottom: none;
}

.share-stock-item input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.share-stock-item label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.share-stock-code {
  font-weight: 600;
  color: var(--primary);
  min-width: 50px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.share-stock-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}

.share-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.share-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.share-action-btn.x-btn {
  background: #000;
  color: white;
}

.share-action-btn.x-btn:hover {
  background: #1a1a1a;
}

.share-action-btn.copy-btn {
  background: var(--primary);
  color: white;
}

.share-action-btn.copy-btn:hover {
  background: #1d4ed8;
}

.share-action-btn.copy-btn.copied {
  background: #10b981;
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--surface);
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.modal-close {
  appearance: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-body {
  padding: 20px;
}

.modal-body p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-body p:last-of-type {
  margin-bottom: 0;
}

.share-input-group {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.share-url-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted);
  background: var(--bg);
}

.copy-btn {
  appearance: none;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}

.copy-btn:hover {
  background: #1d4ed8;
}

.copy-btn.copied {
  background: #10b981;
}

.share-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 0 !important;
}

.import-stocks-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  margin: 12px 0;
  max-height: 400px;
  overflow-y: auto;
}

.import-stock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.import-stock-item:last-child {
  border-bottom: none;
}

.import-stock-item.already-added {
  background: #f0fdf4;
  color: var(--text-muted);
}

.import-stock-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.import-stock-item input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.import-stock-item label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.import-stock-item.already-added label {
  cursor: default;
}

.import-stock-code {
  font-weight: 600;
  color: var(--primary);
  min-width: 50px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.import-stock-item.already-added .import-stock-code {
  opacity: 0.6;
}

.already-added-badge {
  margin-left: auto;
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.primary-btn, .secondary-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: #1d4ed8;
}

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

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

/* ----- Footer ----- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px;
  margin-top: 40px;
}

.footer-links {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

@media (max-width: 640px) {
  main { padding: 12px; }
  .calendar-grid { grid-auto-rows: minmax(60px, auto); }
  .day-cell { min-height: 60px; padding: 4px; }
  .day-count { padding: 1px 6px; }

  /* スマホでのstock-rowレイアウト改善 */
  .stock-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 12px;
    align-items: stretch;
  }

  .stock-row .stock-code {
    font-size: 11px;
  }

  .stock-row .stock-name {
    font-size: 14px;
    font-weight: 500;
  }

  .stock-row .stock-date {
    font-size: 11px;
  }

  .stock-row .countdown-badge,
  .stock-row .link-btn,
  .stock-row .fav-btn {
    font-size: 11px;
    padding: 6px 8px;
  }

  /* favorite-list用の特別レイアウト */
  .favorite-list .stock-row {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }

  .favorite-list .stock-row > .stock-code {
    grid-column: 1 / -1;
    font-size: 11px;
    color: var(--primary);
  }

  .favorite-list .stock-row > .stock-name {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 500;
  }

  .favorite-list .stock-row > .stock-date {
    grid-column: 1 / -1;
    font-size: 11px;
    color: var(--text-muted);
  }

  .favorite-list .countdown-badge {
    grid-column: 1 / 2;
    align-self: center;
    font-size: 11px;
  }

  .favorite-list .link-btn,
  .favorite-list .fav-btn {
    font-size: 11px;
  }

  /* all-stock-list */
  .all-stock-list .stock-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .all-stock-list .stock-row > .stock-code {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .all-stock-list .stock-row > .stock-name {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 500;
  }

  .all-stock-list .stock-row > .stock-date {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .all-stock-list .fav-btn {
    grid-column: 2 / 3;
    align-self: center;
  }

  /* day-detail */
  .day-detail .stock-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .day-detail .stock-row > .stock-code {
    grid-column: 1 / -1;
  }

  .day-detail .stock-row > .stock-name {
    grid-column: 1 / -1;
  }

  .day-detail .link-btn,
  .day-detail .fav-btn {
    font-size: 11px;
  }

  h1 { font-size: 16px; }
  .today-btn { margin-left: 0; }
  .calendar-toolbar h2 { min-width: 100px; font-size: 16px; }
  .footer-links { gap: 16px; }
}
