:root {
  --brand-yellow: #ffca46;
  --brand-yellow-strong: #ffb700;
  --brand-ink: #394855;
  --panel-bg: #ffffff;
  --panel-muted: #fff7df;
  --line: #e9dfbe;
  --ok: #2d9a3f;
}

body.fishtime-page {
  color: var(--brand-ink);
}

.fishtime-main {
  width: min(1100px, 94vw);
  margin: 78px auto 40px;
}

.hero,
.panel,
.summary-card {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(57, 72, 85, 0.08);
}

.hero {
  padding: 20px;
}

.hero h1 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--brand-ink);
}

.hero p {
  margin-top: 12px;
  line-height: 1.55;
  color: #4f6070;
}

.hero-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e0d3a6;
  background: var(--panel-muted);
  color: #8a6600;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.hero-share-btn {
  position: relative;
  overflow: hidden;
  min-height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 0 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f5f8 100%);
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 8px 18px rgba(15, 23, 42, 0.1);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-share-btn::before {
  content: none;
}

.hero-share-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 12px 22px rgba(15, 23, 42, 0.14);
}

.hero-share-btn::after {
  content: none;
}

.hero-share-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.panel {
  margin-top: 14px;
  padding: 14px;
}

.panel h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-ink);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-top .small {
  font-size: 0.83rem;
  color: #7e8b97;
}

.chart-panel-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
}

.chart-panel-top #chartMeta {
  justify-self: end;
  align-self: center;
  white-space: nowrap;
}

.chart-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#chartTitle {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.chart-fish-hero-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 14px;
}

.chart-fish-hero {
  width: min(220px, 72vw);
  height: min(220px, 72vw);
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  border: 1px solid #e3d5ad;
  background: #fff;
  object-fit: contain;
  object-position: center;
  display: block;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.guide-card {
  border: 1px solid #eadcb5;
  border-radius: 8px;
  background: #fffdf6;
  padding: 12px;
}

.guide-card h3 {
  font-size: 0.96rem;
  color: #5a4300;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #6b7885;
}

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

.summary-card {
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(57, 72, 85, 0.14);
}

.summary-title {
  font-size: 0.9rem;
  color: #68798a;
}

.summary-number {
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  color: var(--brand-ink);
  font-weight: 700;
}

.summary-sub {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #7d8c9a;
}

.toolbar {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 10px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbc992;
  border-radius: 8px;
  background: #fffef8;
  color: var(--brand-ink);
  padding: 0 12px;
  font-size: 0.95rem;
}

.toolbar input:focus,
.toolbar select:focus {
  outline: 2px solid rgba(255, 183, 0, 0.28);
  border-color: var(--brand-yellow-strong);
}

.category-toolbar {
  margin-top: 12px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.category-chip {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d7c189;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffefb 0%, #fff4d8 100%);
  color: #4c5c6b;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(57, 72, 85, 0.08);
  letter-spacing: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-1px);
  border-color: #d6ad44;
  background: linear-gradient(180deg, #fff8e8 0%, #ffe8b5 100%);
  box-shadow: 0 5px 12px rgba(57, 72, 85, 0.14);
}

.category-chip:focus-visible {
  outline: 2px solid rgba(255, 183, 0, 0.3);
  outline-offset: 1px;
}

.category-chip:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(101, 75, 11, 0.22);
}

.category-chip.active {
  border-color: #cc9800;
  background: linear-gradient(180deg, #ffe08d 0%, #ffc94d 100%);
  color: #4f3900;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 248, 219, 0.9), 0 5px 12px rgba(201, 149, 0, 0.28);
}

.category-chip-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #ccb26b;
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 700;
  flex: 0 0 auto;
}

.category-chip.active .category-chip-check {
  border-color: #b98200;
  background: #ffb700;
  color: #fff;
}

.category-chip-reset {
  border-style: dashed;
}

.layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 14px;
}

.species-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.species-card {
  border: 1px solid #ead9a7;
  background: #fffdf5;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  content-visibility: auto;
  contain-intrinsic-size: 94px;
}

.species-card img {
  max-width: 100%;
  height: auto;
}

.species-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(57, 72, 85, 0.12);
  border-color: #d9b650;
}

.species-card.active {
  border-color: #d5a300;
  background: #fff4cf;
}

