/* Header APINAGA. Semua aturan dibatasi ke header dan breadcrumb pengganti. */
.aph-header {
  --aph-gold: #f8b600;
  --aph-paper: #faf8f4;
  --aph-muted: #d4cec4;
  --aph-line: #3e3931;
  position: relative;
  z-index: 25;
  display: block;
  width: min(100%, 100vw);
  margin: 0;
  background: #131210;
  color: var(--aph-paper);
  font: 14px/1.45 Arial, Helvetica, sans-serif;
  text-align: left;
}
.aph-header, .aph-header *, .aph-header *::before, .aph-header *::after {
  box-sizing: border-box;
}
.aph-header [hidden] { display: none !important; }
.aph-header a { color: inherit; text-decoration: none; }
.aph-header button, .aph-header input { font: inherit; }
.aph-header button, .aph-header summary { cursor: pointer; }
.aph-header :is(a, button, input, summary):focus-visible {
  outline: 3px solid #ffcb46;
  outline-offset: 2px;
}
.aph-header .aph-wrap {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}
.aph-header .aph-masthead {
  display: grid;
  grid-template-columns: minmax(150px, 235px) minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding-block: 12px 16px;
}
.aph-header .aph-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--aph-gold);
  font-size: 24px;
  font-weight: 800;
}
.aph-header .aph-brand img {
  display: block;
  width: 100%;
  max-width: 270px;
  height: 120px;
  object-fit: contain;
  font: inherit;
  color: inherit;
}
.aph-header .aph-main { min-width: 0; }
.aph-header .aph-meta, .aph-header .aph-actions, .aph-header .aph-tools,
.aph-header .aph-ann, .aph-header .aph-locale, .aph-header .aph-tool,
.aph-header .aph-btn, .aph-header .aph-search-open {
  display: flex;
  align-items: center;
}
.aph-header .aph-meta {
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--aph-line);
  color: var(--aph-muted);
  font-size: 12px;
}
.aph-header .aph-ann {
  flex: 1 1 200px;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: inherit;
  font: inherit;
}
.aph-header .aph-ann span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aph-header .aph-icon { display: block; flex: 0 0 auto; }
.aph-header .aph-ann svg { color: var(--aph-gold); }
.aph-header .aph-complain { font-weight: 700; }
.aph-header .aph-complain:hover { text-decoration: underline; }
.aph-header .aph-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.aph-header .aph-locale { gap: 6px; }
.aph-header .aph-locale > span {
  width: 15px;
  height: 15px;
  border: 1px solid #bbb;
  border-radius: 50%;
  background: linear-gradient(#cc2537 0 50%, #fff 50%);
}
.aph-header .aph-title {
  margin: 9px 0 10px;
  color: var(--aph-paper);
  font: 700 clamp(16px, 1.55vw, 22px)/1.24 Arial, Helvetica, sans-serif;
  letter-spacing: normal;
  text-align: right;
  overflow-wrap: anywhere;
}
.aph-header .aph-actions { justify-content: flex-end; gap: 8px; }
.aph-header .aph-tools { gap: 4px; margin-right: 8px; }
.aph-header .aph-tool, .aph-header .aph-search-open {
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--aph-paper);
}
.aph-header .aph-tool:hover, .aph-header .aph-search-open:hover {
  background: #302c25;
  color: var(--aph-gold);
}
.aph-header .aph-meta .aph-tool { width: 28px; height: 28px; }
.aph-header .aph-search-open { border-color: var(--aph-line); }
.aph-header .aph-btn {
  justify-content: center;
  min-width: 106px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .025em;
}
.aph-header .aph-login { background: #17743a; color: #fff; }
.aph-header .aph-register { background: var(--aph-gold); color: #231a00; }
.aph-header .aph-btn:hover { filter: brightness(1.12); }
.aph-header .aph-nav {
  border-top: 1px solid var(--aph-line);
  border-bottom: 2px solid var(--aph-gold);
  background: #201e1b;
}
.aph-header .aph-nav-inner { position: relative; }
.aph-header .aph-categories {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.aph-header .aph-group {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.aph-header .aph-category {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 67px;
  padding: 6px 2px;
  color: var(--aph-paper);
  font: 700 11px/1.15 Arial, Helvetica, sans-serif;
  text-align: center;
}
.aph-header .aph-mark {
  position: relative;
  display: grid;
  place-items: center;
  height: 29px;
  color: var(--aph-gold);
}
.aph-header .aph-mark > svg { width: 25px; height: 25px; }
.aph-header .aph-nav-art { width: 34px; height: 28px; object-fit: contain; }
.aph-header .aph-hot {
  position: absolute;
  top: -4px;
  left: 78%;
  padding: 2px 3px;
  border-radius: 3px;
  background: #a52818;
  color: #fff;
  font: 800 8px/1 Arial, sans-serif;
}
.aph-header .aph-details { margin: 0; padding: 0; }
.aph-header .aph-details > summary {
  display: grid;
  place-items: center;
  width: 22px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--aph-muted);
  font: 700 17px/1 Arial, sans-serif;
}
.aph-header summary::-webkit-details-marker { display: none; }
.aph-header .aph-details[open] > summary span { transform: rotate(180deg); }
.aph-header .aph-category:hover, .aph-header .aph-details summary:hover,
.aph-header .aph-group:focus-within .aph-category { color: var(--aph-gold); }
.aph-header .aph-panel {
  position: absolute;
  z-index: 2;
  inset: 100% 0 auto;
  max-height: min(52vh, 450px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid #5c5035;
  border-radius: 0 0 8px 8px;
  background: #191815;
  box-shadow: 0 10px 22px #0005;
}
.aph-header .aph-providers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(117px, 100%), 1fr));
  gap: 6px;
}
.aph-header .aph-provider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 67px;
  padding: 6px;
  border-radius: 5px;
  background: #282621;
  color: #fff;
  font: 700 11px/1.3 Arial, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
}
.aph-header .aph-provider:hover { background: #393226; color: #ffd67c; }
.aph-header .aph-provider img { width: 70px; height: 42px; object-fit: contain; }
.aph-header .aph-provider small { color: #d4c4a1; font-size: 10px; }
.aph-header .aph-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 4px;
  border: 0;
  background: none;
  color: #fff;
  font-weight: 700;
}
.aph-header .aph-dialog:not([open]) { display: none; }
.aph-header .aph-dialog[open] {
  position: fixed;
  inset: 0;
  display: block;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 20px;
  overflow: auto;
  border: 1px solid #63543a;
  border-radius: 10px;
  background: #201e1b;
  color: #fff;
}
.aph-header .aph-dialog::backdrop { background: #000a; }
.aph-header .aph-search-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.aph-header .aph-search-head h2 {
  margin: 0;
  color: inherit;
  font: 700 19px/1.2 Arial, sans-serif;
}
.aph-header .aph-search-head form { margin: 0; }
.aph-header .aph-search-head button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--aph-line);
  border-radius: 4px;
  background: #302c25;
  color: #fff;
  font-size: 22px;
}
.aph-header .aph-dialog label { display: block; color: var(--aph-muted); }
.aph-header .aph-dialog input {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 10px;
  border: 1px solid #998b71;
  border-radius: 5px;
  background: #fff;
  color: #191815;
}
.aph-header .aph-status { margin: 10px 0; color: var(--aph-muted); }
.aph-header .aph-results { margin: 0; padding: 0; list-style: none; }
.aph-header .aph-results li { margin: 0; padding: 0; list-style: none; }
.aph-header .aph-results a {
  display: block;
  padding: 7px 2px;
  border-top: 1px solid var(--aph-line);
  color: #ffdb85;
}
.apinaga-chip-menu.aph-crumbs a { max-width: 100%; white-space: normal; line-height: 1.35; text-align: center; }
@media (max-width: 920px) {
  .aph-header .aph-wrap { width: min(100% - 24px, 780px); }
  .aph-header .aph-masthead { grid-template-columns: 140px minmax(0, 1fr); gap: 16px; }
  .aph-header .aph-brand img { height: 84px; }
  .aph-header .aph-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 8px; }
  .aph-header .aph-group { position: relative; display: block; border-top: 1px solid var(--aph-line); }
  .aph-header .aph-category {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 6px 38px 6px 4px;
    text-align: left;
  }
  .aph-header .aph-mark { width: 33px; flex: 0 0 auto; }
  .aph-header .aph-details > summary { position: absolute; right: 3px; top: 0; width: 36px; height: 44px; }
  .aph-header .aph-panel { position: static; border-radius: 4px; padding: 6px; box-shadow: none; }
  .aph-header .aph-meta { flex-wrap: wrap; gap: 4px 10px; }
}
@media (max-width: 620px) {
  .aph-header .aph-masthead { display: block; padding-block: 8px 12px; }
  .aph-header .aph-brand { width: fit-content; margin: 0 auto 6px; }
  .aph-header .aph-brand img { width: 160px; height: 76px; }
  .aph-header .aph-meta { justify-content: center; }
  .aph-header .aph-ann { flex-basis: 100%; justify-content: center; }
  .aph-header .aph-title { margin: 9px 0; font-size: 16px; text-align: center; }
  .aph-header .aph-actions { justify-content: center; flex-wrap: wrap; gap: 6px; }
  .aph-header .aph-tools { gap: 0; margin-right: 0; }
  .aph-header .aph-btn { min-width: 67px; padding-inline: 10px; }
  .aph-header .aph-categories { grid-template-columns: 1fr; }
  .aph-header .aph-panel { max-height: 45vh; }
}
