:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-strong: #f0f4f8;
  --text: #1d2430;
  --muted: #657080;
  --line: #d8dee8;
  --blue: #315bdc;
  --blue-dark: #2443a0;
  --green: #1f7a5c;
  --green-dark: #14543e;
  --amber: #c27803;
  --shadow: 0 14px 36px rgba(21, 31, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  letter-spacing: 0;
}

.download-page {
  display: block;
  min-width: 1040px;
  padding: 0;
  background: #f3f4f6;
  color: #202124;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.gf-header {
  min-width: 1040px;
  background: #fff;
  border-bottom: 1px solid #cfd7df;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.gf-header-inner {
  display: flex;
  align-items: center;
  width: 1040px;
  min-height: 54px;
  margin: 0 auto;
  gap: 16px;
}

.gf-logo {
  display: inline-flex;
  align-items: center;
  width: 170px;
  height: 40px;
}

.gf-logo img {
  display: block;
  width: 100%;
  max-height: 38px;
}

.member-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #b9c2ca;
  border-radius: 4px;
  color: #333;
  font-size: 12px;
  text-decoration: none;
}

.announce {
  margin: 0 0 0 auto;
  color: #3b3b3b;
  font-size: 13px;
  font-weight: 700;
}

.gf-nav {
  display: flex;
  justify-content: center;
  min-height: 38px;
  background: #363b43;
}

.gf-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.gf-nav a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.gf-nav a:hover {
  background: #4a515b;
}

.gf-main {
  width: 1040px;
  min-height: 620px;
  margin: 18px auto 0;
  padding-left: 280px;
}

.gf-download-box {
  width: 516px;
  padding: 20px;
  border-radius: 20px;
  background: #28729f;
}

.gf-news-line {
  margin: 0 0 8px;
  color: #fff;
  font-size: 14px;
}

.gf-news-line span {
  font-weight: 700;
}

.gf-tabs {
  display: flex;
  align-items: flex-end;
  height: 56px;
  margin: 0;
  padding: 0;
  border-bottom: 5px solid #1a73e8;
  list-style: none;
}

.gf-tabs li {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-right: 10px;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 800;
}

.gf-tabs li.is-active {
  min-height: 56px;
  font-size: 21px;
}

.gf-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  text-decoration: none;
}

.amazon-tab {
  height: 38px;
  min-height: 38px;
  padding: 0 8px;
}

.amazon-tab a {
  height: 100%;
}

.amazon-tab img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tab-label-short {
  display: none;
}

.gf-content {
  padding: 8px 0;
  border: 2px solid #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
}

.gf-panel {
  margin: 0;
  padding: 8px;
  color: #fff;
}

.download-panel-main-text {
  margin: 0 0 12px;
  font-size: 14px;
}

.download-file-name {
  margin: 0 0 18px;
  color: #fff;
  font-size: 22px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: underline;
}

.progress-box {
  position: relative;
  height: 22px;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid #d4dde5;
  border-radius: 4px;
  background: #e7edf3;
}

.progress-box span {
  display: block;
  width: 0;
  height: 100%;
  background: #7ed957;
  transition: width 120ms ease;
}

.progress-box strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #29313d;
  font-size: 12px;
}

.download-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}

.download-term {
  margin: 0 0 7px;
  font-size: 13px;
}

.download-term strong {
  font-size: 16px;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.download-row span {
  font-size: 13px;
  font-weight: 700;
}

.download-row input {
  width: 50px;
  height: 30px;
  border: 1px solid #9aa4ad;
  border-radius: 2px;
  background: #e8eaed;
}

.gf-button,
.fly-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.gf-button {
  background: #1a73e8;
}

.gf-button:hover {
  background: #155ab6;
}

.gf-button.is-disabled {
  pointer-events: none;
  opacity: 0.62;
}

.button-spinner {
  display: none;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.9;
  animation: button-spin 760ms linear infinite;
}

.is-loading > .button-spinner {
  display: inline-block;
}

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

.fly-button {
  background: #15a66f;
}

.download-part-list {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #cfd7df;
  border-radius: 4px;
  background: #f7f9fb;
}

.download-part-list p {
  margin: 0 0 8px;
  color: #4d5865;
  font-size: 12px;
  font-weight: 700;
}

.download-part-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.download-part-links a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #9fb2c8;
  border-radius: 4px;
  background: #fff;
  color: #155ab6;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.download-part-links a.is-disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.56;
}

.download-part-links a.is-downloading {
  border-color: #1a73e8;
  background: #e8f1ff;
  color: #0b4dae;
  opacity: 1;
}

.fly-button:hover {
  background: #107f55;
}

.qr-area {
  display: grid;
  place-items: start center;
  gap: 6px;
}

.qr-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  padding: 2px;
  border: 2px solid #fff;
  background: #fff;
}

.qr-code {
  display: block;
  width: 100%;
  height: 100%;
}

