:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --surface-hover: #232d3a;
  --border: #2e3a48;
  --text: #e8eef4;
  --text-muted: #8a9aad;
  --accent: #5eead4;
  --accent-dim: #2dd4bf33;
  --danger: #f87171;
  --nav-seg-radius: 12px;
  --nav-seg-inner-radius: 9px;
  --nav-seg-pad: 3px;
  --nav-seg-gap: 3px;
  --nav-seg-height: 2.75rem;
  --main-sidebar-w: 14.5rem;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

main {
  min-width: 0;
}

.app {
  width: 100%;
  max-width: min(100%, 58rem);
  margin: 0 auto;
  padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
  padding-right: max(1rem, calc(env(safe-area-inset-right, 0px) + 0.75rem));
  padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, calc(env(safe-area-inset-left, 0px) + 0.75rem));
}

.top-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1rem);
  padding-bottom: clamp(1rem, 3vw, 1.35rem);
  margin-bottom: clamp(1.15rem, 3vw, 1.65rem);
  border-bottom: 1px solid var(--border);
}

.top-nav__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem clamp(0.75rem, 2.5vw, 1.25rem);
  width: 100%;
  min-width: 0;
}

.top-nav__primary-end {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.5rem 0.6rem;
  flex: 0 1 auto;
  min-width: 0;
}

.top-nav__tabs-row {
  width: 100%;
  min-width: 0;
}

.brand-block {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(100%, 32rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.brand-heading {
  margin: 0;
  line-height: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  background: none;
  display: flex;
  align-items: center;
  min-height: var(--nav-seg-height);
}

.brand-heading-link {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
}

.brand-heading-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: clamp(3.2rem, 10.5vw, 5.35rem);
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  vertical-align: top;
  image-rendering: auto;
  -webkit-user-drag: none;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.35));
}

.nav-toolbar__profile {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
}

.profile-nav-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Match outer height of `.segmented` row: tab min-height + vertical padding */
  min-height: calc(var(--nav-seg-height) + 2 * var(--nav-seg-pad));
  padding: 0 clamp(0.65rem, 2.5vw, 1.1rem);
  border-radius: var(--nav-seg-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 5%, transparent) inset,
    0 8px 22px rgba(0, 0, 0, 0.2);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.profile-nav-link span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.profile-nav-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.profile-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-nav-link--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.segmented {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  padding: var(--nav-seg-pad);
  gap: var(--nav-seg-gap);
  border-radius: var(--nav-seg-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 5%, transparent) inset,
    0 8px 22px rgba(0, 0, 0, 0.2);
}

.segmented--lang {
  flex: 1 1 auto;
  min-width: 0;
}

.top-nav__primary-end .segmented--lang {
  flex: 0 0 auto;
}

