.scan-thanks {
  min-height: 100vh;
  background-color: #f3f4f6;
  padding: 4rem 1rem;
}

@media (max-width: 640px) {
  .scan-thanks {
    padding: 2rem 1rem;
  }
}

.scan-thanks__container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.scan-thanks__card {
  background-color: #ffffff;
  border-radius: 0;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15);
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .scan-thanks__card {
    padding: 1.75rem;
  }
}

.scan-thanks__title {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.scan-thanks__title-event {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.scan-thanks__title-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.scan-thanks__text {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
}

.scan-thanks__text--muted {
  color: #4b5563;
}

.scan-thanks__list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: #4b5563;
  line-height: 1.7;
  list-style: decimal;
  list-style-position: outside;
}

.scan-thanks__list li + li {
  margin-top: 0.35rem;
}

.scan-thanks__section {
  margin-top: 3rem;
}

.scan-thanks__section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.scan-thanks__ticket-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.scan-thanks__ticket-card {
  border: 1px solid #d1d5db;
  border-top: 24px solid #dc2626;
  border-radius: 0;
  background-color: #ffffff;
  padding: 1.2rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  text-align: center;
  position: relative;
}

.scan-thanks__ticket-badge {
  position: absolute;
  top: -2.8rem;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.scan-thanks__ticket-badge-icon {
  width: 3rem;
  height: auto;
  object-fit: contain;
  display: block;
}

.scan-thanks__ticket-name,
.scan-thanks__ticket-plan {
  margin: 0;
  font-weight: 700;
  color: #111827;
}

.scan-thanks__ticket-name {
  font-size: 1.2rem;
  line-height: 1.1;
}

.scan-thanks__ticket-heading {
  margin: 0 0 0.1rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.04em;
}

.scan-thanks__ticket-planline {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  text-align: center;
}

.scan-thanks__ticket-planline span + span {
  font-size: 0.7rem;
  font-weight: 700;
  color: #111827;
}

.scan-thanks__ticket-fee {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.scan-thanks__ticket-top {
  width: 100%;
  margin: 0.3rem 0 0.6rem;
  display: flex;
  justify-content: center;
}

.scan-thanks__ticket-top--qr {
  margin: 0.3rem 0 0.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
}

.scan-thanks__ticket-matrix {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  gap: 0.5rem;
  justify-items: center;
  align-items: center;
}

.scan-thanks__square {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1 / 1;
  border: 1px solid #111827;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-align: center;
}

.scan-thanks__stamp {
  border-width: 1px;
  border-style: solid;
  border-radius: 9999px;
}

.scan-thanks__stamp--inactive {
  border-color: #d1d5db;
  border-style: dashed;
  color: #6b7280;
  background-color: #f9fafb;
}

.scan-thanks__stamp--active {
  border-color: #b91c1c;
  color: #ffffff;
  background-color: #b91c1c;
}

.scan-thanks__stamp-form {
  width: 100%;
  height: 100%;
}

.scan-thanks__stamp-button {
  padding: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  position: relative;
  overflow: hidden;
}

.scan-thanks__stamp-label {
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.1;
}

.scan-thanks__stamp-value {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
}

.scan-thanks__stamp-sub {
  font-size: 0.7rem;
  font-weight: 700;
  color: currentColor;
  line-height: 1.2;
}

.scan-thanks__ticket-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
}

.scan-thanks__ticket-qr {
  align-self: stretch;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.scan-thanks__qr-image {
  display: block;
  width: min(200px, 100%);
  max-width: 100%;
  height: auto;
  padding: 6px;
  border: 1px solid #111827;
  background-color: #ffffff;
  box-sizing: border-box;
}

.scan-thanks__stamp-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: grayscale(1);
  width: 95%;
  max-width: 110px;
  height: auto;
  margin: 0 auto;
}

.scan-thanks__stamp-button.scan-thanks__stamp--active .scan-thanks__stamp-emblem {
  opacity: 0.16;
}

.scan-thanks__status-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.scan-thanks__status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.scan-thanks__status-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.scan-thanks__status-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.scan-thanks__status-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid transparent;
  line-height: 1.1;
}

.scan-thanks__status-state--done {
  background-color: #16a34a;
  color: #ffffff;
  border-color: #15803d;
}

.scan-thanks__status-state--pending {
  background-color: #f3f4f6;
  color: #1f2937;
  border-color: #e5e7eb;
}

.scan-thanks__status-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
}

.scan-thanks__ticket-top--qr .scan-thanks__ticket-number-block {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #111827;
  border-radius: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.scan-thanks__ticket-number-label {
  margin: 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
}

.scan-thanks__ticket-number-value {
  margin: -0.1rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.08em;
  font-family: 'SFMono-Regular', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1;
  display: inline-block;
}

.scan-thanks__ticket-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.5rem;
  align-items: start;
}

.scan-thanks__ticket-value {
  white-space: pre-line;
  font-size: 0.98rem;
  color: #111827;
}

.scan-thanks__ticket-note {
  margin: auto 0 0 0;
  font-size: 0.95rem;
  color: #111827;
  text-align: center;
  font-weight: 700;
}

.scan-thanks__ticket-target {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.35rem 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

.scan-thanks__target-heading {
  margin: 0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
}

.scan-thanks__target-person {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.3rem 0;
  border-top: 1px dashed #e5e7eb;
}

.scan-thanks__target-note {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: #111827;
}

.scan-thanks__target-row {
  display: block;
}

.scan-thanks__target-value {
  font-size: 0.95rem;
  color: #111827;
  word-break: break-word;
}

.scan-thanks__empty-message {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #6b7280;
}

.scan-thanks__summary-card {
  margin-top: 1.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0;
  background-color: #ffffff;
  padding: 1rem 1.25rem;
}

.scan-thanks__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 1rem;
  color: #111827;
  border-bottom: 1px dashed #e5e7eb;
}

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

.scan-thanks__summary-label {
  font-weight: 700;
  color: #4b5563;
}

.scan-thanks__summary-value {
  font-weight: 400;
}

.scan-thanks__summary-row--total .scan-thanks__summary-value {
  font-size: 1rem;
  color: #0f172a;
  font-weight: 400;
}

.scan-thanks__info-section {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scan-thanks__info-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
}

.scan-thanks__info-card {
  border: 1px solid #d1d5db;
  border-radius: 0;
  background-color: #ffffff;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.scan-thanks__info-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.5rem;
  align-items: start;
  font-size: 1rem;
  color: #111827;
  padding: 0.55rem 0;
  border-bottom: 1px dashed #e5e7eb;
}

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

.scan-thanks__info-label {
  font-weight: 700;
  color: #4b5563;
}

.scan-thanks__info-value {
  word-break: break-word;
  font-weight: 400;
}

@media (max-width: 640px) {
  .scan-thanks__card {
    padding: 1.75rem;
  }

  .scan-thanks__ticket-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .scan-thanks__info-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .scan-thanks__target-row {
    display: block;
  }
}

.scan-admin__intro-title {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
}

.scan-admin__intro-text {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  color: #4b5563;
}

.scan-admin__flash {
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.scan-admin__flash--notice {
  background-color: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.scan-admin__flash--alert {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
}
