/* ORUMUP 2026-11-03: seven owner-approved compact-screen improvements.
   Presentation only: no changes to member/account/permission/business data. */
@media screen {
  /* Today's count remains a numeric chip even while a later read is pending. */
  #topTodayBtn, #heroTodayBtn { white-space: nowrap; }
  #topTodayStockCount, #heroTodayCount { font-variant-numeric: tabular-nums; }

  /* Participant header: one title with an optional accessible hint. */
  #participantModal .modal-head-text > p { display: none !important; }
  #participantModal .participant-card {
    min-height: 0 !important; height: auto !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
  }
  #participantModal .participant-summary {
    display: flex !important; flex-wrap: wrap; align-items: center;
    justify-content: flex-start; gap: 4px 8px;
    margin: 7px 0 2px !important; padding: 0 !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
  }
  #participantModal .participant-summary-item {
    display: inline-flex !important; align-items: baseline; gap: 5px !important;
    width: auto !important; min-width: 0 !important;
    margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
    white-space: nowrap;
  }
  #participantModal .participant-summary-item:nth-child(1)::after {
    content: '·'; font-weight: 800; margin-left: 7px;
  }
  #participantModal .participant-summary-item:nth-child(n+3),
  #participantModal .participant-note,
  #participantModal #participantList { display: none !important; }
  #participantModal .participant-summary-item span,
  #participantModal .participant-summary-item b {
    display: inline !important; font-size: 15px !important; line-height: 1.6 !important;
    color: var(--oreumup-theme-ink, #244737) !important;
  }
  #participantModal .participant-summary-item b { font-weight: 900 !important; }
  #participantModal .compact-participant-caption {
    margin: 5px 0 0; color: var(--oreumup-theme-muted, #526b5e);
    font-size: 12px; line-height: 1.45;
  }

  /* One hover/focus/tap helper instead of repeatedly printed long copy. */
  .compact-help-anchor {
    position: relative; display: inline-flex; align-items: center;
    max-width: 100%; cursor: help;
  }
  .compact-help-anchor::after {
    content: attr(data-compact-help);
    position: absolute; z-index: 2147483000;
    top: calc(100% + 7px); left: 0;
    width: max-content; max-width: min(320px, calc(100vw - 34px));
    padding: 10px 12px; border: 1px solid var(--oreumup-theme-line, #62806f);
    border-radius: 10px;
    background: var(--oreumup-theme-surface, #ffffff);
    color: var(--oreumup-theme-ink, #244737);
    font-size: 12px; font-weight: 600; line-height: 1.55;
    white-space: normal; word-break: keep-all; overflow-wrap: anywhere;
    box-shadow: 0 10px 28px #0003;
    opacity: 0; visibility: hidden; pointer-events: none;
  }
  .compact-help-anchor:is(:hover, :focus-visible, [data-compact-open="true"])::after {
    visibility: visible; opacity: 1;
  }
  #participantTitle.compact-help-anchor { margin-right: 2px; }
  #plusModalTitle.compact-help-anchor { margin-right: 2px; }

  /* Notices open as a readable list; detail still retains its normal back button. */
  #noticeModal #noticeListView:not(.quick-hidden) { display: block; }

  /* PC-app install help: only actual controls and one short lead stay visible. */
  #pcAppDialog { width: min(440px, calc(100vw - 24px)); padding: 17px !important; }
  #pcAppDialog #pcAppInstallSteps,
  #pcAppDialog #pcAppInstalledGuide,
  #pcAppDialog #pcAppFallback,
  #pcAppDialog .pcapp-dialog-foot,
  #pcAppDialog #pcAppGuideDismissNote { display: none !important; }
  #pcAppDialog .pcapp-dialog-lead { margin: 12px 0 10px; line-height: 1.5; }
  #pcAppDialog .pcapp-dialog-head { align-items: center; }
  #pcAppDialog .pcapp-status { margin: 5px 0 10px; line-height: 1.5; font-size: 12px; }
  #pcAppDialog .pcapp-recheck { margin-top: 6px; }
  #pcAppDialog .pcapp-help-entry {
    flex: none; border: 1px solid var(--oreumup-theme-line, #c9ded2);
    border-radius: 9px; padding: 6px 9px; min-width: 36px; min-height: 36px;
    background: var(--oreumup-theme-soft, #ecf6f1);
    color: var(--oreumup-theme-ink, #244737);
    font: inherit; font-weight: 900; font-size: 14px;
  }
  #pcAppDialog .pcapp-help-entry::after { left: auto; right: 0; font-weight: 600; }
  /* The short hint must not cover the requested detailed instructions. */
  #pcAppDialog #compactPcappHelp[data-compact-open="true"]::after { visibility: hidden; opacity: 0; }
  /* Keep detailed installation help compact until the existing ? is requested. */
  #pcAppDialog:has(#compactPcappHelp[data-compact-open="true"]) #pcAppFallback:not([hidden]),
  #pcAppDialog:has(#compactPcappHelp[data-compact-open="true"]) #pcAppInstalledGuide:not([hidden]),
  #pcAppDialog:has(#compactPcappHelp[data-compact-open="true"]) #pcAppGuideDismissNote:not([hidden]),
  #pcAppDialog:has(#compactPcappHelp[data-compact-open="true"]) .pcapp-dialog-foot:not([hidden]) {
    display: block !important;
  }
  #pcAppDialog:has(#compactPcappHelp[data-compact-open="true"]) #pcAppInstallSteps:not([hidden]) {
    display: grid !important;
  }

  /* My Collection: large category selection, no repetitive instructional blocks. */
  #plusModal .modal-head-text > p,
  #plusModal .plus-library-head small,
  #plusModal .plus-permission-note { display: none !important; }
  #plusModal .plus-library-head { margin-top: 10px; }
  #plusModal .oreumup-conv-favorites-list > .oreumup-conv-label { font-size: 0 !important; }
  #plusModal .oreumup-conv-favorites-list > .oreumup-conv-label::after {
    content: '저장한 글 없음'; font-size: 11px; font-weight: 700;
  }
  #plusModal .compact-plus-groups {
    display: flex; gap: 6px; align-items: stretch; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    margin: 7px 0 9px; padding: 2px 0 7px;
  }
  #plusModal .compact-plus-group {
    flex: 1 0 auto; min-width: fit-content; min-height: 39px;
    border: 1px solid var(--oreumup-theme-line, #c7dcd0);
    border-radius: 10px; padding: 7px 11px;
    background: var(--oreumup-theme-surface, #fff);
    color: var(--oreumup-theme-ink, #244737);
    font: inherit; font-size: 12px; font-weight: 900;
    white-space: nowrap;
  }
  #plusModal .compact-plus-group[aria-selected="true"] {
    background: #0a8652 !important; border-color: #0a8652 !important;
    color: #fff !important;
  }
  #plusModal #plusLibrary .plus-lib-item[hidden] { display: none !important; }
  #plusModal .compact-plus-groups .compact-plus-group:last-child { flex: 0 0 auto; }

  /* Shortcut 1 and 2 share the same one-row horizontal picker. */
  #shortcutModal #shortcutInternalExamples {
    display: flex !important; flex-flow: row nowrap !important;
    align-items: stretch !important; gap: 6px !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 2px 0 9px !important;
    max-width: 100%;
  }
  #shortcutModal #shortcutInternalExamples .shortcut-internal {
    display: inline-flex !important; align-items: center; justify-content: center;
    flex: 0 0 auto !important; width: auto !important;
    min-width: 110px !important; max-width: 175px;
    min-height: 43px !important;
    margin: 0 !important; padding: 7px 11px !important;
    font-size: 12px !important; line-height: 1.35 !important;
    white-space: nowrap; scroll-snap-align: start;
  }
  #shortcutModal #shortcutInternalExamples .shortcut-internal[aria-pressed="true"] {
    background: #0a8652 !important; color: #fff !important; border-color: #0a8652 !important;
  }
  #shortcutModal .shortcut-head p { display: none !important; }
}
@media screen and (max-width: 430px) {
  #participantModal .participant-summary-item span,
  #participantModal .participant-summary-item b { font-size: 13px !important; }
  #pcAppDialog .pcapp-help-entry::after { max-width: calc(100vw - 34px); }
  #plusModal .compact-plus-group { font-size: 11px; padding: 8px 10px; }
}
/* The Kakao link itself owns its hover/focus hint; no independent i/ⓘ control. */
@media screen {
  #kakaoChatControl #kakaoChatHelp { display: none !important; }
  #kakaoChatControl #kakaoChatGuide {
    width: min(250px, calc(100vw - 24px));
    background-color: var(--oreumup-theme-surface, #192820) !important;
    border-color: var(--oreumup-theme-line, #496457) !important;
    color: var(--oreumup-theme-ink, #ffffff) !important;
  }
}
@media (hover: hover) and (pointer: fine) {
  #kakaoChatControl:hover #kakaoChatGuide,
  #kakaoChatControl:focus-within #kakaoChatGuide {
    visibility: visible !important; opacity: 1 !important;
  }
}
@media (hover: none) {
  #kakaoChatControl #kakaoChatGuide { display: none !important; }
}