.segmented--tabs {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

@media (min-width: 48rem) {
  .top-nav__tabs-row .top-nav__tabs.tabs {
    display: flex;
    width: 100%;
  }

  .top-nav__tabs-row .segmented--tabs {
    width: 100%;
  }

  .segmented--lang .lang-btn {
    flex: 0 1 auto;
    min-width: 2.75rem;
  }

  .segmented--tabs .tab {
    flex: 1 1 0;
    min-width: 0;
  }
}

.lang-toggle {
  display: flex;
}

.lang-btn__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.lang-flag {
  flex-shrink: 0;
  width: 1.35rem;
  height: 0.9rem;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 85%, #000);
}

.lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-btn__label {
  line-height: 1;
}

.lang-btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0 0.75rem;
  min-height: var(--nav-seg-height);
  flex: 1 1 0;
  min-width: 0;
  border: none;
  border-radius: var(--nav-seg-inner-radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.auth-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 0.6rem;
}

.auth-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-state {
  margin: 0;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.auth-tabs {
  display: inline-flex;
  gap: 0.35rem;
}

.auth-tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.auth-tab--active {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 0.5rem;
}

.auth-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.auth-field input {
  width: 100%;
  min-height: 2rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.38rem 0.55rem;
  background: #10161d;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
}

.auth-field input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, #fff);
  outline-offset: 1px;
}

.auth-btn {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.4rem 0.6rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.auth-btn--primary {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.auth-btn--ghost {
  color: var(--text-muted);
}

.auth-feedback {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

.auth-feedback--error {
  color: #fca5a5;
}

.auth-feedback--success {
  color: #86efac;
}

.auth-page {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: clamp(1rem, 3vw, 1.35rem);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 1rem;
}

.auth-page-head {
  display: grid;
  gap: 0.35rem;
}

.auth-page-title {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 700;
}

.auth-page-intro {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 42rem;
}

.auth-state--page {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text);
}

.auth-logout--page {
  justify-self: start;
  margin-top: 0.25rem;
}

.auth-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 40rem) {
  .auth-split {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.auth-panel {
  border: 1px solid color-mix(in srgb, var(--border) 90%, var(--accent));
  border-radius: 12px;
  padding: 0.85rem;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
}

.auth-panel-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-feedback--page {
  margin: 0;
}

.auth-login-extras {
  margin: 0.65rem 0 0;
  text-align: center;
}

.auth-text-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  touch-action: manipulation;
}

.auth-text-link:hover {
  color: color-mix(in srgb, var(--accent) 88%, #fff);
}

.auth-text-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-flow-block {
  min-width: 0;
}

.auth-flow-hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.auth-password-done__title {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #86efac;
  line-height: 1.35;
}

.auth-password-done__hint {
  margin: 0 0 0.75rem;
}

.auth-password-done .auth-btn--ghost {
  margin-top: 0.15rem;
}

.lang-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.lang-btn--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Main nav tabs (Mining–Clan): 2×2 grid on narrow screens — rapi, tanpa geser horizontal */
@media (max-width: 47.99rem) {
  .top-nav__tabs-row .segmented--tabs {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--nav-seg-gap);
    align-items: stretch;
  }

  .top-nav__tabs-row .segmented--tabs .tab {
    flex: unset;
    min-width: 0;
    width: 100%;
    min-height: calc(var(--nav-seg-height) - 2px);
    padding: 0.35rem 0.4rem;
    font-size: clamp(0.78rem, 3.1vw, 0.875rem);
    line-height: 1.2;
  }

  .top-nav__tabs-row .segmented--tabs .tab span {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
  }
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--nav-seg-gap);
  justify-content: stretch;
}

.tab {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0 clamp(0.65rem, 2.5vw, 1.1rem);
  min-height: var(--nav-seg-height);
  flex: 1 1 0;
  min-width: 0;
  border: none;
  border-radius: var(--nav-seg-inner-radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

a.tab.tab--link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-muted);
  box-sizing: border-box;
}

.sidebar-tab-icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 0.18rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: color-mix(in srgb, var(--surface-hover) 82%, transparent);
  image-rendering: auto;
  opacity: 0.95;
}

.sidebar-tab-icon--profile {
  width: 3rem;
  height: 3rem;
}

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

.tab span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

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

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tab--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.panel {
  display: none;
}

.panel--active {
  display: block;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  margin-bottom: 0.55rem;
}

.panel-head .panel-title {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
}

.panel-title {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  font-weight: 700;
}

#panel-fishing .panel-title {
  margin-bottom: 0.55rem;
}

#panel-guide .panel-title {
  margin-bottom: 0.55rem;
}

.total-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.total-inline .total-label {
  font-size: 0.95rem;
}

.total-inline .total-value {
  font-size: 1.45rem;
}

.panel-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  overflow-wrap: break-word;
}

.panel-desc.muted {
  font-style: italic;
}

.calc-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mining-group {
  padding-bottom: 1.65rem;
  margin-bottom: 1.65rem;
  border-bottom: 1px solid var(--border);
}

.mining-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.mining-banner {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.mining-banner-inner {
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--group-accent) 32%, #0d1218) 0%,
    color-mix(in srgb, var(--group-accent) 14%, #0d1218) 100%
  );
  border: 1px solid color-mix(in srgb, var(--group-accent) 45%, var(--border));
  padding: 0.6rem 2.15rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--group-accent) 22%, transparent),
    0 4px 12px rgba(0, 0, 0, 0.25);
}

.mining-banner-label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.mining-banner-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--group-accent);
}

.mining-cols-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.mining-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(6.75rem, 1fr));
  gap: 0.75rem 0.55rem;
  align-items: start;
  min-width: 0;
}

.mining-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.65rem 0.45rem 0.7rem;
  background: color-mix(in srgb, var(--group-accent) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--group-accent) 22%, var(--border));
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.mining-cell-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  line-height: 1.25;
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  hyphens: auto;
}

.mining-cell-rate {
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  color: color-mix(in srgb, var(--group-accent) 72%, var(--text-muted));
  line-height: 1.25;
  margin-top: -0.15rem;
}

