/* mobile-safe overflow guard */
html,body{max-width:100%;overflow-x:hidden}
*{box-sizing:border-box}
/* --- Roadmap Visual Timeline Styling --- */

.rm-timeline-container {
  position: relative;

  padding-left: 20px;

  margin-left: 10px;

  border-left: 2px solid #cbd5e1;

  margin-top: 15px;
}

.rm-year-node {
  position: relative;

  margin-bottom: 28px;
}

.rm-year-badge {
  position: absolute;

  left: -33px;

  top: -2px;

  width: 24px;

  height: 24px;

  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);

  border: 4px solid #fff;

  border-radius: 50%;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);

  display: flex;

  align-items: center;

  justify-content: center;

  color: #fff;

  font-size: 11px;

  font-weight: 800;
}

.rm-semester-grid {
  display: grid;

  grid-template-columns: 1fr;

  gap: 12px;
}

@media (min-width: 640px) {
  .rm-semester-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rm-sem-card {
  background: #fff;

  border-radius: 14px;

  padding: 14px;

  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);

  border: 1px solid #e2e8f0;

  transition: all 0.2s ease;
}

.rm-sem-card.sem-pre {
  border-top: 4px solid #10b981;
}

.rm-sem-card.sem-post {
  border-top: 4px solid #8b5cf6;
}

.rm-subject-card {
  display: flex;

  align-items: center;

  padding: 10px 12px;

  background: #f8fafc;

  border: 1px solid #e2e8f0;

  border-radius: 10px;

  margin-bottom: 8px;

  font-size: 12px;

  cursor: default;

  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  position: relative;

  overflow: visible;
}

@media (hover: hover) {
  .rm-subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    border-color: #cbd5e1;
  }
}

.rm-subject-card.req {
  border-left: 4px solid #ef4444;
}

.rm-subject-card.ele {
  border-left: 4px solid #3b82f6;
}

.rm-badge {
  font-size: 12px;

  padding: 2px 6px;

  border-radius: 6px;

  font-weight: 700;

  margin-left: auto;

  white-space: nowrap;
}

.rm-badge.passed {
  background: #dcfce7;

  color: #166534;

  border: 1px solid #bbf7d0;
}

.rm-badge.current {
  background: #f3e8ff;

  color: #6b21a8;

  border: 1px solid #e9d5ff;
}

.rm-class-slot-info {
  font-size: 11px;

  color: #64748b;

  margin-top: 3px;

  background: #f1f5f9;

  padding: 2px 6px;

  border-radius: 4px;

  display: inline-block;
}

.rm-progress-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
}

.rm-progress-disclaimer {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
}

.rm-outside-note {
  margin: -4px 0 14px;
  padding: 8px 10px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
  font-size: 11px;
  line-height: 1.55;
}