.gf-panel-secondary {
  font-size: 13px;
}

.gf-panel-secondary p {
  margin: 6px 0;
}

.gf-panel-secondary a {
  color: #fff;
}

.delete-box {
  margin: 18px 0;
}

.delete-box input {
  width: 60px;
  height: 28px;
  border: 0;
  border-radius: 2px;
}

.delete-box button {
  min-height: 28px;
  border: 1px solid #777;
  border-radius: 3px;
  background: #f1f3f4;
}

.report-box {
  margin: 18px 0 12px;
}

.report-box small {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.92);
}

.report-button {
  width: fit-content;
}

.help-link {
  display: inline-block;
  margin: 12px 0 18px;
  font-size: 13px;
  font-weight: 800;
}

.music-banner {
  height: 230px;
  overflow: hidden;
  border-radius: 6px;
  background: #0b0b0b;
}

.music-banner img,
.music-banner iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.music-banner img {
  object-fit: cover;
}

.gf-news-panel {
  width: 728px;
  margin: 20px auto 24px;
  padding: 18px 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.gf-news-panel h2 {
  margin: 0 0 12px;
  padding-left: 9px;
  border-left: 5px solid #1a73e8;
  font-size: 18px;
}

.gf-news-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gf-news-panel li {
  margin: 0 0 10px;
}

.gf-news-panel a,
.gf-news-panel span {
  color: #333;
  text-decoration: none;
}

.gf-news-panel a:hover {
  text-decoration: underline;
}

.gf-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 64px;
  padding: 12px 24px;
  background: #3b3b3b;
  color: #a9a9a9;
  font-size: 12px;
}

.gf-footer a {
  color: #c8c8c8;
  text-decoration: none;
}

.gf-footer a:hover {
  text-decoration: underline;
}

.usage-page {
  min-width: 1040px;
  background: #f3f4f6;
  color: #202124;
}

.usage-main {
  width: 920px;
  margin: 24px auto 40px;
}

.usage-hero,
.usage-section,
.usage-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 31, 48, 0.09);
}

.usage-hero {
  padding: 28px 32px;
  border-top: 8px solid #28729f;
}

.usage-eyebrow {
  margin: 0 0 8px;
  color: #28729f;
  font-size: 13px;
  font-weight: 800;
}

.usage-hero h1 {
  margin: 0;
  font-size: 30px;
}

.usage-hero p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.usage-section {
  margin-top: 18px;
  padding: 24px;
}

.usage-section h2,
.usage-grid h2 {
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 5px solid #1a73e8;
  font-size: 19px;
}

.usage-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.usage-steps li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  background: #f8fafc;
}

.usage-steps span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #28729f;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.usage-steps h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.usage-steps p,
.usage-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.usage-grid article {
  padding: 20px;
}

.usage-notes {
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
  line-height: 1.9;
}

.usage-notes code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e9edf4;
  color: #9a4f00;
}

.usage-flow-lead {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.usage-role-flows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 22px;
}

.usage-role-flow {
  --usage-flow-color: #28729f;
  --usage-flow-soft: #edf7fc;
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #fff;
}

.usage-role-flow-requester {
  --usage-flow-color: #df701b;
  --usage-flow-soft: #fff5e9;
}

.usage-role-flow-receiver {
  --usage-flow-color: #28729f;
  --usage-flow-soft: #edf7fc;
}

.usage-handoff-flow {
  --usage-flow-color: #65733c;
  --usage-flow-soft: #f3f6e9;
  margin-bottom: 22px;
}

.usage-handoff-note {
  margin: 0 18px 18px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #f3f6e9;
  color: #566331;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.usage-role-flow > header {
  padding: 17px 18px 15px;
  border-bottom: 1px solid color-mix(in srgb, var(--usage-flow-color) 22%, #fff);
  background: var(--usage-flow-soft);
}

.usage-role-flow > header span {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--usage-flow-color);
  font-size: 12px;
  font-weight: 800;
}

.usage-role-flow > header h3 {
  margin: 0;
  color: #202124;
  font-size: 19px;
}

.usage-flowchart {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 18px;
  list-style: none;
}

.usage-flowchart li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 0 0 30px;
}

.usage-flowchart li:last-child {
  padding-bottom: 0;
}

.usage-flowchart li:not(:last-child)::after {
  position: absolute;
  bottom: 8px;
  left: 12px;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--usage-flow-color);
  border-bottom: 3px solid var(--usage-flow-color);
  content: "";
  transform: rotate(45deg);
}

.usage-flow-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--usage-flow-color);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.usage-flowchart h4 {
  margin: 0 0 4px;
  color: #202124;
  font-size: 15px;
}

.usage-flowchart p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 700px) {
  .usage-page {
    min-width: 0;
  }

  .usage-main {
    width: auto;
    margin: 16px 12px 30px;
  }

  .usage-hero,
  .usage-section {
    padding: 20px 18px;
  }

  .usage-hero h1 {
    font-size: 25px;
  }

  .usage-grid,
  .usage-role-flows {
    grid-template-columns: minmax(0, 1fr);
  }
}

