import 'package:flutter/material.dart';
import 'theme.dart';
/// Desktop web: center content, soft page frame, max readable width.
class WebShell extends StatelessWidget {
  final Widget child;
  const WebShell({super.key, required this.child});

  @override
  Widget build(BuildContext context) {
    final width = MediaQuery.sizeOf(context).width;
    final wide = width >= 900;
    return ColoredBox(
      color: const Color(0xFFD0C8B8),
      child: Center(
        child: ConstrainedBox(
          constraints: BoxConstraints(maxWidth: wide ? 880 : double.infinity),
          child: DecoratedBox(
            decoration: BoxDecoration(
              boxShadow: wide
                  ? [
                      BoxShadow(
                        color: AppTheme.ink.withValues(alpha: 0.12),
                        blurRadius: 40,
                        offset: const Offset(0, 12),
                      ),
                    ]
                  : null,
            ),
            child: ClipRect(child: child),
          ),
        ),
      ),
    );
  }
}