.mining-icon-slot {
  width: 100%;
  aspect-ratio: 1;
  max-width: 4.75rem;
  margin: 0.2rem auto 0;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--group-accent) 35%, var(--border));
  background: radial-gradient(
    ellipse 80% 80% at 50% 30%,
    color-mix(in srgb, var(--group-accent) 12%, var(--bg)) 0%,
    var(--bg) 70%
  );
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mining-icon-slot--empty {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--group-accent) 25%, var(--border));
  background: var(--bg);
  min-height: 4.25rem;
  aspect-ratio: 1;
}

.mining-icon-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mining-stepper {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  width: 100%;
  max-width: 9.25rem;
  margin: 0 auto;
}

.mining-stepper-btn {
  flex: 0 0 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border: none;
  background: var(--surface-hover);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s;
}

.mining-group .mining-stepper-btn:hover {
  background: color-mix(in srgb, var(--group-accent) 24%, var(--surface));
}

.mining-group .mining-stepper-btn:active {
  background: color-mix(in srgb, var(--group-accent) 38%, var(--surface));
}

.mining-stepper-btn:focus-visible {
  outline: 2px solid var(--group-accent);
  outline-offset: 1px;
  z-index: 1;
}

.mining-stepper-input {
  flex: 1 1 2.5rem;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.2rem;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  -moz-appearance: textfield;
}

.mining-stepper-input:focus {
  outline: none;
  background: color-mix(in srgb, var(--group-accent) 8%, var(--surface));
}

.mining-stepper-input::-webkit-outer-spin-button,
.mining-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.total-label {
  font-weight: 600;
  font-size: 1.05rem;
}

.total-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent);
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 0.15rem;
}