.species-name {
  font-size: 1rem;
  font-weight: 700;
  color: #554000;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.species-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.species-thumb-wrap {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  border-radius: 6px;
  border: 1px solid #e3d5ad;
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.species-thumb {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.species-meta {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: #6d7680;
  min-width: 0;
}

.species-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.species-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.report-btn {
  border: 1px solid #d8c286;
  background: #fff8e3;
  color: #6a4d00;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 0.8rem;
  line-height: 1.2;
  cursor: pointer;
}

.report-btn:hover {
  background: #ffefbf;
}

.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 41, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.report-modal.show {
  display: flex;
}

.report-dialog {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid #e2d9bf;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.15);
}

.report-title {
  margin: 0;
  font-size: 1.05rem;
  color: #3e4c59;
}

.report-fish {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #7a5d00;
}

.report-textarea {
  width: 100%;
  margin-top: 10px;
  min-height: 130px;
  border: 1px solid #d8dbe6;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  font-size: 0.92rem;
  font-family: inherit;
  box-sizing: border-box;
}

.report-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.report-actions button {
  border: 1px solid #d8dbe6;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

.report-actions .primary {
  border-color: #d9b650;
  background: #ffefbf;
  color: #624700;
}

.report-msg {
  margin-top: 8px;
  font-size: 0.84rem;
  color: #5e6874;
}

.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(14px) saturate(130%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 16px;
}

.share-modal.show {
  display: flex;
}

.share-dialog {
  position: relative;
  isolation: isolate;
  width: min(620px, 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 248, 251, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  padding: 16px;
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  animation: sharePop 0.24s ease;
}

.share-dialog::before {
  content: none;
}

@keyframes sharePop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.share-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.share-close-btn {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f1f4f8 100%);
  border-radius: 10px;
  padding: 0;
  font-size: 0.95rem;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 8px 14px rgba(15, 23, 42, 0.1);
}

.share-desc {
  margin: 10px 0 12px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}

.share-title-area {
  margin-top: 10px;
}

.share-title-text {
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.share-link-area {
  margin-bottom: 12px;
}

.share-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: #64748b;
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.share-url-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  padding: 0 12px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.share-copy-btn {
  min-height: 40px;
  border: 1px solid rgba(59, 130, 246, 0.36);
  border-radius: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #e8f0ff 100%);
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 8px 16px rgba(29, 78, 216, 0.14);
}

.share-copy-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #dfeaff 100%);
  border-color: rgba(37, 99, 235, 0.5);
}

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

.share-platform-btn {
  min-height: 46px;
  min-width: 46px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.94) inset, 0 8px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.share-platform-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.2);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.14);
}

.share-platform-btn::before {
  content: none;
}

.share-platform-fb i {
  color: #1877f2;
}

.share-platform-threads i {
  color: #111111;
}

.share-platform-x i {
  color: #111111;
}

.share-platform-line i {
  color: #06c755;
}

.share-platform-ig i {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.share-platform-copy i {
  color: #475569;
}

.share-platform-system i {
  color: #2563eb;
}

.share-platform-btn i {
  position: relative;
  z-index: 1;
  filter: none;
}

.share-platform-btn:focus-visible,
.share-copy-btn:focus-visible,
.share-close-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
}

.share-msg {
  margin-top: 10px;
  font-size: 0.84rem;
  color: #1d4ed8;
  min-height: 1.2em;
}

.chart-group {
  display: grid;
  gap: 12px;
}

.chart-card {
  border: 1px solid #ecdfb8;
  border-radius: 8px;
  padding: 10px;
  background: #fffef8;
}

.chart-title {
  font-size: 0.9rem;
  color: #6c7a86;
  margin-bottom: 8px;
}

.chart-holder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.4;
  min-height: 180px;
}

.skeleton {
  overflow: hidden;
  position: relative;
  background: #f5f0dd;
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 120%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    left: 150%;
  }
}

.entry {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.45s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.empty {
  padding: 18px 12px;
  border: 1px dashed #d9cfa8;
  border-radius: 8px;
  text-align: center;
  color: #7a8793;
}

.dot {
  color: var(--ok);
}

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

  .category-toolbar {
    overflow: hidden;
  }

  .category-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
  }

  .category-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .category-filters::-webkit-scrollbar {
    height: 6px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .species-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .fishtime-main {
    margin-top: 72px;
    width: 95vw;
  }

  .hero,
  .panel,
  .summary-card {
    padding: 12px;
  }

  .grid-summary {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .category-toolbar {
    margin-top: 10px;
  }

  .category-filters {
    gap: 6px;
  }

  .category-chip {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .share-link-row {
    grid-template-columns: 1fr;
  }

  .share-platforms {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .chart-panel-top {
    grid-template-columns: 1fr;
  }

  .chart-panel-top #chartMeta {
    justify-self: start;
    white-space: normal;
  }

  .chart-fish-hero {
    width: min(170px, 68vw);
    height: min(170px, 68vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