.usage-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.terms-main {
  width: 920px;
  margin: 24px auto 40px;
}

.terms-updated {
  font-size: 13px;
}

.terms-index {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 31, 48, 0.07);
}

.terms-index a {
  padding: 8px 14px;
  border-radius: 6px;
  background: #eaf3fa;
  color: #176493;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.terms-index a:hover {
  background: #dbeaf5;
}

.terms-document,
.terms-contact {
  margin-top: 18px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 31, 48, 0.09);
}

.terms-document > h2,
.terms-contact h2 {
  margin: 0 0 20px;
  padding: 0 0 12px;
  border-bottom: 2px solid #28729f;
  color: #202124;
  font-size: 24px;
}

.terms-document article {
  margin-top: 26px;
}

.terms-document h3 {
  margin: 0 0 10px;
  color: #263746;
  font-size: 17px;
}

.terms-document p,
.terms-document li,
.terms-contact p {
  color: var(--muted);
  line-height: 1.9;
}

.terms-document p {
  margin: 0;
}

.terms-request p + p {
  margin-top: 10px;
}

.terms-document ul,
.terms-document ol {
  margin: 10px 0 0;
  padding-left: 1.6em;
}

.terms-document li + li {
  margin-top: 5px;
}

.terms-contact-button {
  display: inline-block;
  margin-top: 8px;
  padding: 11px 18px;
  border-radius: 6px;
  background: #28729f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.terms-contact-button:hover {
  background: #1e6089;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

#folderMeta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.header-actions [hidden] {
  display: none;
}

.line-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 40px;
  padding: 0;
  border: 1px solid #04a836;
  border-radius: 8px;
  background: #06c755;
  color: #fff;
  text-decoration: none;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.line-share-button img {
  display: block;
  width: 25px;
  height: 25px;
}

.line-share-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.line-share-button:hover {
  border-color: #039e32;
  background: #05b84e;
  color: #fff;
  transform: translateY(-1px);
}

.line-share-button:focus-visible {
  outline: 3px solid rgba(6, 199, 85, .25);
  outline-offset: 2px;
}

.icon-button,
.primary-button,
.dark-button {
  display: inline-flex;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.icon-button:hover,
.primary-button:hover,
.dark-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  font-size: 21px;
}

.primary-button,
.dark-button {
  padding: 0 16px;
  color: #fff;
}

.primary-button {
  background: var(--blue);
}

.primary-button:hover {
  background: var(--blue-dark);
}

.zip-selected-button {
  background: #8056b3;
}

.zip-selected-button:hover {
  background: #694494;
}

.dark-button {
  background: var(--green);
}

.dark-button:hover {
  background: var(--green-dark);
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: calc(100% - 40px);
  margin: 20px auto;
}

.gallery-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.gallery-panel {
  min-height: calc(100vh - 116px);
  padding: 16px;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.select-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
}

.select-all input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

#countText {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.directory-nav-panel {
  position: sticky;
  top: 76px;
  z-index: 18;
  margin: 0 -16px 18px;
  border-bottom: 1px solid #e6ebf2;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(21, 31, 48, 0.08);
  backdrop-filter: blur(10px);
}

.directory-nav-panel[hidden],
.directory-nav[hidden] {
  display: none;
}

.directory-nav-toggle {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.directory-nav-toggle:hover {
  background: #f5f8fc;
}

.directory-nav-toggle-icon {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(225deg) translate(-2px, -2px);
  transition: transform 160ms ease;
}

.directory-nav-toggle[aria-expanded="false"] .directory-nav-toggle-icon {
  transform: rotate(45deg) translate(-2px, -2px);
}

.directory-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}

.directory-nav-button {
  display: inline-flex;
  align-items: center;
  max-width: min(280px, 100%);
  min-height: 34px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.directory-nav-button:hover {
  border-color: var(--blue);
  background: #eef4ff;
}

.edit-filter-button {
  margin-right: 4px;
  border-color: #f3a7c8;
  background: #fff0f7;
  color: #9e245f;
}

.edit-filter-button:hover,
.edit-filter-button.is-active {
  border-color: #e83e8c;
  background: #e83e8c;
  color: #fff;
}

.edit-filter-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e83e8c;
}

.edit-filter-button.is-active .edit-filter-icon {
  background: rgba(255, 255, 255, 0.2);
}

.edit-filter-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.edit-filter-button.is-active .directory-nav-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.processing-filter-button {
  margin-right: 4px;
  border-color: #f1bd86;
  background: #fff6ec;
  color: #914b0b;
}

.processing-filter-button:hover,
.processing-filter-button.is-active {
  border-color: #ee7e22;
  background: #ee7e22;
  color: #fff;
}

.processing-filter-icon {
  background: #ee7e22;
}

