:root {
  --rail: 222px;
  --red: #c54136;
  --paper: #fff;
  --surface: #f3f4f6;
  --text: #242832;
  --sub: #606672;
  --rule: #dfe2e7;
  --green: #a9362e;
  --ink: var(--text);
  --muted: var(--sub);
  --line: var(--rule);
  background: var(--surface);
  color: var(--text);
}
.portal {
  min-height: 100vh;
}
.dealerSide {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  padding: 33px 15px 18px;
  background: #292c32;
  color: #fff;
  z-index: 10;
  overflow-y: auto;
}
.dealerBrand {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}
.tamamLogo {
  display: block;
  width: min(100%, 155px);
  height: auto;
}
.authPage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.authCard {
  width: min(100%, 420px);
  border: 1px solid var(--rule);
  padding: clamp(24px, 5vw, 36px);
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 32px #2428320a;
}
.authCard .tamamLogo {
  margin-bottom: 26px;
}
.authCard h1 {
  font-size: 1.85rem;
  margin: 0 0 8px;
}
.authCard .primary {
  width: 100%;
  margin: 5px 0 12px;
}
.authCard .textBtn {
  font-size: 0.88rem;
}
.sideTitle {
  font-size: 0.9rem;
  color: #d2d3d7;
  margin: 12px 12px 28px;
}
.sideLink {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 5px;
  padding: 12px 10px;
  color: #eceef1;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
}
.sideLink svg {
  flex: none;
}
.sideLink:hover {
  background: #393d43;
}
.sideLink.current {
  background: #be4037;
  color: white;
}
.navLabel {
  margin: 26px 10px 6px;
  color: #b5b8c1;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.sideBottom {
  margin-top: auto;
  padding-top: 30px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 8px 2px;
  padding: 16px 0 9px;
  border-top: 1px solid #484b52;
  font-size: 0.88rem;
}
.identity small {
  display: block;
  color: #c0c3cd;
  font-size: 0.77rem;
  margin-top: 3px;
}
.sign {
  font-size: 0.85rem;
  color: #d3d5da;
}
.dealerPage {
  padding-left: var(--rail);
}
.dealerPage .workspace {
  width: calc(100% - 52px);
  padding-top: 28px;
}
.mobileBrand,
.mobileNav,
.drawerShade {
  display: none;
}
.dealerContent {
  max-width: 1530px;
  margin: auto;
  padding: 24px clamp(18px, 2.7vw, 52px) 60px;
}
.bread {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--sub);
  line-height: 1.4;
}
.bread a {
  color: #555d68;
}
.bread span {
  color: #9499a3;
}
.pageHeading {
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pageHeading h1 {
  font-size: clamp(1.85rem, 2.7vw, 3.3rem);
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.045em;
  margin: 0;
}
.portalTools {
  display: flex;
  gap: 15px;
  align-items: center;
}
.portalTools .search {
  width: 100%;
  border-radius: 6px;
  justify-content: flex-start;
  min-height: 45px;
}
.bread .backToChanges {
  font-size: 0.87rem;
  color: #9d322b;
  white-space: nowrap;
  font-weight: 600;
}
.modelSheet {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(112px, 18%) minmax(0, 1fr);
  gap: clamp(12px, 1.6vw, 24px);
  padding: clamp(13px, 1.4vw, 22px);
  margin-bottom: 13px;
  box-shadow: 0 2px 5px #161c2b06;
}
.modelMedia {
  min-width: 0;
}
.photoOpen {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  aspect-ratio: 4/4.7;
  max-height: 240px;
  border: 1px solid #e5e6e9;
  background: #fafafa;
  border-radius: 5px;
  overflow: hidden;
}
.productImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.photoLarge {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  user-select: none;
}
.photoFallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #525762;
}
.photoFallback .tamamLogo {
  width: 78%;
  max-width: 145px;
}
.modelSheet h3 a:hover,
.bread .backToChanges:hover {
  text-decoration: underline;
}
.modelSheet:target {
  outline: 2px solid #bd5346;
  outline-offset: -2px;
}
.zoom {
  display: grid;
  place-items: center;
  position: absolute;
  bottom: 5px;
  right: 5px;
  color: #484f58;
  background: #ffffffeb;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.sheetBody {
  min-width: 0;
}
.modelMeta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: #626873;
  font-size: 0.81rem;
  line-height: 1.4;
}
.marker {
  font-size: 0.72rem;
  font-weight: 650;
  border-radius: 4px;
  padding: 2px 6px;
}
.marker.new {
  background: #e1f3e7;
  color: #205c39;
}
.marker.out {
  background: #fce8e5;
  color: #8b342e;
}
.marker.price {
  background: #eef0f6;
  color: #4d586e;
}
.marker.promo {
  background: #fbe9e7;
  color: #95362e;
}
.modelSheet h3 {
  font-size: clamp(1.15rem, 1.5vw, 1.5rem);
  letter-spacing: -0.025em;
  font-weight: 650;
  margin: 5px 0 12px;
  line-height: 1.25;
}
.sheetScroller {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 5px;
}
.priceMatrix {
  width: 100%;
  font-size: 0.88rem;
  line-height: 1.24;
  font-variant-numeric: tabular-nums;
}
.priceMatrix thead th {
  background: #f4f5f7;
  color: #333a45;
  font-weight: 620;
  padding: 8px;
  text-align: right;
}
.priceMatrix small {
  display: block;
  font-weight: 400;
  color: #626976;
  font-size: 0.75rem;
  margin-top: 2px;
}
.priceMatrix thead th:first-child,
.priceMatrix tbody th {
  text-align: left;
}
.priceMatrix tbody td,
.priceMatrix tbody th {
  font-weight: 450;
  padding: 8px;
  vertical-align: middle;
  background: white;
}
.priceMatrix tbody th {
  color: var(--text);
  white-space: normal;
  width: 35%;
  min-width: 90px;
}
.priceMatrix tbody td {
  text-align: right;
  white-space: nowrap;
}
.priceMatrix .buy {
  color: var(--text);
  font-weight: 650;
}
.priceMatrix .stock {
  color: #265a43;
}
.priceMatrix .unknown {
  color: #6c6f77;
  font-size: 0.8rem;
}
.priceMatrix tr:last-child > * {
  border-bottom: 0;
}
.priceMatrix thead tr:last-child > * {
  border-bottom: 1px solid var(--rule);
}
.sizeToggle {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--ink);
  font-weight: 650;
  padding: 1px 0;
}
.sizeToggle svg {
  color: var(--red);
}
.sizeToggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.priceMatrix .sizeChild > * {
  background: #f7f8fa;
}
.priceMatrix .sizeChild th {
  padding-inline-start: 28px;
}
.modelEmpty,
.resultCount {
  color: var(--sub);
  font-size: 0.88rem;
}
.resultCount {
  margin: 17px 0 10px;
}
.dealerError {
  padding: 12px 24px;
}
.portal .primary:hover {
  background: #92382f;
}
@media (max-width: 1150px) {
  :root {
    --rail: 190px;
  }
  .dealerSide {
    padding-inline: 11px;
  }
  .dealerContent {
    padding-inline: 18px;
  }
  .modelSheet {
    grid-template-columns: minmax(116px, 19%) minmax(0, 1fr);
    gap: 12px;
  }
  .priceMatrix thead th,
  .priceMatrix tbody td,
  .priceMatrix tbody th {
    padding: 7px 6px;
  }
  .sideLink {
    font-size: 0.86rem;
  }
}
@media (max-width: 800px), (max-height: 560px) and (hover: none) and (pointer: coarse) {
  :root {
    --mobile-nav-height: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }
  html:has(.mobileNav) { scroll-padding-bottom: var(--mobile-nav-height); }
  body:has(.dealerSide.open) { overflow: hidden; }
  .dealerPage {
    padding: 0 env(safe-area-inset-right, 0px) var(--mobile-nav-height) env(safe-area-inset-left, 0px);
  }
  .mobileBrand {
    display: flex;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: #292c32;
  }
  .mobileBrand .tamamLogo { width: 112px; }
  .mobileNav {
    position: fixed;
    inset: auto 0 0;
    z-index: 11;
    display: grid;
    grid-template-columns: repeat(5, minmax(max-content, 1fr));
    align-items: stretch;
    height: var(--mobile-nav-height);
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--paper);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -2px 10px #15151b0a;
  }
  .mobileNav > * {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 0;
    color: var(--sub);
    font-size: clamp(.75rem, 3vw, .875rem);
    font-weight: 550;
    line-height: 1.1;
  }
  .mobileNav > :focus-visible { outline-offset: -3px; }
  .mobileNav:not(:has([aria-expanded="true"])) > :is([aria-current="page"], .current),
  .mobileNav > [aria-expanded="true"] {
    background: #fbefed;
    color: #8b332c;
    font-weight: 650;
  }
  .dealerSide {
    width: min(18rem, 85vw);
    inset: 0 0 var(--mobile-nav-height) auto;
    padding: calc(20px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 16px 14px;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 180ms ease, visibility 0s 180ms;
    overscroll-behavior: contain;
  }
  .dealerSide.open {
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
  }
  .dealerSide .desktopOnly { display: none; }
  .dealerSide .sideBottom { margin-top: 0; padding-top: 0; }
  .drawerShade {
    display: block;
    position: fixed;
    inset: 0 0 var(--mobile-nav-height);
    background: #15151b66;
    z-index: 9;
  }
  .dealerContent {
    padding: 18px 14px;
  }
  .pageHeading {
    gap: 7px;
    margin: 12px 0;
  }
  .pageHeading h1 {
    font-size: 1.85rem;
  }
  .modelSheet {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .dealerPage .workspace {
    width: calc(100% - 28px);
  }
}
@media (max-width: 580px) {
  .sheetBody {
    display: contents;
  }
  .modelSheet {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 0 12px;
    align-items: start;
    padding: 12px;
  }
  .modelMedia {
    grid-column: 1;
    grid-row: 1/3;
    align-self: center;
  }
  .photoOpen {
    aspect-ratio: 1;
    max-height: 88px;
  }
  .modelMeta {
    grid-column: 2;
    align-self: end;
    gap: 4px;
  }
  .modelSheet h3 {
    grid-column: 2;
    align-self: start;
    margin: 5px 0 8px;
  }
  .sheetScroller,
  .sheetBody > .outlined,
  .modelEmpty {
    grid-column: 1/-1;
  }
  .sheetScroller {
    margin-top: 11px;
  }
  .priceMatrix {
    font-size: 0.79rem;
  }
  .priceMatrix small {
    font-size: 0.69rem;
  }
  .priceMatrix thead th,
  .priceMatrix tbody td,
  .priceMatrix tbody th {
    padding: 7px 4px;
  }
  .priceMatrix tbody th {
    min-width: 60px;
    width: auto;
  }
  .portalTools .search {
    min-width: 0;
  }

  .sideTitle {
    margin-bottom: 14px;
  }
}
.withdrawnNote {
  padding: 12px;
  background: #f6eee7;
  color: #74482e;
  border-radius: 4px;
  grid-column: 1/-1;
}
.noticeBody {
  white-space: pre-line;
}
.modelChoice {
  display: grid;
  gap: 6px;
  max-width: 550px;
  margin: 1rem 0;
}
.modelChoice select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: white;
}
.mediaTiles,
.photoThumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.mediaTile {
  display: grid;
  gap: 6px;
  width: 150px;
}
.mediaTile img,
.emptyPhoto {
  width: 100%;
  height: 115px;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 4px;
}
.emptyPhoto {
  width: 150px;
  display: grid;
  place-items: center;
}
.emptyPhoto .tamamLogo {
  width: 95px;
}
.mediaFile {
  display: inline-flex;
  align-items: center;
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 7px 10px;
  background: white;
  font-size: 0.88rem;
  cursor: pointer;
}
.mediaFile:focus-within {
  outline: 2px solid var(--red);
}
.mediaFile input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.photoThumbs button {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 3px;
  background: white;
}
.photoThumbs button[aria-pressed="true"] {
  border-color: var(--red);
}
.photoThumbs img {
  display: block;
  width: 56px;
  height: 60px;
  object-fit: contain;
}

.extraTiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 44px), 1fr));
  gap: 5px;
  margin-top: 6px;
}
.extraTiles button {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px;
  background: #fafafa;
  overflow: hidden;
  cursor: zoom-in;
}
.extraTiles img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.extraTiles button:hover, .extraTiles button:focus-visible { border-color: var(--red); }
.record.notice {
  background: white;
  border: 1px solid var(--rule);
  border-inline-start: 4px solid #bfc3c9;
}
.notice .noticeBody { font-weight: 400; margin: 8px 0; }
.notice .noticeState { display: inline-flex; align-items: center; gap: 6px; color: #58616a; font-size: .875rem; }
.record.notice.unread { background: #fff3ec; border-inline-start-color: #a4372c; }
.notice.unread .noticeBody { font-weight: 650; }
.notice.unread .noticeState { color: #8a2f26; font-weight: 650; }
.notice.unread .noticeState::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor;
}
@media (max-width: 580px) {
  .modelMedia { display: contents; }
  .modelMedia > .photoOpen { grid-column: 1; grid-row: 1/3; align-self: center; }
  .extraTiles { grid-column: 1/-1; grid-row: 3; grid-template-columns: repeat(auto-fill, 48px); }
}

.managerPhoto { padding: 0; width: 100%; cursor: zoom-in; }
.managerPhoto img { display: block; }
.notice .textBtn { margin-inline-end: 1em; }

.stickySearch { position: sticky; top: 0; z-index: 4; padding: 8px 0; background: var(--surface); }
.modelSheet[id] { scroll-margin-top: 69px; }
.changeTabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px 0 26px; border-bottom: 1px solid var(--rule); }
.changeTabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 11px 14px; color: var(--sub); border-bottom: 3px solid transparent; font-weight: 600; }
.changeTabs button[aria-selected="true"] { color: #982e28; border-color: var(--red); }
.changeTabs button:hover { background: #f9eae7; }
.changeTabs button span, .assortmentSection h2 span { font-size: .84rem; color: var(--sub); font-weight: 550; font-variant-numeric: tabular-nums; }
.assortmentSection { margin: 0 0 32px; }
.assortmentSection h2 { display: flex; gap: 9px; align-items: baseline; font-size: 1.35rem; margin: 0 0 12px; }
.assortmentSection[data-kind="new"] h2,
.assortmentSection[data-kind="out"] h2 { padding-inline-start: 10px; border-inline-start: 4px solid; }
.assortmentSection[data-kind="new"] h2 { border-color: #3a8154; }
.assortmentSection[data-kind="out"] h2 { border-color: #a6463e; }
.assortmentGrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.assortmentTile { height: 100%; display: flex; flex-direction: column; background: white; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; color: var(--ink); }
.assortmentTile:hover, .assortmentTile:focus-visible { border-color: #b85449; }
.tilePhoto { width: 100%; height: clamp(100px,11vw,155px); display: block; background: #fafafa; padding: 8px; }
.tilePhoto .tamamLogo { max-width: 90px; }
.tileBody { display: grid; gap: 5px; padding: 12px; }
.tileBody .marker { justify-self: start; padding: 3px 7px; font-size: .8125rem; line-height: 1.3; }
.tileBody strong { line-height: 1.3; font-size: 1rem; }
.tileCategory, .tileBody small { color: var(--sub); font-size: .82rem; }
.photoFrame { position: relative; }
.photoViewport { width: 100%; height: min(56vh, 620px); height: min(56dvh, 620px); overflow: hidden; touch-action: none; overscroll-behavior: contain; border: 1px solid var(--rule); border-radius: 5px; background: white; }
.photoViewport[data-zoomed="true"] { cursor: grab; }
.photoViewport[data-zoomed="true"]:active { cursor: grabbing; }
.photoArrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: #fffffff2; color: var(--ink); border: 1px solid var(--rule); border-radius: 50%; box-shadow: 0 2px 9px #0002; }
.photoArrow.previous { left: 8px; }
.photoArrow.next { right: 8px; }
.photoCaption { display:flex; justify-content: space-between; gap: 12px; color: var(--sub); font-size: .85rem; margin-top: 8px; }
.photoCaption span:last-child { white-space: nowrap; }
@media (max-width: 580px) {
  .changeTabs { flex-wrap: nowrap; overflow-x: auto; gap: 0; }
  .changeTabs button { padding: 10px 8px; }
  .assortmentGrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .tileBody { padding: 9px; }
}
.tileLink { display: flex; flex-direction: column; flex: 1; }
.tileLink:focus-visible { outline-offset: -3px; }
.tileComparisons, .comparisonEmpty { margin: 0 12px 12px; font-variant-numeric: tabular-nums; }
.comparison, .comparisonEmpty { border-top: 1px solid var(--rule); padding-top: 8px; }
.comparisonLabel, .comparisonEmpty, .tileComparisons summary { font-size: .82rem; color: var(--sub); }
.pricePair { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 5px 0; }
.pricePair > span { display: grid; }
.pricePair small { color: var(--sub); font-size: .75rem; }
.pricePair s { color: var(--sub); }
.pricePair b, .pricePair s, .priceDelta { white-space: nowrap; }
.priceDelta { font-size: .84rem; font-weight: 600; }
.priceDelta.up { color: #923a2a; }
.priceDelta.down { color: #256342; }
.tileComparisons details { margin-top: 7px; }
.tileComparisons summary { cursor: pointer; }
.announcementBoard { max-width: 990px; }
.announcementTopic + .announcementTopic { margin-top: 26px; }
.announcementTopic h2 { margin: 0 0 10px; font-size: 1.25rem; }
.announcementTopic article { padding: 16px clamp(14px, 2vw, 24px); border: 1px solid var(--rule); border-radius: 7px; background: var(--paper); }
.announcementTopic article + article { margin-top: 8px; }
.announcementTopic h3 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.announcementTopic p, .announcementTopic ul { max-width: 78ch; margin: 8px 0 0; line-height: 1.5; }
.announcementTopic ul { padding-inline-start: 1.25rem; }
.announcementTopic li + li { margin-top: 3px; }
.comparisonDate, .comparisonCurrent { display: block; color: var(--sub); font-size: .75rem; margin-top: 3px; }
.comparison + .comparison { margin-top: 8px; }
.assortmentTile:has(.tileComparisons) .tileLink { flex: 0; }

.priceFilters, .announcementFilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.priceFilters button, .announcementFilter button { border: 1px solid var(--rule); border-radius: 5px; padding: 7px 10px; background: white; }
.priceFilters button[aria-pressed="true"], .announcementFilter button[aria-pressed="true"] { border-color: #af534a; background: #fbefed; color: #84322b; }
.priceFilters span, .priceGroup h3 span { margin-left: .25rem; color: var(--sub); font-size: .86rem; font-variant-numeric: tabular-nums; }
.priceGroup + .priceGroup { margin-top: 26px; }
.priceGroup h3 { margin: 0 0 10px; font-size: 1.1rem; }
.promoTerms { margin: 0 0 12px; padding: 10px 13px; border-inline-start: 3px solid var(--red); background: #fbefed; color: #6e302b; }
.sheetBody > .promoTerms { grid-column: 1/-1; }

@media (prefers-reduced-motion: reduce) {
  .dealerSide { transition: none; }
}

.accountSection { margin-block: 22px; }
.accountSection h2 { margin-bottom: 8px; }
.accountRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.accountRow > div { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.accountRow small { display: block; color: var(--sub); }
.accountActions { display: grid; justify-items: start; gap: 8px; }
.accountActions small { color: var(--sub); }
.accountActions .accountDelete { color: #8b332c; margin-top: 10px; }