.footer-disclaimer {
  margin: 0 0 0.85rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-credit {
  margin: 0;
  font-weight: 500;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-author {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.footer-credit-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-credit-link:hover {
  color: color-mix(in srgb, var(--accent) 88%, #fff);
  border-bottom-color: var(--accent);
}

.footer-credit-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-social-icon--tako {
  object-fit: contain;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.footer-social-link:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
}

.footer-social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.footer-social-icon {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
  pointer-events: none;
}

/* ——— Mobile & narrow screens ——— */
@media (max-width: 40rem) {
  .mining-cols-wrap {
    overflow-x: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .mining-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 0.5rem;
    min-width: 0;
  }

  .mining-cols .mining-cell:nth-child(5) {
    grid-column: span 2;
  }

  .mining-banner-inner {
    padding-inline: clamp(0.65rem, 4vw, 2.15rem);
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.2rem;
  }

  .mining-banner-label {
    font-size: clamp(0.62rem, 3.2vw, 0.8rem);
    line-height: 1.25;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
  }

  .mining-banner-value {
    font-size: clamp(1rem, 4vw, 1.15rem);
  }

  .panel-title {
    font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  }

  .total-inline .total-value {
    font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  }

  .panel-desc {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
  }

  /* ≥16px on inputs avoids iOS Safari zoom-on-focus */
  .auth-field input,
  .recruit-field input[type="text"],
  .recruit-field input[type="number"],
  .recruit-field input[type="email"] {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  .mining-stepper-input {
    font-size: 1rem;
    min-height: 2.5rem;
  }

  .mining-stepper-btn {
    flex: 0 0 2.75rem;
    min-height: 2.75rem;
    min-width: 2.75rem;
  }

  .auth-btn {
    min-height: 2.75rem;
    padding: 0.5rem 0.85rem;
  }
}

@media (max-width: 36rem) {
  .app {
    padding-left: max(0.75rem, calc(env(safe-area-inset-left, 0px) + 0.55rem));
    padding-right: max(0.75rem, calc(env(safe-area-inset-right, 0px) + 0.55rem));
  }

  .brand-block {
    max-width: 100%;
  }

  .top-nav__primary {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav__primary-end {
    width: 100%;
    justify-content: space-between;
  }

  .top-nav__primary-end .segmented--lang {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-toolbar__profile {
    flex: 0 0 auto;
  }

  .profile-nav-link {
    min-width: 0;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-head .panel-title {
    flex: none;
  }

  .total-inline {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .auth-panel .auth-btn--primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .recruit-cta-profile {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .recruit-form {
    max-width: none;
  }

  .recruit-btn--primary {
    width: 100%;
    justify-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
  }

  .recruit-card__clan {
    overflow-wrap: anywhere;
  }

  .top-nav__tabs-row .segmented--tabs .tab {
    min-height: 2.55rem;
    padding: 0.32rem 0.42rem;
  }

  .top-nav__tabs-row .segmented--tabs .tab span {
    font-size: 0.8rem;
    line-height: 1.2;
  }
}

@media (max-width: 22rem) {
  :root {
    --nav-seg-height: 2.6rem;
  }

  .tab {
    font-size: 0.8125rem;
    padding-inline: 0.5rem;
  }

  .profile-nav-link {
    font-size: 0.8125rem;
    padding-inline: 0.5rem;
  }

  .lang-btn {
    font-size: 0.75rem;
    padding-inline: 0.55rem;
  }

  .lang-btn__inner {
    gap: 0.3rem;
  }

  .lang-flag {
    width: 1.2rem;
    height: 0.8rem;
  }
}

@media (max-width: 26rem) {
  .mining-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-nav__tabs-row .segmented--tabs {
    grid-template-columns: 1fr;
  }

  .top-nav__tabs-row .segmented--tabs .tab {
    min-height: 2.45rem;
    padding: 0.3rem 0.4rem;
  }

  .mining-cols .mining-cell:nth-child(5) {
    grid-column: 1 / -1;
  }

  .mining-cell {
    padding: 0.55rem 0.35rem 0.6rem;
  }

  .mining-cell-label {
    font-size: 0.72rem;
    min-height: 2.35em;
  }

  .mining-cell-rate {
    font-size: 0.68rem;
  }

  .mining-stepper {
    max-width: 100%;
  }

  .mining-stepper-input {
    font-size: 1rem;
    min-height: 2.75rem;
  }

  .mining-stepper-btn {
    flex: 0 0 2.75rem;
    min-height: 2.75rem;
  }
}

/* ——— Guide (Nether wearables) ——— */
.guide-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.guide-subtabs.segmented {
  flex-wrap: nowrap;
  gap: var(--nav-seg-gap);
  padding: var(--nav-seg-pad);
  padding-bottom: var(--nav-seg-pad);
  margin-bottom: 1.15rem;
  border-bottom: none;
  border-radius: var(--nav-seg-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 5%, transparent) inset,
    0 8px 22px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.guide-subtabs.segmented::-webkit-scrollbar {
  height: 4px;
}

.guide-subtabs.segmented::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.guide-subtab {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s, color 0.12s, border-color 0.12s, opacity 0.12s;
}

.guide-subtabs.segmented .guide-subtab {
  flex: 1 1 auto;
  min-width: fit-content;
  border: none;
  border-radius: var(--nav-seg-inner-radius);
  background: transparent;
  padding: 0 0.85rem;
  min-height: calc(var(--nav-seg-height) - 2px);
  font-size: 0.8125rem;
  box-shadow: none;
}

.guide-subtabs.segmented .guide-subtab:hover:not(:disabled) {
  background: var(--surface-hover);
}

.guide-subtabs.segmented .guide-subtab--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.guide-subtab:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.guide-subtab--active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.guide-subtab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.guide-subtab:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.guide-subpanel {
  padding-top: 0.25rem;
}

.guide-soon {
  margin-top: 0.25rem;
}

#panel-guide {
  min-width: 0;
}

.guide-nether-tip {
  margin: 0 0 1.1rem;
  padding: clamp(0.65rem, 2.2vw, 0.85rem) clamp(0.75rem, 2.5vw, 1rem);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-left-width: 4px;
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.guide-nether-tip__title {
  margin: 0 0 0.35rem;
  font-size: clamp(0.78rem, 2.4vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-nether-tip__title:not(:first-child) {
  margin-top: 0.85rem;
}

.guide-nether-tip__text {
  margin: 0;
  font-size: clamp(0.84rem, 2.6vw, 0.95rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: break-word;
}

.guide-nether-tiers-wrap {
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.guide-fishing-section-title {
  margin: 0 0 0.6rem;
  font-size: clamp(0.8rem, 2.5vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-fishing-section-title:not(:first-child) {
  margin-top: 1rem;
}

.guide-nether-tiers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
}

.guide-nether-tier {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  padding: clamp(0.55rem, 2vw, 0.75rem) clamp(0.5rem, 2.5vw, 0.85rem)
    clamp(0.65rem, 2vw, 0.85rem);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 38%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 9%, var(--surface));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.guide-nether-tier-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--tier-accent) 28%, var(--border));
}

.guide-nether-tier-badge {
  flex-shrink: 0;
  width: clamp(2rem, 5.5vw, 2.45rem);
  height: clamp(2rem, 5.5vw, 2.45rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--tier-accent) 92%, #fff) 0%,
    var(--tier-accent) 100%
  );
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.guide-nether-tier-badge__img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  image-rendering: auto;
}

.guide-nether-tier-titles {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.guide-nether-tier-title {
  margin: 0;
  font-size: clamp(0.78rem, 2.6vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
}

.guide-nether-tier-sub {
  margin: 0.15rem 0 0;
  font-size: clamp(0.62rem, 2.2vw, 0.7rem);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.25;
}

.guide-tier-head--toggle {
  cursor: pointer;
  user-select: none;
}

.guide-tier-head--toggle:hover {
  background: color-mix(in srgb, var(--tier-accent) 8%, transparent);
  border-radius: 10px;
}

.guide-tier-head--toggle:focus-visible {
  outline: 2px solid var(--tier-accent);
  outline-offset: 2px;
}

.guide-tier-head--toggle::after {
  content: "▾";
  margin-left: 0.4rem;
  flex: 0 0 auto;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--tier-accent) 90%, var(--text));
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}

.guide-tier-head--open::after {
  transform: rotate(0deg);
}

.guide-mining-tier-subrow {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}

.guide-mining-tier-subrow .guide-nether-tier-sub {
  margin: 0;
}

.guide-mining-tier-head {
  align-items: center;
  gap: 0.55rem;
}

.guide-mining-head-cost {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 34%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 12%, var(--bg));
  min-width: 0;
  max-width: min(48%, 15rem);
}

.guide-mining-head-cost__icon {
  width: clamp(1.2rem, 3.9vw, 1.45rem);
  height: clamp(1.2rem, 3.9vw, 1.45rem);
  flex: 0 0 auto;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 30%, var(--border));
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.guide-mining-head-cost__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1px;
}

.guide-mining-head-cost__icon--placeholder {
  font-family: "JetBrains Mono", monospace;
  color: var(--tier-accent);
}

.guide-mining-head-cost__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.guide-mining-head-cost__label {
  font-size: clamp(0.66rem, 2.2vw, 0.74rem);
  font-weight: 700;
  color: color-mix(in srgb, var(--tier-accent) 88%, var(--text));
}

.guide-mining-head-cost__value {
  font-size: clamp(0.6rem, 2vw, 0.68rem);
  font-weight: 500;
  color: var(--text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.guide-mining-head-cost__meta {
  font-size: clamp(0.56rem, 1.9vw, 0.62rem);
  font-weight: 500;
  color: color-mix(in srgb, var(--tier-accent) 72%, var(--text-muted));
}

.guide-nether-tier-body {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 2vw, 0.55rem);
  flex: 1;
  min-height: 0;
}

.guide-nether-tier-body[hidden] {
  display: none;
}

.guide-nether-empty {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}

.guide-wear-row {
  display: block;
  padding: clamp(0.45rem, 2.2vw, 0.65rem) clamp(0.4rem, 2vw, 0.65rem);
  border-radius: 10px;
  background: color-mix(in srgb, var(--tier-accent) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--tier-accent) 20%, var(--border));
}

.guide-wear-card {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 3vw, 1rem);
  min-width: 0;
}

.guide-wear-row--or {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.guide-wear-card--or {
  flex: 1 1 0;
}

.guide-wear-or-sep {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 2rem;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 32%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 15%, var(--bg));
  font-size: clamp(0.58rem, 2.1vw, 0.66rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--tier-accent) 92%, var(--text));
}

.guide-wear-row--or .guide-wear-icon {
  width: clamp(2.55rem, 13vw, 3.35rem);
  height: clamp(2.55rem, 13vw, 3.35rem);
}

.guide-wear-row--or .guide-wear-name {
  font-size: clamp(0.69rem, 2.35vw, 0.82rem);
}

.guide-wear-row--or .guide-wear-level {
  font-size: clamp(0.61rem, 2.2vw, 0.72rem);
}

.guide-wear-icon {
  flex-shrink: 0;
  width: clamp(3.35rem, 18vw, 4.75rem);
  height: clamp(3.35rem, 18vw, 4.75rem);
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--tier-accent) 50%, var(--border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier-accent) 22%, var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.guide-wear-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(3px, 1vw, 6px);
}

.guide-wear-icon--placeholder {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.85rem, 3.5vw, 1.15rem);
  font-weight: 700;
  color: var(--tier-accent);
}

.guide-wear-slot {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.1rem;
  padding: 0.14rem 0.4rem;
  font-size: clamp(0.58rem, 2vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  color: color-mix(in srgb, var(--tier-accent) 85%, var(--text));
  background: color-mix(in srgb, var(--tier-accent) 14%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--tier-accent) 35%, var(--border));
}

.guide-wear-effect {
  font-size: clamp(0.62rem, 2.2vw, 0.74rem);
  line-height: 1.35;
  color: color-mix(in srgb, var(--tier-accent) 68%, var(--text-muted));
  padding: 0.16rem 0.42rem;
  border-radius: 6px;
  border: 1px dashed color-mix(in srgb, var(--tier-accent) 34%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 10%, var(--bg));
  align-self: flex-start;
  max-width: 100%;
}

.guide-wear-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.guide-wear-name {
  font-size: clamp(0.76rem, 2.8vw, 0.92rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.guide-wear-stats-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.22rem 0.38rem;
  margin-top: 0.08rem;
}

.guide-wear-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 3.2rem;
  padding: 0.18rem 0.44rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 28%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 10%, var(--bg));
}

.guide-wear-stat--active .guide-wear-stat-value {
  color: color-mix(in srgb, var(--tier-accent) 88%, #9dfeb6);
  font-weight: 700;
}

.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: color-mix(in srgb, var(--tier-accent) 55%, #9dfeb6);
  background: color-mix(in srgb, var(--tier-accent) 20%, var(--bg));
}

.guide-wear-stat--active {
  border-color: color-mix(in srgb, var(--tier-accent) 56%, #9dfeb6);
  background: color-mix(in srgb, var(--tier-accent) 16%, var(--bg));
}

.guide-wear-stat--earth.guide-wear-stat--active .guide-wear-stat-value {
  color: #7ecf63;
}

.guide-wear-stat--earth.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: #7ecf63;
  background: color-mix(in srgb, #7ecf63 20%, var(--bg));
}

.guide-wear-stat--earth.guide-wear-stat--active {
  border-color: #7ecf63;
  background: color-mix(in srgb, #7ecf63 16%, var(--bg));
}

.guide-wear-stat--air.guide-wear-stat--active .guide-wear-stat-value {
  color: #8ed8ff;
}

.guide-wear-stat--air.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: #8ed8ff;
  background: color-mix(in srgb, #8ed8ff 20%, var(--bg));
}

.guide-wear-stat--air.guide-wear-stat--active {
  border-color: #8ed8ff;
  background: color-mix(in srgb, #8ed8ff 16%, var(--bg));
}

.guide-wear-stat--fire.guide-wear-stat--active .guide-wear-stat-value {
  color: #ff8a65;
}

.guide-wear-stat--fire.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: #ff8a65;
  background: color-mix(in srgb, #ff8a65 20%, var(--bg));
}

.guide-wear-stat--fire.guide-wear-stat--active {
  border-color: #ff8a65;
  background: color-mix(in srgb, #ff8a65 16%, var(--bg));
}

.guide-wear-stat--water.guide-wear-stat--active .guide-wear-stat-value {
  color: #72b6ff;
}

.guide-wear-stat--water.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: #72b6ff;
  background: color-mix(in srgb, #72b6ff 20%, var(--bg));
}

.guide-wear-stat--water.guide-wear-stat--active {
  border-color: #72b6ff;
  background: color-mix(in srgb, #72b6ff 16%, var(--bg));
}

.guide-wear-stat--dark.guide-wear-stat--active .guide-wear-stat-value {
  color: #b18cff;
}

.guide-wear-stat--dark.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: #b18cff;
  background: color-mix(in srgb, #b18cff 20%, var(--bg));
}

.guide-wear-stat--dark.guide-wear-stat--active {
  border-color: #b18cff;
  background: color-mix(in srgb, #b18cff 16%, var(--bg));
}

.guide-wear-stat--light.guide-wear-stat--active .guide-wear-stat-value {
  color: #ffd86a;
}

.guide-wear-stat--light.guide-wear-stat--active .guide-wear-stats-icon {
  border-color: #ffd86a;
  background: color-mix(in srgb, #ffd86a 20%, var(--bg));
}

.guide-wear-stat--light.guide-wear-stat--active {
  border-color: #ffd86a;
  background: color-mix(in srgb, #ffd86a 16%, var(--bg));
}

.guide-wear-stats-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 26%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 8%, var(--bg));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.guide-wear-stats-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1px;
}

.guide-wear-stat-value {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.7rem, 2.45vw, 0.84rem);
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
}

.guide-wear-level {
  font-size: clamp(0.66rem, 2.4vw, 0.78rem);
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
}

.guide-wear-note {
  font-size: clamp(0.6rem, 2.2vw, 0.7rem);
  line-height: 1.35;
  color: color-mix(in srgb, var(--tier-accent) 60%, var(--text-muted));
}

.guide-mining-target {
  margin: 0.15rem 0 0;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 30%, var(--border));
  background: color-mix(in srgb, var(--tier-accent) 8%, var(--bg));
  font-size: clamp(0.68rem, 2.4vw, 0.8rem);
  line-height: 1.4;
  color: var(--text);
}

.guide-fishing-lure-title {
  margin: 0.2rem 0 0;
  font-size: clamp(0.64rem, 2.2vw, 0.74rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tier-accent) 90%, var(--text));
}

@media (max-width: 32rem) {
  .guide-mining-tier-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .guide-mining-head-cost {
    margin-left: 0;
    max-width: 100%;
  }

  .guide-wear-row--or {
    flex-direction: column;
  }

  .guide-wear-or-sep {
    align-self: center;
  }
}

@media (max-width: 40rem) {
  .guide-nether-tier {
    padding: 0.55rem 0.5rem 0.7rem;
  }

  .guide-nether-tier-head {
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.45rem;
  }

  .guide-mining-head-cost {
    padding: 0.28rem 0.42rem;
    gap: 0.32rem;
  }

  .guide-wear-icon {
    width: clamp(2.95rem, 16vw, 3.9rem);
    height: clamp(2.95rem, 16vw, 3.9rem);
  }

  .guide-wear-row {
    padding: 0.45rem 0.4rem;
  }

  .guide-wear-stats-list {
    gap: 0.16rem 0.26rem;
  }

  .guide-wear-stat {
    min-width: 2.65rem;
    padding: 0.14rem 0.3rem;
    gap: 0.22rem;
  }

  .guide-wear-stats-icon {
    width: 1.08rem;
    height: 1.08rem;
  }

  .guide-wear-stat-value {
    font-size: clamp(0.62rem, 2.2vw, 0.74rem);
  }

  .guide-wear-effect {
    font-size: clamp(0.58rem, 2vw, 0.68rem);
    padding: 0.12rem 0.34rem;
  }
}

/* Halaman 404 */
.not-found {
  text-align: center;
  padding-top: clamp(3rem, 12vh, 6rem);
  padding-bottom: 3rem;
}

.not-found__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.not-found__text {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1.05rem;
}

.not-found__text--en {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.not-found__actions {
  margin: 0;
}

.not-found__link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.not-found__link:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

/* ——— Clan recruitment ——— */
.recruit-page {
  display: grid;
  gap: 1.25rem;
}

.recruit-page__head {
  margin-bottom: 0;
}

.recruit-intro {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 44rem;
}

.recruit-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: clamp(0.85rem, 2.5vw, 1.1rem);
}

.recruit-section__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.recruit-login-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.recruit-cta-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  text-decoration: none;
  box-sizing: border-box;
}

.recruit-form {
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
}

.recruit-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.recruit-field input[type="text"],
.recruit-field input[type="number"],
.recruit-field input[type="email"] {
  width: 100%;
  min-height: 2rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.38rem 0.55rem;
  background: #10161d;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
}

.recruit-field--checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--text);
}

.recruit-field--checkbox input {
  width: auto;
  accent-color: var(--accent);
}

.recruit-btn {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.45rem 0.75rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  justify-self: start;
}

.recruit-btn--primary {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.recruit-btn--danger {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  color: #fecaca;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.recruit-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recruit-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.recruit-feedback {
  margin: 0;
}

.recruit-card {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--border) 85%, var(--accent));
  border-radius: 12px;
  padding: 0.85rem;
  background: color-mix(in srgb, var(--bg) 40%, var(--surface));
  display: grid;
  gap: 0.5rem;
}

.recruit-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.recruit-badge--open {
  background: color-mix(in srgb, #22c55e 22%, transparent);
  color: #86efac;
  border: 1px solid color-mix(in srgb, #22c55e 40%, transparent);
}

.recruit-badge--full {
  background: color-mix(in srgb, var(--text-muted) 18%, transparent);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.recruit-card__clan {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.recruit-card__meta {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.65rem;
  font-size: 0.78rem;
}

.recruit-card__meta dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.recruit-card__meta dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.recruit-card__link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recruit-card__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.recruit-card__time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.recruit-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.recruit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text);
}

.recruit-toggle input {
  accent-color: var(--accent);
}

/* ——— Fishing: shop lure calculator ——— */
.lure-shop {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.lure-shop--page {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.lure-shop-input--spend-only {
  max-width: 100%;
}

.lure-shop__head {
  margin-bottom: 0.35rem;
}

.lure-shop-spend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.lure-shop-spend__field--wide {
  grid-column: 1 / -1;
}

.lure-shop-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.lure-shop-input {
  width: 100%;
  box-sizing: border-box;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.lure-shop-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lure-shop-input--meta {
  max-width: 16rem;
}

.lure-shop-table-wrap {
  overflow-x: auto;
  margin: 0 -0.15rem;
  padding: 0 0.15rem 0.25rem;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.lure-shop-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lure-shop-table th,
.lure-shop-table td {
  padding: 0.55rem 0.45rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.lure-shop-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.lure-shop-table__num {
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.lure-shop-lure-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}



.lure-shop-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse 80% 80% at 50% 30%, var(--surface-hover), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lure-shop-icon--empty {
  border-style: dashed;
  opacity: 0.55;
}

.lure-shop-icon__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  -webkit-user-drag: none;
}

.lure-shop-name {
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lure-shop-mode {
  padding: 2px;
  gap: 2px;
  min-height: 0;
}

.lure-shop-mode-btn {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.45rem;
  min-height: 2rem;
  flex: 1 1 0;
  min-width: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s ease, color 0.14s ease;
}

.lure-shop-mode-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.lure-shop-mode-btn--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.lure-shop-mode-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.lure-shop-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 9rem;
}

.lure-shop-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lure-shop-field-group--stock {
  min-width: 6.5rem;
}

.lure-shop-field-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lure-shop-subtotal {
  display: block;
  font-weight: 700;
  color: var(--accent);
}

.lure-shop-summary {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent-dim) 35%, var(--surface));
  display: grid;
  gap: 0.45rem;
}

.lure-shop-summary__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.lure-shop-summary__row--muted {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.lure-shop-summary__row--strong {
  font-weight: 700;
  font-size: 1rem;
  padding-top: 0.35rem;
  margin-top: 0.15rem;
  border-top: 1px solid var(--border);
}

.lure-shop-summary__val {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.lure-shop-status {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.lure-shop-status--profit {
  color: var(--accent);
}

.lure-shop-status--loss {
  color: var(--danger);
}

.lure-shop-status--break {
  color: var(--text-muted);
}

/*
 * Lure shop mobile: base rules above use a wide table min-width; this block must
 * stay AFTER those rules so it wins in the cascade (same specificity).
 * Below ~768px: stack each lure as a card; thead kept for screen readers only.
 */
@media (max-width: 47.99rem) {
  .lure-shop-table-wrap {
    overflow-x: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-bottom: 0.2rem;
  }

  .lure-shop-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
  }

  .lure-shop-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .lure-shop-table tbody {
    display: block;
  }

  .lure-shop-table tbody tr {
    display: block;
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  }

  .lure-shop-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .lure-shop-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-bottom: none;
    padding: 0.4rem 0;
    text-align: left;
    vertical-align: top;
  }

  .lure-shop-table td + td {
    border-top: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    margin-top: 0.35rem;
    padding-top: 0.55rem;
  }

  .lure-shop-table td:first-child {
    padding-top: 0;
  }

  .lure-shop-table tbody td.lure-shop-table__num {
    text-align: right;
    font-size: 0.95rem;
    border-top-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  }

  .lure-shop-lure-cell {
    align-items: flex-start;
  }

  .lure-shop-mode.segmented {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }

  .lure-shop-mode-btn {
    min-height: 2.5rem;
    font-size: 0.78rem;
    padding: 0.35rem 0.4rem;
  }

  .lure-shop-input {
    font-size: 1rem;
    min-height: 2.5rem;
  }

  .lure-shop-price-wrap {
    min-width: 0;
  }

  .lure-shop-field-group--stock {
    min-width: 0;
  }

  .lure-shop-input--meta {
    max-width: 100%;
  }

  .lure-shop-spend,
  .lure-shop-summary {
    padding: 0.85rem 0.75rem;
  }
}

/* ——— Internal page transition (reduces footer / layout flash between pages) ——— */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.23s ease;
}

html.page-tx--in .page-transition-overlay,
html.page-tx--out .page-transition-overlay {
  opacity: 1;
}

html.page-tx--out .page-transition-overlay {
  pointer-events: auto;
}

.page-transition-overlay__spinner {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-top-color: var(--accent);
  animation: page-tx-spin 0.7s linear infinite;
}

@keyframes page-tx-spin {
  to {
    transform: rotate(360deg);
  }
}