.processing-filter-button.is-active .processing-filter-icon,
.processing-filter-button.is-active .directory-nav-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.directory-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-nav-count {
  flex: 0 0 auto;
  display: inline-grid;
  min-width: 24px;
  min-height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #e6ecfb;
  color: var(--blue-dark);
  font-size: 12px;
}

.gallery {
  display: grid;
  gap: 22px;
}

.gallery-group {
  min-width: 0;
  scroll-margin-top: 152px;
}

.gallery-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin: 0 0 10px;
  padding: 0 2px 8px;
  border-bottom: 1px solid #e0e6ee;
}

.group-select {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  cursor: pointer;
}

.group-select input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.gallery-group-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.gallery-group-header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.photo-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(52px, auto);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.photo-card:hover {
  border-color: #9caad8;
  box-shadow: 0 10px 24px rgba(21, 31, 48, 0.12);
  transform: translateY(-1px);
}

.photo-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 91, 220, 0.16);
}

.photo-card.is-selected .select-chip {
  border-color: var(--blue);
  background: var(--blue);
}

.photo-card.has-edit-request {
  border-color: #e83e8c;
  box-shadow: 0 0 0 2px rgba(232, 62, 140, 0.22);
}

.thumb-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--panel-strong);
}

.thumb-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dce3ec;
}