.rm-required-status summary {
  min-height: 44px;
  display: list-item;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.rm-required-status.danger summary {
  color: #b91c1c;
  background: #fef2f2;
}

.rm-required-status.warning summary {
  color: #92400e;
  background: #fffbeb;
}

.rm-required-status ul {
  margin: 8px 2px 0;
  padding: 0;
  list-style: none;
  color: #334155;
  font-size: 11px;
}

.rm-required-ok,
.rm-required-current,
.rm-required-future {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
}

.rm-required-ok {
  color: #166534;
  background: #f0fdf4;
  font-weight: 700;
}

.rm-required-current {
  color: #6b21a8;
  background: #faf5ff;
  font-weight: 700;
}

.rm-required-future {
  color: #64748b;
  background: #f8fafc;
}

.rm-curriculum-warning {
  display: block;
  margin-top: 4px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 700;
}

.rm-filter-panel {
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.rm-filter-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.rm-filter-buttons button {
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.rm-filter-buttons button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.rm-filter-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
}

.rm-filter-context {
  margin-top: 7px;
  color: #64748b;
  font-size: 11px;
  text-align: right;
}

.rm-binran-wrap {
  margin: 0 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

.rm-binran-wrap > summary {
  min-height: 44px;
  display: list-item;
  padding: 9px 12px;
  border-radius: 11px;
  color: #334155;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.rm-binran-wrap[open] > summary {
  border-bottom: 1px solid #e2e8f0;
  border-radius: 11px 11px 0 0;
  background: #f8fafc;
}

.rm-binran-wrap > #rm-binran {
  padding: 0 12px 12px;
}

.rm-year-title {
  margin-bottom: 12px;
  padding-left: 14px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
}

.rm-sem-card.rm-active-sem {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.rm-sem-heading {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.rm-sem-heading span {
  padding: 2px 6px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  letter-spacing: 0;
}

.rm-placeholder {
  background: #f8fafc;
}

.rm-passed-control {
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  margin: -4px 2px -4px -8px;
  border-radius: 8px;
  cursor: pointer;
}

.rm-passed-toggle {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #10b981;
}

.rm-subject-main {
  min-width: 0;
  flex: 1;
}

.rm-subject-title {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rm-subject-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.rm-type-req {
  color: #dc2626;
  font-weight: 800;
}

.rm-type-ele {
  color: #2563eb;
  font-weight: 800;
}

.rm-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
}

.rm-card-actions .rm-badge {
  margin-left: 0;
}

.rm-detail-button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.rm-no-match {
  color: #475569;
}

.rm-live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rm-empty-filter {
  padding: 36px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.rm-filter-buttons button:focus-visible,
.rm-passed-control:focus-within,
.rm-detail-button:focus-visible,
.rm-binran-wrap > summary:focus-visible,
.rm-required-status summary:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .rm-filter-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .rm-card-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rm-sem-card,
  .rm-subject-card {
    transition: none;
  }

  .rm-subject-card:hover {
    transform: none;
  }
}

/* --- End Roadmap Styling --- */

:root {
  --bg: #f5f6f8;
  --card: #fff;
  --ink: #1a1d24;
  --sub: #656e7b;
  --accent: #2563eb;
  --line: #e5e7eb;
  --req: #dc2626;
  --ele: #059669;
}

* {
  box-sizing: border-box;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tap-target {
  position: relative;
}

.tap-target::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}

.back-button {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.footer-policy-link {
  display: inline-flex;
  align-items: center;
  color: var(--sub);
  text-decoration: underline;
  cursor: pointer;
}

/* onclick付きのdiv/span(非セマンティック)をbuttonへ置き換える際の共通リセット。
   button既定のborder/padding/背景/文字寄せを解除し、見た目は呼び出し側のinline
   styleで維持する(inline styleの方が詳細度が高いため、背景色や表示形式など
   個別に指定済みのプロパティはそのまま優先される)。 */
.btn-reset {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

/* 授業掲示板の添付ボタン。従来のonmouseover/onmouseoutと同じ配色をCSSで維持する。 */
.board-detail-attach-btn {
  background: #f1f5f9;
}

.board-detail-attach-btn:hover {
  background: #e2e8f0;
}

/* 掲示板導線の従来のonmouseover/onmouseoutと同じ配色。 */
.course-board-open-btn {
  background: #eff6ff;
}

.course-board-open-btn:hover {
  background: #dbeafe;
}

.board-pdf-attachment-link {
  background: #fff;
}

.board-pdf-attachment-link:hover {
  background: #f1f5f9;
}

.home-board-course-link {
  background: #f8fafc;
}

.home-board-course-link:hover {
  background: #f1f5f9;
}

/* ヘッダーの「🎓 muhub」ブランドボタン(h1内の実質的なホームリンク) */
.brand-home-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}
.brand-home-btn:hover {
  opacity: 0.8;
}

/* 学生便覧AI回答内の「(p.26)」等、文中インラインで開けるページリンク */
.handbook-page-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Hiragino Kaku Gothic ProN',
    'Noto Sans JP',
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  position: relative;
}

.authbtn {
  position: absolute;
  top: 12px;
  right: 16px;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  max-width: 48vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-modal input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
}

.auth-modal button.primary {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.auth-msg {
  font-size: 13px;
  margin-top: 10px;
  min-height: 1em;
}

.auth-msg.err {
  color: var(--req);
}
.auth-msg.ok {
  color: var(--ele);
}

header h1 {
  margin: 0;
  font-size: 17px;
}

header .tag {
  font-size: 11px;
  color: #fff;
  background: var(--req);
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

header .meta {
  font-size: 12px;
  color: var(--sub);
  margin-top: 3px;
}

.nav {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.nav button {
  padding: 6px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

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

.badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  margin-left: 5px;
  text-align: center;
}

.nav button.active .badge {
  background: #fff;
  color: var(--accent);
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

.controls {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 12px 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
}

input[type='search'] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

select {
  padding: 8px 10px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

#clear {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--sub);
  cursor: pointer;
}

.count {
  font-size: 13px;
  color: var(--sub);
  margin: 12px 2px 6px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
}

.card:active,
.card:hover {
  border-color: var(--accent);
}

.card .t {
  font-weight: 600;
  font-size: 15px;
  padding-right: 40px;
}

.addbtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.addbtn.on {
  background: var(--ele);
  color: #fff;
  border-color: var(--ele);
}

.card .l {
  color: var(--sub);
  font-size: 13px;
  margin-top: 2px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.b {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}

.b.req {
  background: #fee2e2;
  color: var(--req);
}
.b.ele {
  background: #d1fae5;
  color: var(--ele);
}
.b.in {
  background: #fef9c3;
  color: #854d0e;
}

/* timetable */

.tt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

/* 学期タブバー(#sem-tabs)が横スクロール可能なことを示す右端フェード。
   スクロール末端で消す必要はないため常時表示(軽い手掛かりとして十分)。 */
.sem-tabs-wrap {
  position: relative;
}
.sem-tabs-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
}

.tt-sum {
  font-size: 14px;
  font-weight: 600;
}

.tt-warn {
  color: var(--req);
  font-size: 13px;
  font-weight: 600;
}

#tt-share {
  padding: 8px 14px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.tt-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.tt {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.scholarship-html table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  margin: 0;
}

.scholarship-table-scroll {
  width: 100%;
  margin: 8px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.scholarship-html th,
.scholarship-html td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.scholarship-html th {
  background: #f1f5f9;
  font-weight: 600;
}

.scholarship-html ul,
.scholarship-html ol {
  margin: 6px 0;
  padding-left: 20px;
}

.scholarship-html p {
  margin: 0 0 8px 0;
}

.scholarship-html h3,
.scholarship-html h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 6px 0;
  color: var(--ink);
}

.scholarship-html a {
  color: var(--accent);
}

table.tt th,
table.tt td {
  border: 1px solid var(--line);
  padding: 4px;
  vertical-align: top;
}

table.tt th {
  background: #f1f5f9;
  font-weight: 600;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}

table.tt td {
  height: 56px;
  width: 18%;
}

table.tt td.h {
  width: 54px;
  background: #f8fafc;
  text-align: center;
  vertical-align: middle;
  padding: 2px;
}

.ph {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.pn {
  font-size: 12px;
  color: var(--sub);
  margin-top: 1px;
}

.cc {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 3px 5px;
  margin-bottom: 3px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.25;
}

.cc.conf {
  background: #fee2e2;
  border-color: #fca5a5;
}

.cc .cn {
  color: var(--sub);
  font-size: 11px;
}

.intensive {
  margin-top: 18px;
}

.intensive h3 {
  font-size: 13px;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding-left: 8px;
}

.ichip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 4px 6px 0 0;
  font-size: 13px;
  cursor: pointer;
}

.cell-empty {
  color: #cbd5e1;
  text-align: center;
  font-size: 18px;
  cursor: pointer;
}

.cell-empty:hover {
  background: #eef2ff;
  color: var(--accent);
}

.tt-hint {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 8px;
  background: #eef2ff;
  padding: 8px 10px;
  border-radius: 8px;
}

.offbar {
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 10px;
  line-height: 1.7;
}

.offbar a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.offlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.offlinks a {
  display: inline-block;
  background: #eef2ff;
  color: var(--accent);
  padding: 7px 11px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
}

.home-hero {
  padding: 18px 0 4px;
}

.home-hero h2 {
  margin: 0;
  font-size: 20px;
}

.home-hero p {
  margin: 4px 0 0;
  color: var(--sub);
  font-size: 13px;
}

.home-login {
  margin-top: 14px;
  font-size: 13px;
  background: #d1fae5;
  color: #065f46;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
}

.home-loginbtn {
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.home-grid {
  display: grid;
  /* メディアクエリに頼らず、タイル幅で列数を自動決定。タイルは常に260px以上＝
     日本語タイトルが途中で割れない。狭い画面(スマホ)は自動で1列、広い画面は複数列。 */
  /* 一部の組込みブラウザは repeat(auto-fit,minmax()) を解釈できず列が崩れる。
     素直な等幅2列(全ブラウザ対応)を基本にし、実描画幅に応じてJS(adjustHomeGrid)が
     1列/2列を切替える(メディアクエリ非依存=ビューポート誤判定の影響を受けない)。 */
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.feat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  min-width: 0 !important;
}

.feat:hover {
  border-color: var(--accent);
}

.feat .fi {
  font-size: 26px;
}

.feat .ft {
  font-weight: 700;
  font-size: 15px;
}

.feat .fd {
  font-size: 12px;
  color: var(--sub);
}

.feat.soon {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 380px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .garbage-settings-grid {
    grid-template-columns: 1fr !important;
  }
}

.tt-head button {
  padding: 8px 12px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.pickrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.pickrow .addbtn {
  position: static;
}

.pickinfo {
  flex: 1;
  cursor: pointer;
}

.pickinfo .t {
  font-weight: 600;
  font-size: 14px;
}

.pickinfo .l {
  font-size: 12px;
  color: var(--sub);
}

@media print {
  header,
  footer,
  .controls,
  #view-search,
  .tt-head button,
  .tt-hint,
  .ov {
    display: none !important;
  }

  body {
    background: #fff;
  }

  #view-tt {
    display: block !important;
  }

  .tt-wrap {
    overflow: visible;
  }

  table.tt {
    min-width: 0;
    width: 100%;
  }
}

/* モーダル表示中は背景のスクロールを止める(core.jsのsyncModalがbody.modal-openを
   トグルする。オーバーレイ自体は position:fixed で全画面を覆うため、これは主に
   iOSのタッチスクロールでbody側がラバーバンドしてしまうケースへの保険)。 */
body.modal-open {
  overflow: hidden;
}

/* modal */

.ov {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  z-index: 50;
  overflow: auto;
}

.ov.on {
  display: flex;
}

.modal {
  background: #fff;
  max-width: 720px;
  width: 100%;
  border-radius: 14px;
  padding: 18px 20px;
  margin: auto;
  position: relative;
}

.modal h2 {
  margin: 0.1em 30px 0.1em 0;
  font-size: 18px;
}

.modal .sub {
  color: var(--sub);
  font-size: 13px;
}

.modal .sec {
  margin-top: 14px;
}

.modal .sec h3 {
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 4px;
  border-left: 4px solid var(--accent);
  padding-left: 8px;
}

.modal .sec div {
  white-space: pre-wrap;
  font-size: 14px;
  word-break: break-word;
}

.modal .close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--sub);
  border: none;
  background: none;
}

.ttbtn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.ttbtn.rm {
  background: #fff;
  color: var(--req);
  border: 1px solid var(--req);
}

.modal a.src {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
}

footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-size: 11px;
  color: var(--sub);
}

.empty {
  text-align: center;
  color: var(--sub);
  padding: 40px 0;
}

.hidden {
  display: none !important;
}

/* official timetable styles */

.off-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.off-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.off-tab {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}

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

table.tt.off-grid td {
  height: auto;
  min-height: 64px;
  padding: 6px 4px;
  font-size: 11px;
  width: 18%;
}

table.tt.off-grid td.off-cell-empty {
  color: #cbd5e1;
  text-align: center;
  font-size: 11px;
  padding: 12px 0;
  vertical-align: middle;
}

.off-cell-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  margin-bottom: 4px;
  position: relative;
  cursor: pointer;
  line-height: 1.25;
}

.off-cell-card:hover {
  border-color: var(--accent);
}

.off-cell-card .t {
  font-weight: 600;
  font-size: 11px;
  padding-right: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.off-cell-card .l {
  color: var(--sub);
  font-size: 12px;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.off-cell-card .addbtn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.off-cell-card .addbtn.on {
  background: var(--ele);
  color: #fff;
  border-color: var(--ele);
}

/* --- Campus Map & Search View Styling --- */
.map-card {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.map-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.map-search-input {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.map-search-input:focus {
  border-color: var(--accent);
}

.map-search-btn {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f1f5f9;
  /* buttonへ変更(キーボード操作対応)しても既存divと同じ見た目にするためのリセット */
  padding: 0;
  font: inherit;
  text-align: inherit;
}

.map-image {
  display: block;
  width: 100%;
  height: auto;
}

.map-pin {
  position: absolute;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  transition: left 0.5s ease, top 0.5s ease;
}

.map-pin::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  background: rgba(239, 68, 68, 0.5);
  border-radius: 50%;
  animation: pin-pulse 1.5s infinite;
}

.map-pin::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ef4468;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

@keyframes pin-pulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.map-info-box {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  padding: 14px;
  border-left: 5px solid var(--accent);
  margin-top: 12px;
}

.map-info-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.map-info-desc {
  font-size: 13px;
  color: var(--sub);
  margin-top: 4px;
}

.map-hotspots-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.map-hotspot-btn {
  padding: 6px 12px;
  font-size: 11px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.map-hotspot-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

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

/* --- Feedback Form Styling --- */
.feedback-card {
  padding: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Links View Styling --- */
.links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .links-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.links-category-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin: 20px 0 10px;
  border-left: 4px solid var(--accent);
  padding-left: 8px;
}

.links-category-title:first-of-type {
  margin-top: 10px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.link-icon {
  font-size: 28px;
  background: #f1f5f9;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.link-card:hover .link-icon {
  background: #e2e8f0;
}

.link-info {
  flex: 1;
}

.link-title {
  font-weight: 700;
  font-size: 14px;
}

.link-desc {
  font-size: 11px;
  color: var(--sub);
  margin-top: 2px;
  line-height: 1.3;
}

.link-arrow {
  font-size: 14px;
  color: #94a3b8;
  transition: transform 0.2s;
}

.link-card:hover .link-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ---- Moodle sync & tasks styles ---- */

.moodle-tasks-section {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 16px auto;
  max-width: 600px;
}

.moodle-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.moodle-tasks-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.moodle-tasks-config-btn {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.2s;
}

.moodle-tasks-config-btn:hover {
  background: #f1f5f9;
}

.moodle-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.moodle-task-item {
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.2s, background 0.2s;
}

.moodle-task-item:hover {
  transform: translateX(2px);
  background: #f1f5f9;
}

.moodle-task-title-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.moodle-task-deadline {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.moodle-task-deadline.urgent {
  background: #fee2e2;
  color: #ef4444;
  border: 1px solid #fecaca;
}

.moodle-task-deadline.soon {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

.moodle-task-deadline.normal {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.moodle-tasks-empty {
  text-align: center;
  color: var(--sub);
  font-size: 12px;
  padding: 20px 0;
}

/* Moodle modal styles */

.moodle-modal {
  max-width: 500px;
  width: 90%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
}

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

.moodle-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.moodle-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--sub);
  padding: 4px;
}

.moodle-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 75vh;
}

.moodle-help-intro {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.5;
  margin-bottom: 16px;
}

.moodle-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.moodle-input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.moodle-input-group input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.moodle-input-group input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.moodle-modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.moodle-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border: none;
  transition: background 0.2s, opacity 0.2s;
}

.moodle-btn-save {
  background: #3b82f6;
  color: #fff;
}

.moodle-btn-save:hover {
  background: #2563eb;
}

.moodle-btn-delete {
  background: #ef4444;
  color: #fff;
}

.moodle-btn-delete:hover {
  background: #dc2626;
}

.moodle-instructions {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.6;
}

.moodle-instructions h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.moodle-instructions ol {
  margin: 0;
  padding-left: 18px;
}

.moodle-instructions ul {
  margin: 4px 0;
  padding-left: 18px;
  color: var(--sub);
}

/* Moodleモーダルの完璧なセンタリング */
#moodleov.on {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ホーム画面のウィジェット幅・配置の統一 */
#home-weather,
#next-class-reminder,
.moodle-tasks-section {
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .moodle-task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  
  .moodle-task-title-text {
    white-space: normal;
    word-break: break-all;
    font-size: 13px;
    line-height: 1.4;
    width: 100%;
  }

  .moodle-task-meta {
    width: 100%;
    justify-content: space-between;
    margin-top: 2px;
  }
  
  .moodle-tasks-section {
    margin: 12px 0;
    padding: 12px;
  }
  
  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- モバイル用時間割 (Day-by-Day) スタイル ---- */
.m-tt-days {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: space-between;
}

.m-tt-day-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.m-tt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-tt-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.m-tt-time {
  width: 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 6px;
  box-sizing: border-box;
}

.m-tt-period {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.m-tt-clock {
  font-size: 12px;
  color: var(--sub);
  margin-top: 2px;
  white-space: nowrap;
}

.m-tt-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.m-tt-cell .cc {
  margin-bottom: 0;
  padding: 10px 12px;
}

.m-tt-empty {
  border: 2px dashed var(--line);
  background: #f8fafc;
  color: var(--sub);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.m-tt-empty:hover {
  background: #f1f5f9;
  border-color: var(--accent);
  color: var(--accent);
}

/* スマホ用1列表示: span-2タイル(ゴミ/PDF等)が幻のimplicit列を作るのを防ぐ。
   adjustHomeGrid() が画面が狭いとき .one-col を付与する。 */
.home-grid.one-col { grid-template-columns: 1fr !important; }
.home-grid.one-col > * { grid-column: auto !important; }

/* ============================================================
   Wave U3: アプリ型ナビゲーション + ホームの「今日」ダッシュボード化
   1つのマークアップをここのメディアクエリだけで
   スマホ(下部固定バー)/iPad(左アイコンレール)/PC(左サイドバー)に切替える。
   ============================================================ */

.app-nav {
  display: flex;
  margin: 0;
  padding: 0;
  background: #fff;
  z-index: 30; /* .ov(モーダル背景)のz-index:50より下。body.modal-openとは干渉しない
                  (position:fixedのオーバーレイが常にnavの上から画面全体を覆うため)。 */
}

.app-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--sub);
  font-family: inherit;
  cursor: pointer;
  padding: 4px 2px;
  min-height: 56px; /* タップ領域56px以上 */
}

.app-nav-icon {
  font-size: 22px;
  line-height: 1;
}

.app-nav-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.app-nav-btn.active {
  color: var(--accent);
}

/* ---- スマホ(<768px): 下部固定バー ---- */
@media (max-width: 767px) {
  .app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.06);
    /* iPhoneのホームバー(セーフエリア)を避ける */
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* ナビが本文に被らないよう、その分だけ下に余白を確保する */
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
}

/* ---- iPad(768px〜1099px): 左の縦アイコンレール ---- */
@media (min-width: 768px) and (max-width: 1099px) {
  .app-nav {
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 72px;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .app-nav-btn {
    min-height: 64px;
    flex: none;
  }
  .app-nav-label {
    font-size: 10px;
  }
  body {
    padding-left: 72px;
  }
}

/* ---- PC(≥1100px): 左サイドバー ---- */
@media (min-width: 1100px) {
  .app-nav {
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 220px;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .app-nav-btn {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 22px;
    min-height: 0;
  }
  .app-nav-icon {
    font-size: 20px;
  }
  .app-nav-label {
    font-size: 14px;
  }
  body {
    padding-left: 220px;
  }
}

/* ---- ホームの「今日」ダッシュボード ---- */

.home-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 16px;
}

.home-col-today,
.home-col-fav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

@media (min-width: 768px) {
  /* iPad・PC共通で2列(左:今日+ウィジェット、右:よく使う+学年歴)。
     幅の余裕が広いPCほど左列を広く使う。 */
  .home-dashboard {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
    gap: 20px;
  }
}

.next-class-wrap {
  width: 100%;
}

.next-class-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.next-class-empty {
  text-align: center;
  color: var(--sub);
  font-size: 13px;
  padding: 18px 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.home-widgets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .home-widgets-grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-widget-cell--wide {
    grid-column: 1 / -1;
  }
}

.home-widget-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.2s, background 0.2s;
}

@media (hover: hover) {
  .home-widget-card:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.06);
  }
}

.home-widget-icon {
  font-size: 20px;
}

/* ---- 「その他」ビュー: カテゴリ別の棚 ---- */

.more-shelf {
  margin-bottom: 22px;
}

.more-shelf-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

.more-shelf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px) {
  .more-shelf-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- 検索結果の広幅活用: iPad以上で2列グリッド ---- */
@media (min-width: 768px) {
  #results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  #results .card {
    margin-bottom: 0;
  }
  #results .empty {
    grid-column: 1 / -1;
  }
}
