/* ==========================================
   Tablog - Tabelog-style Reviewer Profile
   ========================================== */

/* Design Tokens - Tabelog Style */
:root {
  --page-bg: #F7F5F2;
  --card-bg: #FFFFFF;
  --muted-bg: #F5F3E8;
  --border: #DCDCDC;
  --border-2: #CCCCCC;
  --text: #333333;
  --text-dark: #000000;
  --muted: #666666;
  --muted-2: #999999;

  --link: #0066CC;
  --link-h: #004499;

  --accent: #F6AB09;
  --accent-h: #E09800;
  --cta: #3B99D6;
  --cta-h: #2D7BB8;

  --danger: #CC0000;

  /* Layout */
  --container-width: 1040px;
  --left-col: 680px;
  --gap: 20px;
  --right-col: 340px;

  /* World map retro font (low-fidelity look) */
  --wm-retro-font: "PixelMplus12", "DotGothic16", "MS PGothic", "MS Gothic", "MS UI Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}

@font-face {
  font-family: "DotGothic16";
  src: url("vendor/fonts/DotGothic16-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PixelMplus12";
  src: url("vendor/fonts/PixelMplus12-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PixelMplus12";
  src: url("vendor/fonts/PixelMplus12-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Noto Sans JP", "Meiryo", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  color: var(--text);
  background-color: var(--page-bg);
}

em,
i,
cite {
  font-style: normal;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-h);
  text-decoration: underline;
}

a:focus,
button:focus {
  outline: 2px solid rgba(44, 106, 180, 0.35);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

/* Container */
.container {
  width: var(--container-width);
  margin: 0 auto;
}

/* ==========================================
   Top Utility Bar
   ========================================== */
.utility-bar {
  height: 28px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.utility-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.utility-links {
  display: flex;
  gap: 14px;
  list-style: none;
}

.utility-links a {
  font-size: 12px;
}

/* ==========================================
   Main Header
   ========================================== */
.main-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.main-header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 16px;
}

/* Logo */
.logo {
  width: 180px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* Search */
.search-block {
  flex: 1;
  display: flex;
  height: 36px;
  border: 1px solid var(--border-2);
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}

.search-scope {
  width: 120px;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--muted);
  background: #FAFAFA;
  cursor: pointer;
}

.search-scope::after {
  content: '';
  margin-left: auto;
  border: 4px solid transparent;
  border-top-color: var(--muted);
  margin-top: 4px;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
}

.search-input::placeholder {
  color: #AAA;
}

.search-btn {
  width: 44px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

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

.search-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Header Controls */
.header-controls {
  width: 220px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.header-controls a {
  font-size: 12px;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  border: 1px solid var(--border);
}

/* ==========================================
   Breadcrumb
   ========================================== */
.breadcrumb {
  height: 30px;
  background: var(--page-bg);
  display: flex;
  align-items: center;
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.breadcrumb span {
  color: var(--muted);
}

/* ==========================================
   Hero Banner
   ========================================== */
.hero-banner {
  width: var(--container-width);
  height: 280px;
  margin: 0 auto;
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: #2a2a2a;
}

.hero-overlay-title {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 64px;
  max-width: 520px;
  background: rgba(0, 0, 0, 0.55);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-overlay-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 2px;
}

.hero-overlay-title p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-cta {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.btn {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--cta-h);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: #F2F2F2;
  border: 1px solid var(--border-2);
  color: #333;
}

.btn-secondary:hover {
  background: #E8E8E8;
  text-decoration: none;
}

/* ==========================================
   Profile Card
   ========================================== */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: none;
  padding: 14px 14px 10px;
  display: grid;
  grid-template-columns: 120px auto 320px;
  gap: 14px;
  width: var(--container-width);
  margin: 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: #E8E8E8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.profile-avatar svg {
  width: 40px;
  height: 40px;
  fill: #BFBFBF;
}

.profile-main h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.profile-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.profile-bio {
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

/* Badges Row */
.badges-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.badge-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #D9D3CC;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-circle svg {
  width: 22px;
  height: 22px;
  fill: #999999;
}

.badge-label {
  font-size: 11px;
  color: var(--muted);
}

/* Stats Table */
.profile-stats {
  border: 1px solid var(--border);
  background: #FBFBFB;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  height: 30px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.stats-row:last-child {
  border-bottom: none;
}

.stats-label {
  font-size: 12px;
  color: var(--muted);
  padding-left: 10px;
}

.stats-value {
  font-size: 13px;
  padding-right: 10px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ==========================================
   Profile Tab Stats Bar
   ========================================== */
.tab-stats-bar {
  width: var(--container-width);
  margin: 0 auto;
  height: 64px;
  background: #F5F5F0;
  border: 1px solid var(--border);
  border-top: none;
  display: flex;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border-right: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease;
}

.tab-item:last-child {
  border-right: none;
}

.tab-item:hover {
  background: #FFFDF4;
  text-decoration: none;
}

.tab-item.active {
  background: #fff;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}

.tab-item.active:hover {
  background: #fff;
}

.tab-label {
  font-size: 12px;
  color: var(--muted);
}

.tab-item.active .tab-label {
  font-weight: 700;
  color: var(--text);
}

.tab-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-dark);
}

.tab-sublabel {
  font-size: 11px;
  color: var(--muted-2);
}

/* ==========================================
   Main Content Area (Two Columns)
   ========================================== */
.main-content {
  width: var(--container-width);
  margin: 14px auto 40px;
  display: grid;
  grid-template-columns: var(--left-col) var(--right-col);
  gap: var(--gap);
  align-items: start;
}

/* ==========================================
   Module Card Base
   ========================================== */
.module-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover {
  border-color: var(--border-2);
}

.module-header {
  height: 36px;
  background: #F5F5F0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.module-header svg {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

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

.module-body {
  padding: 12px;
}

/* ==========================================
   Recommended Module
   ========================================== */
.osusume-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 12px;
}

.osusume-featured {
  position: relative;
  height: 210px;
  border-radius: 2px;
  overflow: hidden;
  background: #333;
}

.osusume-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.osusume-featured .tile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.osusume-featured .tile-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.osusume-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.osusume-tile {
  position: relative;
  height: 100px;
  border-radius: 2px;
  overflow: hidden;
  background: #444;
}

.osusume-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.tile-title {
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}

.tile-rating svg {
  width: 11px;
  height: 11px;
  fill: var(--accent);
}

.tile-rating span {
  font-size: 11px;
  color: #fff;
  font-weight: 600;
}

.module-footer {
  text-align: center;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.module-footer a {
  font-size: 12px;
}

/* ==========================================
   Feed Cards
   ========================================== */
.feed-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: none;
  padding: 14px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.feed-card:first-child {
  border-top: 1px solid var(--border);
}

.feed-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.feed-title a {
  color: var(--link);
}

.feed-title a:hover {
  color: var(--link-h);
}

.feed-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.feed-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stars {
  display: flex;
  gap: 1px;
}

.stars svg {
  width: 14px;
  height: 14px;
}

.stars svg.filled {
  fill: var(--accent);
}

.stars svg.empty {
  fill: #DDD;
}

.rating-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.rating-breakdown {
  font-size: 12px;
  color: var(--muted);
}

.feed-price {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-price svg {
  width: 12px;
  height: 12px;
  fill: var(--muted);
}

.feed-excerpt {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.feed-content {
  margin-bottom: 6px;
}

.feed-full {
  margin-top: 10px;
}

.feed-full p {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.feed-full p:last-child {
  margin-bottom: 0;
}

/* Review Markdown-style Elements */
/* Review Markdown-style Elements */
.review-divider {
  border: none;
  margin: 24px 0 8px;
  /* Use whitespace for separation instead of lines */
}

.review-section {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 10px 0;
  padding-bottom: 0;
  border-bottom: none;
  /* Remove underline */
  letter-spacing: 0.02em;
}

.review-dialogue {
  font-family: inherit;
  /* Distinction via font */
  color: var(--text);
  padding-left: 10px;
  margin: 10px 0;
  position: relative;
}

.review-dialogue::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
  /* Much subtler line */
}

.product-name {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1em;
}

.texture-note {
  font-family: inherit;
  font-weight: inherit;
  color: var(--muted);
}

.review-quote {
  margin: 12px 0;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  font-family: "Noto Sans JP", "Meiryo", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}

/* Inline Review Photos with Captions */
.review-photo {
  margin: 16px 0;
  max-width: 100%;
}

.review-photo img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--border);
}

.review-photo figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* Smaller inline photo variant */
.review-photo.small {
  max-width: 300px;
}

.review-photo.small img {
  width: 100%;
}

/* Float variants for text wrap */
.review-photo.float-left {
  float: left;
  margin: 4px 16px 12px 0;
  max-width: 280px;
}

.review-photo.float-right {
  float: right;
  margin: 4px 0 12px 16px;
  max-width: 280px;
}

/* Clear floats after photo sections */
.review-photo-clear {
  clear: both;
}

.feed-more {
  font-size: 12px;
  margin-bottom: 10px;
  display: inline-block;
  cursor: pointer;
}

.feed-photos {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.feed-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feed-photo img {
  width: 150px;
  height: 96px;
  object-fit: cover;
  border-radius: 2px;
  background: #eee;
}

.feed-photo span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.feed-actions {
  display: flex;
  gap: 8px;
}

.btn-like {
  height: 26px;
  padding: 0 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

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

.btn-like svg {
  width: 12px;
  height: 12px;
  fill: #fff;
}

.btn-save {
  height: 26px;
  padding: 0 10px;
  background: #F2F2F2;
  border: 1px solid var(--border-2);
  color: #333;
  font-size: 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.btn-save:hover {
  background: #E8E8E8;
}

.btn-save svg {
  width: 12px;
  height: 12px;
  fill: var(--muted);
}

/* ==========================================
   Sidebar Modules
   ========================================== */
.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar .module-card {
  border-radius: 0;
}

.sidebar .module-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  height: auto;
}

.sidebar .module-title {
  font-size: 13px;
  font-weight: 700;
}

/* Ranking Module */
.ranking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.ranking-item {
  display: flex;
  justify-content: space-between;
}

.ranking-label {
  font-size: 12px;
  color: var(--muted);
}

.ranking-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Map Module */
.map-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #E8F4E8 0%, #D8EED8 50%, #C8E8D0 100%);
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  position: relative;
  overflow: hidden;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  width: 30%;
  height: 40%;
  background: rgba(180, 200, 180, 0.5);
  border-radius: 40% 60% 50% 50%;
}

.map-placeholder::after {
  content: '';
  position: absolute;
  top: 30%;
  right: 15%;
  width: 25%;
  height: 30%;
  background: rgba(160, 190, 170, 0.5);
  border-radius: 50% 40% 60% 40%;
}

.map-placeholder span {
  position: relative;
  z-index: 1;
}

.region-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

.region-item {
  height: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.region-name {
  color: var(--text);
}

.region-count {
  color: var(--link);
}

/* Genres Module */
.donuts-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 12px;
}

.donut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.donut-chart {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(#F6AB09 0deg 120deg,
      var(--cta) 120deg 200deg,
      var(--link) 200deg 280deg,
      #DDD 280deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.donut-chart::after {
  content: '';
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
}

.donut-label {
  font-size: 12px;
  color: var(--muted);
}

.genre-list {
  display: flex;
  flex-direction: column;
}

.genre-item {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.genre-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.genre-icon svg {
  width: 12px;
  height: 12px;
  fill: var(--muted);
}

.genre-name {
  flex: 1;
  color: var(--text);
}

.genre-count {
  color: var(--muted);
}

/* Working On Module */
.project-item {
  margin-bottom: 10px;
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-title {
  font-size: 12px;
  font-weight: 700;
}

.project-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1100px) {

  .container,
  .hero-banner,
  .profile-card,
  .tab-stats-bar,
  .main-content {
    max-width: 100%;
    width: auto;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-banner,
  .profile-card,
  .tab-stats-bar {
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (max-width: 980px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    margin-top: 0;
  }

  .profile-card {
    grid-template-columns: 100px 1fr;
  }

  .profile-stats {
    grid-column: 1 / -1;
    margin-top: 12px;
  }

  .tab-stats-bar {
    height: auto;
    flex-wrap: wrap;
  }

  .tab-item {
    flex: 0 0 33.333%;
    border-bottom: 1px solid var(--border);
  }

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

  .osusume-featured {
    height: 180px;
  }

  .feed-photos {
    flex-wrap: wrap;
  }

  .feed-photo img {
    width: 120px;
    height: 80px;
  }
}

@media (max-width: 600px) {
  .main-header .container {
    gap: 8px;
  }

  .logo {
    width: auto;
  }

  .logo-text {
    display: none;
  }

  .search-scope {
    width: 80px;
    font-size: 11px;
  }

  .header-controls {
    width: auto;
  }

  .header-controls a:not(:last-child) {
    display: none;
  }

  .hero-overlay-title {
    max-width: 100%;
    right: 0;
  }

  .hero-cta {
    position: static;
    padding: 12px;
    background: rgba(0, 0, 0, 0.55);
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   World Map Component - 1990s Tabelog Style
   ========================================== */

.world-map-component {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 15px;
  margin: 20px 0;
  font-family: inherit;
  position: relative;
}

.wm-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  margin: 0 0 15px 0;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #c0c0c0;
}

/* 1990s Retro Legend Box - matches Tabelog exactly */
.wm-legend-box {
  display: inline-block;
  margin-bottom: 15px;
  padding: 1px;
  background: #7a7a7a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.wm-legend-box,
.wm-legend-box * {
  font-family: var(--wm-retro-font);
  -webkit-font-smoothing: none;
  font-smooth: never;
  font-kerning: none;
  font-feature-settings: "kern" 0;
  font-variant-ligatures: none;
  font-variant-numeric: tabular-nums;
}

.wm-legend-header {
  background: #a8a8a8;
  color: #fff;
  padding: 5px 8px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.wm-legend-body {
  padding: 7px 10px 8px;
  background: #f2f2f2;
}

/* Grainy utility class (retro "compressed" paper) */
.grainy {
  position: relative;
}

.grainy::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--grain-opacity, 0.16);
  mix-blend-mode: multiply;
  background-size: var(--grain-size, 90px) var(--grain-size, 90px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 0.3 0.6 0.9'/%3E%3CfeFuncG type='discrete' tableValues='0 0.3 0.6 0.9'/%3E%3CfeFuncB type='discrete' tableValues='0 0.3 0.6 0.9'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='64' height='64' filter='url(%23n)' opacity='0.85'/%3E%3C/svg%3E");
  z-index: 10;
}

.wm-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.wm-color-box {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  display: inline-block;
  flex-shrink: 0;
}

.wm-legend-text {
  font-size: 12px;
  color: #222;
  font-weight: 700;
}

/* Map Frame - 1990s style */
.wm-map-frame {
  position: relative;
  margin-bottom: 20px;
  padding: 3px;
  background: #6f6f6f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

#world-map-svg {
  width: 100%;
  height: auto;
  display: block;
  background: #f8f8f8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.wm-country {
  stroke: #fff;
  stroke-width: 0.4;
  cursor: pointer;
}

.wm-country:hover {
  stroke: #666;
  stroke-width: 0.8;
  filter: brightness(0.95);
}

/* Tooltip */
.wm-tooltip {
  position: absolute;
  background: #333;
  color: white;
  padding: 6px 10px;
  border: 1px solid #000;
  font-size: 12px;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wm-tooltip-name {
  font-weight: bold;
  margin-bottom: 2px;
}

.wm-tooltip-visits {
  font-size: 11px;
  color: #ccc;
}

/* Rankings - Modern contrast with retro elements above */
.wm-rankings {
  display: flex;
  gap: 30px;
  margin-top: 15px;
}

.wm-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.wm-rank-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #eee;
}

.wm-rank-item:last-child {
  border-bottom: none;
}

.wm-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  color: white;
  margin-right: 10px;
  flex-shrink: 0;
}

/* Gold, Silver, Bronze badges */
.wm-badge-1 {
  background: linear-gradient(145deg, #f5d742 0%, #d4a500 50%, #b8860b 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.wm-badge-2 {
  background: linear-gradient(145deg, #e8e8e8 0%, #b8b8b8 50%, #909090 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.wm-badge-3 {
  background: linear-gradient(145deg, #d4a574 0%, #b87333 50%, #8b5a2b 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.wm-badge-4 {
  background: #888;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.wm-rank-name {
  flex: 1;
  font-weight: 500;
}

.wm-rank-count {
  color: var(--muted);
  font-size: 12px;
}

.wm-rank-count em {
  font-style: normal;
  color: var(--text);
  font-weight: bold;
}