.thumb-frame::before,
.preview-loader {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("./assets/doyafile_av.gif") center / 32px 32px no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.thumb-frame.is-loading::before,
.preview-stage.is-loading .preview-loader {
  opacity: 1;
}

.thumb-frame.has-error::after {
  content: "読み込み失敗";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #e8edf4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.thumb-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-edit-request-marker {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e83e8c;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(99, 13, 53, 0.28);
}

.photo-edit-request-marker img {
  display: block;
  width: 18px;
  height: 18px;
}

.select-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 8px;
  background: rgba(29, 36, 48, 0.68);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.photo-info {
  min-width: 0;
  padding: 10px;
}

.photo-name {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.photo-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.is-preview-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 68px 2px 2px;
  background: rgba(11, 15, 23, 0.94);
}

.preview-modal[hidden] {
  display: none;
}

.preview-actions {
  position: fixed;
  top: 14px;
  right: 68px;
  left: 14px;
  z-index: 110;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.preview-close-button,
.preview-download-button,
.preview-edit-request-button,
.preview-select-control {
  display: inline-grid;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.preview-close-button {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 110;
  width: 42px;
  font-size: 18px;
}

.preview-download-button {
  min-width: 128px;
  padding: 0 14px;
}

.preview-edit-request-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.preview-edit-request-button img {
  display: block;
  width: 23px;
  height: 23px;
  opacity: 0.62;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.preview-edit-request-button.is-active {
  border-color: #ff79b3;
  background: #e83e8c;
}

.preview-edit-request-button.is-active img {
  opacity: 1;
  transform: scale(1.06);
}

.preview-edit-request-button[aria-busy="true"] img {
  animation: button-spin 760ms linear infinite;
}

.preview-select-control {
  grid-auto-flow: column;
  grid-template-columns: auto minmax(0, auto);
  gap: 8px;
  min-width: 132px;
  padding: 0 12px;
  cursor: pointer;
}

.preview-select-control input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.preview-select-control span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-close-button:hover,
.preview-download-button:hover,
.preview-edit-request-button:hover,
.preview-select-control:hover {
  background: rgba(49, 91, 220, 0.95);
}

.preview-edit-request-button.is-active:hover {
  background: #c92370;
}

.preview-nav-button {
  position: fixed;
  top: 50%;
  z-index: 110;
  display: grid;
  width: 54px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  transform: translateY(-50%);
}

.preview-nav-button:hover {
  background: transparent;
  color: #d8ecff;
}

.preview-nav-button[hidden] {
  display: none;
}

.preview-nav-prev {
  left: 10px;
}

.preview-nav-next {
  right: 10px;
}

.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070b12;
}

.preview-loader {
  background-size: 46px 46px;
}

.preview-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

@media (max-width: 700px) {
  html {
    overflow-x: hidden;
  }

  .gf-header {
    min-width: 0;
  }

  .gf-header-inner {
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
  }

  .gf-header-inner::before {
    content: "DoyaFile便";
    color: #202124;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
  }

  .gf-header-inner > .gf-logo,
  .gf-header-inner > .member-link,
  .gf-header-inner > .announce {
    display: none;
  }

  .download-page {
    min-width: 0;
    overflow-x: hidden;
  }

  .download-page .gf-header-inner {
    width: 100%;
  }

  .download-page .gf-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .download-page .gf-nav a {
    flex: 0 0 120px;
    width: 120px;
  }

  .download-page .gf-main {
    display: grid;
    justify-items: center;
    width: 100%;
    min-height: 0;
    margin: 12px auto 0;
    padding: 0 10px;
  }

  .download-page .gf-download-box {
    width: min(100%, 516px);
    padding: 14px;
    border-radius: 16px;
  }

  .download-page .gf-tabs {
    height: auto;
    min-height: 46px;
  }

  .download-page .gf-tabs li {
    min-height: 34px;
    margin-right: 6px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .download-page .gf-tabs li.is-active {
    min-height: 46px;
    font-size: 18px;
  }

  .download-page .tab-label-full {
    display: none;
  }

  .download-page .tab-label-short {
    display: inline;
  }

  .download-page .download-file-name {
    font-size: 20px;
  }

  .download-page .download-table {
    grid-template-columns: minmax(0, 1fr);
  }

  .download-page .download-row {
    align-items: stretch;
  }

  .download-page .download-row span {
    flex: 1 1 100%;
  }

  .download-page .gf-button,
  .download-page .fly-button {
    flex: 1 1 auto;
  }

  .download-page .qr-area {
    place-items: center;
  }

  .download-page .music-banner {
    height: 180px;
  }
}

@media (max-width: 420px) {
  .preview-modal {
    padding-top: 114px;
  }

  .preview-download-button,
  .preview-select-control {
    min-width: 128px;
  }

  .preview-nav-button {
    width: 42px;
    height: 68px;
    font-size: 44px;
  }

  .preview-nav-prev {
    left: 6px;
  }

  .preview-nav-next {
    right: 6px;
  }

}

/* Compact download/upload icon actions */
.review-file-actions {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.review-file-actions > .review-icon-action {
  display: inline-flex;
  flex: 0 0 76px;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 48px;
  box-sizing: border-box;
  padding: 0;
  border-radius: 12px;
  gap: 6px;
  font-weight: 800;
}

.review-icon-action img {
  display: block;
  width: 24px;
  height: 24px;
}

.review-icon-action span {
  line-height: 1;
}

.review-upload-label img {
  filter: brightness(0) invert(1);
}

@media (max-width: 900px) {
  .review-focus .review-file-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: none;
}

.secondary-link:hover {
  border-color: var(--blue);
  background: #f4f7ff;
}

.header-link {
  flex: 0 0 auto;
  min-height: 40px;
}

.download-shell {
  display: grid;
  width: min(620px, 100%);
  min-height: calc(100vh - 56px);
  place-items: center;
}

.download-card {
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.download-brand {
  align-items: flex-start;
}

.download-brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

.file-summary {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.file-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-detail {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.download-actions {
  display: flex;
  gap: 12px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 19px;
}

.empty-state p {
  margin: 0;
  line-height: 1.7;
}

.empty-state code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e9edf4;
  color: var(--amber);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #1d2430;
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

@media (max-width: 980px) {
  .app-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .header-actions {
    width: 100%;
  }

  .primary-button,
  .dark-button {
    flex: 1 1 auto;
  }

  .header-link {
    flex: 1 1 100%;
    justify-content: center;
  }

  .edit-review-page .line-share-button {
    flex: 0 0 42px;
  }

  .app-layout {
    width: min(100% - 24px, 760px);
    margin: 12px auto;
  }

  .gallery-panel {
    min-height: 0;
  }

  .directory-nav-panel {
    top: 0;
  }

  .gallery-group {
    scroll-margin-top: 76px;
  }

}

@media (max-width: 520px) {
  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  h1 {
    font-size: 18px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 42px repeat(3, minmax(0, 1fr));
  }

  .header-link {
    grid-column: 1 / -1;
  }

  .download-card {
    padding: 18px;
  }

  .download-actions {
    display: grid;
  }

  .directory-nav-button {
    max-width: 100%;
  }

  .gallery {
    gap: 18px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .photo-card {
    grid-template-rows: auto;
  }

  .photo-info {
    display: none;
  }

}

/* Edit review */
.edit-review-page { min-height: 100vh; overflow-x: hidden; background: #f5f5f3; color: #202020; }
.edit-review-main { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }
.review-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.review-card { overflow: hidden; background: #fff; border: 1px solid #dededb; border-radius: 16px; box-shadow: 0 5px 18px rgba(0, 0, 0, .05); }
.review-thumb-button { display: block; width: 100%; height: 230px; padding: 0; border: 0; background: #171717; cursor: zoom-in; }
.review-thumb-button img { width: 100%; height: 100%; object-fit: contain; }
.review-card-body { padding: 16px; }
.review-card-body h3 { overflow: hidden; margin: 0 0 12px; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.review-status-list { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 28px; margin-bottom: 14px; }
.review-status-pill { padding: 5px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.review-status-pill.status-0 { background: #fff0d5; color: #8a5500; }
.review-status-pill.status-1 { background: #dff4e5; color: #176331; }
.review-status-pill.status-2 { background: #e9e9ed; color: #47474e; }
.review-status-empty { color: #888; font-size: .82rem; }
.review-status-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.review-status-button { min-height: 38px; padding: 7px 5px; border: 1px solid #cacaca; border-radius: 9px; background: #fff; color: #333; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.review-status-button:hover { border-color: #ee7e22; color: #c45d08; }
.review-file-actions { display: flex; align-items: stretch; gap: 8px; margin-top: 12px; }
.review-file-actions > * { flex: 1; justify-content: center; text-align: center; }
.review-upload-label { cursor: pointer; }
.review-upload-label.is-loading { opacity: .55; pointer-events: none; }
.edit-review-page .empty-state { margin-top: 24px; background: #fff; border-radius: 16px; }

@media (max-width: 980px) {
  .edit-review-page .review-request-button {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .edit-review-page .header-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 42px;
  }

  .edit-review-page .review-nav-link {
    grid-column: auto;
    min-height: 36px;
    padding: 0 5px;
    font-size: .78rem;
    white-space: nowrap;
  }

  .edit-review-page .line-share-button { grid-column: 4; }
  .edit-review-page .review-request-button { grid-column: 1 / -1; }
}

.name-entry-card.review-request-photo-card {
  display: flex;
  width: min(980px, 100%);
  max-height: min(88vh, 820px);
  flex-direction: column;
}

.review-request-photo-card > p { flex: none; }

.review-request-photo-grid {
  display: grid;
  overflow: auto;
  min-height: 180px;
  padding: 4px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  overscroll-behavior: contain;
}

.review-request-photo-option {
  position: relative;
  display: grid;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f4f5f7;
  color: #2d3440;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.review-request-photo-option img {
  display: block;
  width: 100%;
  height: 130px;
  background: #0b0f14;
  object-fit: contain;
}

.review-request-photo-option span {
  overflow: hidden;
  padding: 9px 10px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-request-photo-option:hover { border-color: #ffb36d; }
.review-request-photo-option:focus-visible { outline: 3px solid rgba(238, 126, 34, .28); outline-offset: 2px; }
.review-request-photo-option.is-selected { border-color: #ee7e22; background: #fff3e8; color: #a94d06; }
.review-request-photo-option.is-selected::after {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #ee7e22;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .24);
  content: "✓";
  font-weight: 900;
}

@media (max-width: 700px) {
  .edit-review-main { width: min(100% - 24px, 1180px); padding-top: 16px; }
  .review-gallery { grid-template-columns: 1fr; gap: 14px; }
  .review-card { display: grid; grid-template-columns: 38% 62%; }
  .review-thumb-button { height: 100%; min-height: 220px; }
  .review-status-actions { grid-template-columns: 1fr; }
  .review-file-actions { flex-direction: column; }
  .name-entry-card.review-request-photo-card { max-height: calc(100dvh - 40px); padding: 18px; }
  .review-request-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .review-request-photo-option img { height: 112px; }
}

/* Unified edit review and large preview */
.review-workspace { width: 100%; }
.review-focus { overflow: hidden; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; background: #fff; border: 1px solid #dededb; border-radius: 16px; box-shadow: 0 5px 18px rgba(0, 0, 0, .05); }
.review-large-preview { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: min(68vh, 760px); background: #0b0f14; }
.review-large-preview img { display: block; width: 100%; height: min(68vh, 760px); object-fit: contain; }
.review-large-preview.is-uploading::before,
.review-large-preview.is-uploading::after {
  position: absolute;
  z-index: 5;
  content: "";
  pointer-events: none;
}
.review-large-preview.is-uploading::before {
  inset: 0;
  background: rgba(5, 9, 14, .58);
}
.review-large-preview.is-uploading::after {
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94) url("./assets/doyafile_av.gif") center / 42px 42px no-repeat;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .34);
  transform: translate(-50%, -50%);
}
.review-photo-nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 72px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 12px; background: rgba(8, 12, 17, .7); color: #fff; font: 700 2.2rem/1 sans-serif; cursor: pointer; transform: translateY(-50%); }
.review-photo-nav:hover { background: rgba(238, 126, 34, .9); }
.review-photo-prev { left: 18px; }
.review-photo-next { right: 18px; }
.review-focus-body { padding: 20px 22px 22px; }
.review-focus-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.review-focus-heading h3 { overflow: hidden; flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.review-focus-heading span { flex: none; color: #777; font-size: .84rem; font-weight: 700; }
.review-photo-deadline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 8px 8px 8px 12px; border: 1px solid #d9dde3; border-radius: 9px; background: #f5f6f8; color: #626b78; font-size: .88rem; font-weight: 800; }
.review-photo-deadline.is-warning { border-color: #ffc182; background: #fff5e9; color: #d65f00; font-weight: 900; }
.review-photo-deadline.is-urgent { border-color: #ffadb8; background: #fff0f2; color: #e0002b; font-weight: 900; }
.review-deadline-update-button { flex: none; min-height: 32px; padding: 5px 11px; border: 1px solid #c8ced8; border-radius: 7px; background: #fff; color: #4f5968; font: inherit; font-size: .78rem; cursor: pointer; }
.review-deadline-update-button:hover { border-color: #7e8a9b; background: #f8f9fb; }
.review-deadline-hint { margin: 8px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.review-focus .review-status-actions { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.review-focus .review-file-actions { max-width: 620px; }

@media (max-width: 700px) {
  .review-large-preview { min-height: 52vh; }
  .review-large-preview img { height: 52vh; }
  .review-photo-nav { width: 42px; height: 58px; }
  .review-photo-prev { left: 8px; }
  .review-photo-next { right: 8px; }
  .review-focus-body { padding: 16px; }
  .review-focus .review-status-actions { grid-template-columns: 1fr; }
  .review-focus .review-file-actions { flex-direction: column; max-width: none; }
}

/* Keep edit status visible beside the photo (above it on narrow screens). */
.review-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 460px);
  align-items: stretch;
}

.review-large-preview {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
}

.review-focus-body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: flex-start;
  border-left: 1px solid #dededb;
}

.review-focus .review-status-list {
  align-content: flex-start;
  margin-bottom: 18px;
}

.review-preview-status {
  display: none;
}

.review-focus .review-status-actions {
  grid-template-columns: 1fr;
}

.review-focus .review-file-actions {
  flex-direction: column;
  max-width: none;
  margin-top: auto;
  padding-top: 18px;
}

@media (max-width: 900px) {
  .review-focus {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-focus-body {
    grid-column: 1;
    grid-row: 1;
    border-bottom: 1px solid #dededb;
    border-left: 0;
  }

  .review-large-preview {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
  }

  .review-focus-body > .review-status-list {
    display: none;
  }

  .review-preview-status {
    position: static;
    order: -1;
    display: flex;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #dededb;
    border-radius: 0;
    background: #fff;
  }

  .review-preview-status .review-status-empty {
    color: #777;
  }

  .review-focus .review-status-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-focus .review-file-actions {
    flex-direction: row;
    margin-top: 0;
    padding-top: 0;
  }
}

/* Name/status table */
.review-status-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d8d8d5;
  border-radius: 10px;
  background: #fff;
}

.review-status-header,
.review-status-pill {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) 90px 76px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.review-status-header {
  background: #f1f1ef;
  color: #5f5f5b;
  font-size: .72rem;
  font-weight: 700;
}

.review-status-header > span,
.review-status-pill > span {
  min-width: 0;
  padding: 8px 10px;
}

.review-status-header > span + span,
.review-status-pill > span + span {
  border-left: 1px solid #d8d8d5;
}

.review-status-pill {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #333;
  font-size: .78rem;
}

.review-status-pill + .review-status-pill {
  border-top: 1px solid #e2e2df;
}

.review-status-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-status-value {
  text-align: center;
  font-weight: 700;
}
.review-table-status-actions { display: grid; grid-template-columns: 1fr; gap: 5px; }
.review-table-status-button { min-height: 30px; padding: 4px 3px; border: 1px solid #cacaca; border-radius: 7px; background: #fff; color: #333; font: inherit; font-size: .64rem; font-weight: 700; cursor: pointer; }
.review-table-status-button:hover:not(:disabled) { border-color: #ee7e22; color: #c45d08; }
.review-table-status-button.is-current { border-color: #e1b377; background: #fff0d5; color: #8a5500; }
.review-table-status-button:disabled { cursor: default; opacity: .72; }
.review-table-status-button.is-update { justify-self: center; width: auto; min-width: 54px; min-height: 28px; padding: 3px 11px; border-color: #8aa4d8; color: #2455a4; }
.review-table-status-button.is-update:hover { border-color: #356dcc; background: #edf4ff; color: #164b9d; }
.review-photo-cancel-button { flex: none; min-height: 34px; padding: 6px 11px; border: 1px solid #d8a4a4; border-radius: 8px; background: #fff; color: #a12d2d; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; }
.review-photo-cancel-button:hover:not(:disabled) { border-color: #b22f2f; background: #fff0f0; color: #8c1818; }
.review-photo-cancel-button:disabled { cursor: wait; opacity: .55; }
.review-status-dialog-options { display: grid; gap: 9px; }
.review-status-dialog-options button { min-height: 44px; padding: 8px 12px; border: 1px solid #cacaca; border-radius: 9px; background: #fff; color: #333; font: inherit; font-weight: 700; cursor: pointer; }
.review-status-dialog-options button:hover:not(:disabled) { border-color: #ee7e22; color: #c45d08; }
.review-status-dialog-options button.is-current { border-color: #e1b377; background: #fff0d5; color: #8a5500; }
.review-status-dialog-options button:disabled { cursor: default; opacity: .72; }
.review-cancel-warning { padding: 11px 12px; border: 1px solid #efc7c7; border-radius: 9px; background: #fff3f3; color: #8c2222 !important; font-size: .86rem; font-weight: 700; }
.danger-button { border: 1px solid #b93636; background: #b93636; color: #fff; cursor: pointer; }
.danger-button:hover:not(:disabled) { background: #982828; }
.danger-button:disabled { cursor: wait; opacity: .55; }
.review-person-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 10px; border-top: 1px solid #d8d8d5; background: #f8f8f6; }
.review-person-add input { min-width: 0; padding: 8px 10px; border: 1px solid #cacaca; border-radius: 7px; background: #fff; font: inherit; }
.review-person-add input:focus { outline: 2px solid rgba(238, 126, 34, .22); border-color: #ee7e22; }
.review-person-add button { min-height: 34px; padding: 5px 12px; border: 1px dashed #aaa; border-radius: 7px; background: #fff; color: #444; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.review-person-add button:hover:not(:disabled) { border-color: #ee7e22; color: #c45d08; }

@media (max-width: 700px) {
  .review-status-header,
  .review-status-pill { grid-template-columns: minmax(78px, 1fr) 84px 72px; }
}

.review-status-pill.status-0 .review-status-value { background: #fff0d5; color: #8a5500; }
.review-status-pill.status-1 .review-status-value { background: #dff4e5; color: #176331; }
.review-status-pill.status-2 .review-status-value { background: #e9e9ed; color: #47474e; }
.review-status-empty { padding: 10px; }

@media (max-width: 900px) {
  .review-preview-status {
    padding: 0;
    border: 0;
    border-bottom: 1px solid #dededb;
    border-radius: 0;
  }
}

@media (max-width: 420px) {
  .review-status-header,
  .review-status-pill {
    grid-template-columns: minmax(0, 1fr) 82px 64px;
  }

  .review-status-header > span,
  .review-status-pill > span {
    padding-right: 6px;
    padding-left: 6px;
  }

  .review-table-status-button.is-update {
    min-width: 44px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .review-person-add {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .review-person-add button {
    width: auto;
    padding-right: 9px;
    padding-left: 9px;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .review-focus-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .review-photo-cancel-button {
    width: 100%;
    white-space: normal;
  }

  .review-focus .review-status-actions {
    grid-template-columns: 1fr;
  }

  .review-focus .review-file-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.review-focus .review-file-actions {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.review-preview-status {
  display: none;
}

@media (max-width: 900px) {
  .review-preview-status {
    display: grid;
  }
}

.processing-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d85e0d;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff982f, #e66512);
  color: #fff;
  box-shadow: 0 5px 14px rgba(214, 91, 12, .24);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.processing-header-button:not(:disabled) {
  border-color: #d85e0d;
  background: linear-gradient(135deg, #ff982f, #e66512);
  color: #fff;
}

.processing-header-button img {
  width: 20px;
  height: 20px;
}

.processing-header-button:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 7px 18px rgba(214, 91, 12, .34);
  transform: translateY(-1px);
}

.processing-header-button:focus-visible {
  outline: 3px solid rgba(238, 126, 34, .28);
  outline-offset: 2px;
}

.processing-header-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.processing-choice-actions {
  display: grid;
  gap: 10px;
}

.processing-choice-button {
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid #9caddf;
  border-radius: 10px;
  background: #f1f5ff;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.processing-review-choice {
  border-color: #f1bd86;
  background: #fff6ec;
  color: #a7520c;
}

.processing-choice-button:hover:not(:disabled) {
  filter: brightness(.97);
}

.processing-choice-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.name-entry-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 12, 18, .72);
}

.name-entry-modal[hidden] {
  display: none;
}

.name-entry-card {
  width: min(420px, 100%);
  box-sizing: border-box;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.name-entry-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.name-entry-card p { margin: 0 0 20px; color: #666; }
.name-entry-card label { display: grid; gap: 7px; font-weight: 800; }
.name-entry-card input { width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid #bbb; border-radius: 10px; font: inherit; }
.name-entry-card input:focus { outline: 3px solid rgba(238, 126, 34, .2); border-color: #ee7e22; }
.person-entry-list { display: grid; gap: 10px; }
.person-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.person-entry-remove, .person-entry-add { min-height: 40px; border: 1px solid #bbb; border-radius: 9px; background: #fff; color: #444; font: inherit; font-weight: 700; cursor: pointer; }
.person-entry-remove { padding: 0 12px; }
.person-entry-remove[hidden] { display: none; }
.person-entry-add { width: 100%; margin-top: 10px; border-style: dashed; }
.processing-deadline-field { margin-top: 16px; }
.processing-deadline-field input { min-height: 44px; }
.name-entry-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.name-entry-actions button { min-height: 42px; padding: 0 16px; border-radius: 9px; font: inherit; font-weight: 800; }
.name-entry-actions .secondary-button { border: 1px solid #bbb; background: #fff; color: #333; }

@media (max-width: 520px) {
  .name-entry-card { padding: 20px; }
  .name-entry-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
